[comp.sys.sun] SunOS 4.0.1 Bug Fixes AND SunOS 4.0 Performance Hints

aden@sun.com (Michelle Aden) (01/07/89)

[[ I have received copies of the Performance Hints document from other
readers as well, but I was reluctant to include them without Sun's prior
approval (copyright and all).  But since this message is from someone at
Sun, I don't feel bad about including it.  The second section of this
message contains all the hints that are in the document handed out at SUG.
--wnl ]]

************************************************************************ 
* NOTE:  This message does NOT discuss the Sun386i SunOS 4.0.1,	       *
*        which is a different release.                                 *
************************************************************************

Release Contents:

SunOS 4.0.1 is a collection of installable/removable patches which
addresses 79 known software difficulties in such areas as:

	NFS	 		serial communications 
	Yellow Pages		SCSI 
	dbxtool (debugger)	Lightweight Process Library
	format 			static linking (export version).

Suninstall bugs are not addressed in 4.0.1.  The 4.0.1 fixes should be
applied AFTER SunOS 4.0 has been successfully installed.  Suninstall will
be improved in a future release.  This release does NOT address SunOS 4.0
performance issues.  "Performance Tips" for SunOS 4.0 are included at the
end of this message.

Ordering Details for SunOS 4.0.1:

A.	Software Contract Customers

If you have software support agreements with Sun (Software Update Service,
AnswerLine Service, Personal AnswerLine Service, Comprehensive, or Basic),
4.0.1  shipped automatically and was available at no additional charge.
Shipments to Sun internal and field locations began first, and most
support customers should have the tapes by year-end.

If you have not	received your media by the end of December, please contact
your local Sun Sales Office and ask for the Customer Services
Administrator (CSA).

B.	Non-contract Customers

If you do not have a software support agreement with Sun, then a Sales
Order for SunOS 4.0.1 is appropriate.  You may also directly call the
Customer Service Telelmarketing organization at 1-800-USA-4SUN (touch 6)
to order this tape.  The price of this tape is $200 (U.S.) and is
available in Domestic and Export versions.

New SunOS 4.0 Orders:

To address the product quality of SunOS 4.0, SunOS 4.0.1 will ship with
all new 4.0 orders for Sun-3 and Sun-4 systems starting in mid-November.
A future SunOS release will fully incorporate all of the SunOS 4.0.1 fixes
as well as others.

Michelle Aden				Jay Pederson
SunOS Product Marketing			CSD Product Marketing

	PERFORMANCE TIPS
	SunOS Release 4.0

Introduction

Included is Appendix E of the current READ THIS FIRST for SunOS 4.0 (part
# 800-1737-17).  It details procedures intended to optimize workstation
performance.  While these procedures are specifically recommended for
systems with 4 Megabyte memories, they are applicable to workstations with
larger memories as well.

E:  Perfomance Tips

The following recommendations are intended to improve performance on 4MB
Sun-3's running SunOS 4.0.  They will not solve every performance problem,
but many problems can be eliminated by implementing the following
suggestions.  The goal of these recommendations is to maximize the number
of memory pages available to user processes (including SunView).

*        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 

Don't run the GENERIC kernel except to configure a smaller one!

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

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)