dshr@SUN.COM (David Rosenthal) (12/10/88)
Here is the basic information that is in the RTF Appendix E. I have used most of these on my 3/75 for some time, adn I also ran a 3/50 for a while with them. I use NeWS1.1, X11R{2,3}, and X/NeWS, but not SunView. David. Routing Workstations with only one ethernet interface do not need to do dynamic routing with in.routed; instead, they can route statically by commenting out (# in column 1) these lines in /etc/rc.local: #if [ -f /usr/etc/in.routed ]; then # in.routed; (echo -n ' routed') >/dev/console #fi (Routing table entries can still be added or modified by the kernel as a result of ICMP redirect messages.) Diskless clients have a default route provided automatically by the server; on other workstations, a command of the form /usr/etc/route add default <router> 1 can be added to rc.local, where "router" is the hostname of an IP router ("gateway") on your local network. This action frees up both the pages used by in.routed and most of the memory allocated for routing table entries. Here at Sun in Mountain View, static routing typically reduces the size of the routing table from over 150 entries to 3. Sendmail Receiving mail on a diskless workstation typically causes a significant amount of paging, not only due to the creation of sendmail and /bin/mail processes, but also due to alias resolution and access over the network to the mailbox on the server. Recommendation: have each client mount its spool directory via secure NFS, change the YP alias map to direct users' mail to their servers, and don't run sendmail on the clients. For example, add a line like the following to each client's /etc/fstab: server:/var/spool/mail /var/spool/mail nfs rw,bg,hard,intr,secure 0 0 Export /var/spool/mail on the server using the "secure" option. (Don't forget to run exportfs.) Change or create aliases in /etc/aliases on the YP master to provide aliases of the form user: user@server for all users who would otherwise receive mail on the clients, and re-make the YP alias map (cd /var/yp; make aliases). Comment out these lines in each client's /etc/rc.local and reboot the clients: #if [ -f /usr/lib/sendmail -a -f /etc/sendmail.cf ]; then # (cd /var/spool/mqueue; rm -f nf* lf*) # /usr/lib/sendmail -bd -q1h; (echo -n ' sendmail')>/dev/console #fi An interesting side effect of this change is that a user can receive mail even if the client workstation is down. This change is also useful in environments where users wish to be able to log in to any machine of a cluster and read their mail. Accounting Don't enable process accounting. If accounting is not configured into the kernel ("options SYSACCT"), or the file /var/adm/acct does not exist at boot time, accounting is not enabled (see /etc/rc). Other changes in /etc/rc.local Don't start unnecessary server processes. Typically only portmap, ypbind, biod (4 of them), syslogd, update, inetd, and lpd are required on client workstations. Add keyserv if you use secure NFS, and sendmail if you don't implement the sendmail strategy above. Miscellaneous Make sure that you have defined LOGHOST if required as specified on page 3 of the 4.0 Read This First document (part number 800-1737-16). Don't enable file system quotas. (By default, quotas are not enabled.) Replacing /usr/ucb/quota with /usr/bin/true will prevent possible delays at login time due to calls to rpc.rquotad on each NFS server from which you have a filesystem mounted. Use the default SunView background, and don't use retained windows. Don't enable in.rwhod. Minimizing kernel size (last but certainly not least) Kernel configuration file Remove all unnecessary entries from the kernel configuration file. For example, the following lines can be removed from DL50 in /usr/sys/sun3/conf: options CRYPT (unless you use secure NFS) pseudo-device clone pseudo-device snit pseudo-device pf pseudo-device nbuf device des0 at obio ? csr 0x1c0000 Streams NIT is used by etherfind; to run etherfind, boot another kernel or run it on the server. In many cases "maxusers" can be reduced to 3. Also, these lines can be changed as follows: pseudo-device dtop1 pseudo-device ms1 pseudo-device kb1 Streams buffers The default allocation of streams buffers is overly generous. Use the following procedure to make a kernel with smaller allocations. 1. Run config using your modified configuration file. 2. In /usr/share/sys/sun3/<KERNELNAME>/param.c, modify these lines as follows: #define NBLK2048 4 #define NBLK1024 4 #define NBLK512 4 #define NBLK256 16 #define NBLK128 64 #define NBLK64 64 #define NBLK16 64 #define NBLK4 64 #define NSTREAM 20 #define NMUXLINK 37 #define NSTREVENT 64 Larger allocations may be required in some environments; in some circumstances running out can deadlock the system. Check your usage with netstat -m. 3. Run "make". Ethernet buffers If you have an "le" Ethernet interface (Sun-3/50 or 3/60), reduce the number of Ethernet buffers: adb -w vmunix _le_nrmdp2?W 3 _le_nrbufs?W A (type ^D or $q to quit) If you have an "ie" Ethernet interface: adb -w vmunix _ie_tbufs?W 1 _ie_rbds?W 6 _ie_rfds?W 5 _ie_rbufs?W 9 (^D or $q to quit) UFS (Unix file system) buffers If you have a disk, you can reduce the number of buffers allocated to the UFS buffer cache: adb -w vmunix _nbuf?W 6 (^D or $q to quit) Those of you with access to the patch machine 'yabbadabba' can retrieve scripts to make the above kernel changes from /CSD/4.0perf.