SCO Tuning Notes

Printing a chapter of the performance manual:
  Performance Guide ->
    Chapter 1: What determines performance ->
      Chapter 1 ->
        Entire chapter assembled for printing
renice -t allows you to restore the original value.
show what each cpu is doing
show which drivers are threaded
show which cpus can handle which interrupts
  Enable sar
    log in as root and run the command
      /usr/lib/sa/sar_enable -y
    and then reboot.
    The command changes comments in /etc/rc2.d/P21perf and root's crontab.
  %rcache (sar -b)
    < 90-95% needs more NBUFs
  %wcache (sar -b)
    < 65% needs more NBUFs
  %busy > 80% and avque >> 1 (sar -d)
    high means i/o bottleneck
  avque (sar -d)
    > 1 means too many pending i/o requests
  ovsiohw/s (sar -g)
    > 0 means serial i/o overruns
      upgrade to a smart multiport or a network terminal concentrator
  ovsiodma/s (sar -g)
    > 0 means serial driver dropping input due to lack of receiver cache
    increase NCLIST and TTHOG
  ovclist/s (sar -g)
    > 0 means serial driver ran out of character buffers
    increase NCLIST
  slpcpybufs/s (sar -B), ompb/s (sar -h), sdmabuf/s (sar -h)
    > 0 means too few physical buffers (NUMPBUF)
    increase NUMPBUF by at least NUMPBUF * the sum
      (slpcpybufs/s) / (4 * cpybufs/s) +
      (4 * ompb/s) / (mpbuf/s) +
      (sdmabuf/s) / (dmabuf/s)
  hit % (sar -n)
    < 65% means too small namei cache (CACHEENTS and HASHQS)
  %runocc (mpsar -q)
    > 90% means run queue is continually occupied due to high cpu load
  swpq-sz and %swpocc (sar -q)
    swpq-sz > 0 or %swpocc > 20% means ready-to-run processes swapped out
  runq-sz (sar -q)
    > 2 means too many processes for the cpu
  rclm/s (sar -q)
    > 0 means swapping or paging
  freemem (sar -r)
    near GPGSHI with freeswp constant means page stealing active
    want freemem >> GPGSHI
  oreqblk/s (sar -S)
    times per sec processes put to sleep due to lack of scsi request blocks
    > 0 means to increase SDSKOUT by at least
      SDKSOUT * (oreqblk/s) / (reqblk/s)
  %idle (sar -u)
    < 5% is cpu bound, < 20% could be problem
  %wio (sar -u)
    > 15% is i/o bound
  %sys >> %user and %idle near 0 (sar -u)
    system is paging
  ov (sar -v)
    > 0 means overflows of kernel parameters
      set the tables to 0 to allow dynamic growth
  swpot/s and bswot/s (sar -w)
    > 0 means processes were swapped out
swap -l
  free < 50% blocks means many processes swapped out
df -v
  %used > 90% means possible fragmentation
X Windows
  enable backing store on X servers
  enable save-unders on X servers
  set NSTREAM >= 4 * (number of X clients + servers)
  set NSTRPAGES >= 125 * (1 + number of X terminals)
  set NUMSP (stream pipes) >= 2 * (number of X clients + servers)
netstat -i
  Ierrs, Oerrs or Collis large means the network is overload
  Collis > 10% pkts is bad
netstat -m
  failures means NSTREAM and NSTRPAGES need increasing
netstat -s -p udp
  streams allocation failures > 0 indicates a streams shortage
netstat -m; ps -ef | grep nfsd
  streams failures and all nfsd processes busy at once indicates
    too few nfsd processes for the NFS load,
    and the queued NFS requests are consuming all of the streams memory.
  increase the number of processes on the nfsd command line in /etc/nfs
nfsstat -c
  badxid > 0 and about equal to retrans means the server is not keeping
    up with the client, fix by adding more nfsd processes
nfsstat -c; ps -ef | grep biod
  wait of 0 and the cpu time of at least one biod is much less than the others
    means enough biod processes are running
  high cpu time for all biod processes means more biod processes needed
  biod runs on the client for read-ahead and write-behind
nfsstat -s
  badlen > 0 or xdrcall > 0 means the network is corrupting packets
  commented out in /etc/tcp by default to reduce load
vmstat -s
  large values for
    pages on swap, success in swapping out a process,
    success in swapping in a process,
    swapping out a region or swapping in a region
    means too much swapping
  top shows the processes getting the most cpu time
  check the cpu stats
    a high user percentage shows that the system is cpu-bound
    a high system or wait percentage shows that the system is io-bound
  check the amount of free memory
    there should be a few MB of free memory
  check for run-away processes taking all of the free cpu time
  check for processes that are consuming large amounts of memory
    SIZE is the amount of virtual memory allocated to the process,
       including code and data space
    RES is the amount of physical memory currently used by the process
    RSS (on some versions of top) is the amount of physical memory
       currently used by the process, including shared libraries
    SHARE (on some versions of top) is the amount of shared memory
       currently used by the process
  type a "?" inside top to see the different options
  You can download a top binary for SCO from
  monitor has several screen that show system parameters
  the User Process Monitor screen and the Top CPU Process Monitor screens
    let you type the letter of a process to view more information about it
  You can download the monitor program from
To relink the kernel
  from a command line
    cd /etc/conf/cf.d; ./configure
    and then if you need to relink, continue with
  from a SCO OpenServer system shell
  from a SCO Unix 3.2v4 system shell
  NBUF = 1 KB buffers, def = 10% of RAM
  NHBUFS = num hash buffers = NBUF / 2, def = largest power of 2 >= NBUF / 2
    with SCO MP, def = largest power of 2 >= 2 * NBUF to avoid contention
  PLOWBUFS = buffer cache in first 16 MB or RAM, set to 100 if possible
    1-100, def = 30
    In /usr/adm/messages for a driver, if fts= has a "d" the controller
    is 32 bit, otherwise it is 24 bit and requires an extra copy to process
    data in high buffers.
  NUMPBUF = 16 KB buffers used to prepare scatter/gatter requests
    On Sdsk devices, fts=xxsx, the "s" means support for scatter/gather.
  NAUTOP = seconds to keep a delayed-write buffer in cache, 0-60, def = 10
  BDFLUSHR = flushing interval in seconds, 1-300, def = 30
    buffers cached for NAUTOP + (BDFLUSHR/2) on average
    If processes continuously write large amounts of filesystem data,
    set <= 5 to run bdflush more frequently and avoid large bursts.
  CACHENTS = number of name components in namei cache, 1-4096, def = 800,
    set to 3 X the in-core inode table (reported by sar -v)
    The namei cache maps file name paths to inodes.  Entries are about 40 bytes.
  HASHQS = number of namei hash queues, 1-8191, def = 267, set >= CACHENTS / 3
    Entries are about 8 bytes.
  NHINODE = inode hash table size, power of 2, def = 128
    Set near the maximum value of the dynamically set number of inodes.
  SDKSOUT = number of queued requests for each SCSI disk, 1-256, def = 4
  MAXSLICE = max number of cpu ticks per process time slice
    The default is about 100.  On systems with Sentinel, if "netdsk" takes
    all of the cpu time, reduce to MAXSLICE to 10.
Sample kernel parameters
  Section 12 (Steams)
    Increase NSTRPAGES from 884 to 2048 if you have "watchdog timeout errors"
      This can help with network problems with Intel Ethernet Express cards.
  Increase the maximum process from 16 MB to at least 32 MB [SCO 3.2v4 only]
      Large programs sometimes needs more than 16 MB.
  Increase PROCS/USER from 110 to 150
      This helps if all of the users login using the same account.
  Section 16 (Shared data)
    Increase SHMMAX (maximum shared memory segment size) from 524288 to 2097664
      Some programs need to hold large tables in memory.
  Decrease MAXSLICE from 100 to 10
    Do this only on systems with Sentinel when the "netdsk" process consumes
    an excessive amount of cpu time.  Reducing MAXSLICE limits the amount of
    cpu time a process can use before SCO switches to the next process.
  Increase the number of IO buffers
    The suggestions below are for systems with at least 256 MB RAM.
    Increase NBUF (number of disk buffers) from 6,652 to 30,000
      Set NBUF to about use at least 10% of RAM.  Each buffer is 1 KB.
      Make 100 buffers for each MB of RAM.
    Increase NHBUF (disk buffer hash queues) from 0 (autoconfig) to 65,536
      Set NHBUF to a power of 2.  On a single cpu, set it >= NBUF / 2.
      On MPX, set it >= 2 * NBUF to avoid contention.
    Increase NHINODE (inode hash queues) from 1,024 to 2,048
      Set to a power of 2 near the maximum value of the number of inodes.
    Increase CACHENTS (namei cache buffers) from 800 to 1,024
      Set to 3 X the in-core inode table (reported by sar -v)
      The namei cache maps file name paths to inodes.
      Entries are about 40 bytes.

SCO Performance Guide

Tuning SCO Unix and OpenServer for Fenix

Tuning SCO Open Unix 8 for Linux applications

Tuning SCO Unix and OpenServer for Cleo SNA

Tuning Sun Solaris and SCO OpenServer with SarCheck

Tuning Sun Solaris (Solaris Tunable Parameters Reference Manual) and

Tuning Sun Solaris

Tuning Sun Solaris and

Tuning Sun Solaris for Security

Tuning Sun Solaris TCP/IP Stacks

Tuning Sun Solaris

Tuning Linux

Tuning Linux Servers

Tuning Linux NFS

Tuning Linux for Oracle

Tuning HP-UX, Solaris, AIX and IRIX for Netscape's Calendar Server

Tuning various operating systems for high performance data transfers

Tuning UNIX IP Stacks

Olympus TuneUp for SCO by Pacific CodeWorks monitors SCO Unix 3.2v4 and SCO OpenServer 5 systems, warns about problems by email, and can automatically tune over 75 kernel parameters to maximize system performance. You can download it for a free 30 day evaluation.

SCO Doctor and and

Return to Xenix History xenixhistory.html - Revised September 20, 2006 01:07:05 AM.
Copyright © 2006 William Bader.