From: dsiebert@icaen.uiowa.edu (Doug Siebert)
Subject: Help in tuning kernel for best performance
Date: Thu, 8 Oct 1992 04:09:33 GMT
Organization: ISCA

The machine in question is an HP 9000/710, with 48M RAM, running HP-UX 8.07.
I'm interesting in tuning the kernel for better performance.  HP-UX supplies
a program called 'sam' to help with kernel configuration (basically keeping
people from being able to do really stupid things, and limiting what options
you can play with)

My question is about two possible tuning parameters.  One enables "software
translation lookaside buffers".  I know what TLBs are in hardware, but what
do they do in software in this instance?  They are 'off' by default, I'm
wondering if I should enable them, and if so what kind of a setting I might
want to try.  The second parameter is the 'timeslice' parameter, which 
governs the maximum amount of time, in milliseconds, a single process is
allowed to run.  Its current value is 100 milliseconds.  I'm more interested
in the second parameter, but I know that small variations in this parameter
can have large effects on the system.

I'm most concerned with getting peak performance for maximum load out of the
system.  The peak load times see 160 users (I'm hoping to go higher in the
future, especially when the machine gets more memory) all running interactive
I/O bound processes.  I've optimized things enough so that by far the major
consumer of CPU time is the terminal I/O (all users come in via telnet, and
use character-at-a-time, this cannot change) and to a lesser extent disk I/O.
It isn't disk bound, since most of the disk I/O is running out of the cache.
Right now when the machine is loaded to 150-160 users I see CPU usage that
averages just under 50%, but varies between 15% - 75%.  The interactive
response time tends to degrade a bit at this point -- the load average runs
fairly low, but after 130 users or so it jumps noticeably, from 2 to 3 up to
around 5 to 6 when 150-160 users are on.  This is partly because of slightly
increased paging activity, because there is no paging at 130 users.  I'm
seeing from 300 to 500 context switches at peak load.

My current theory is that decreasing the timeslice value would help response
time, because there are always a couple of users on the machine doing other,
unrelated tasks, and performance at peak times degrades noticeably if one of
these others users is running a CPU intensive job, such as a compile.  It
seems logical decreasing the timeslice value would reduce the performance hit
when another user is compiling during a peak load time, but hurt that the
performance very little when things are less loaded anyway.

Right now, with free CPU, this probably won't have much of an effect, but in
the future, when more memory is added to this machine, I'd like to increase
the number of simultaneous users greatly, so I'll be much more concerned with
making sure interactive response time doesn't suffer much even as the CPU is
almost fully utilized.

Even if this tuning will do very little to help me in this situation, I'd
still be interesting in learning more about how this variable affects the
overall system performance in various situations (hence the crosspost to
comp.unix.internals)  And I'm still wondering exactly what software TLB's are
and what they can do for me!

-- 
/-----------------------------------------------------------------------------\
| Doug Siebert                             | "I don't have to take this abuse |
| Internet:  dsiebert@isca.uiowa.edu       |  from you - I've got hundreds of |
| NeXTMail:  dsiebert@chop.isca.uiowa.edu  |  people waiting in line to abuse |
|     ICBM:  41d 39m 55s N, 91d 30m 43s W  |  me!"  Bill Murray, Ghostbusters |
\-----------------------------------------------------------------------------/