I took the time going thought the list of HP-UX kernel parameters and here are my
suggestions for HP-UX 10.20. Giving accurate figures is hard without knowing the
configuration or load of the machine, but it should give a rought idea on how to
tune HP-UX.
1. Process size
maxdsiz = 0x70000000
Set this to well more than enought. It's sole purpose is to crash a program that
grows large which is a good idea in a multi-user situation but not on single user
workstations or dedicated servers.
2. File limits (see also note 2)
maxfile_lim = 2048
The highest allowed value. Squid needs to be able to have many many files open at
any given time (Squid uses approximately 2.5 times number of active client
connections).
nfile = at least 3000
Must be higher that maxfile_lim + files open by other processes than Squid.
3. Performance paramenters
ninode = at least 8192
Squid uses a lot of different files, and keeping inodes in memory speeds things
up a great deal at the expence of a little memory.
fs_async = 1
faster writes, at the expense of some crash recovery. Worst case is a newfs of
the cache partition in case of a power loss, provided that the machine is
dedicated to Squid and has a separate filesystem for cache + log files. Don't
keep moving data on your OS filesystems.
bufpages or dbc_max_pct = see note 1.
tuned to ensure that the file system buffer leaves enought memory available to
Squid to avoid swapping.
swapmem_on = 1 (the default)
to avoid wasting swap space when most is kept in main memory anyway
Note 1: bufpages & dbc_max_pct
bufpages or dbc_max_pct dictate how much of the main memory that should be used
for file-system buffers. A rule of thumb is that the buffer cache should be no
larger than "total memory - squid process size - other processes - 10MB".
dbc_max_pct is measured in %, bufpages in 4K pages. Only one of them should be
tuned (dbc_max_pct is only used if bufpages is 0).
Note 2: file limits
HP-UX 10.20 supports at most 2048 open files / process. It may be possible to
force 10.20 to support more files but it is not supported and I expect various
applications (or even the kernel) to crash if this is done, but if the machine is
dedicated to Squid it might be worth a try.
In HP-UX 11 the supported limit seems to be as high as 60000 making it a better
choice for applications like Squid who need a huge amount of open files in one
process.
maxfile_lim is also limited by nfile (the global limit) so it is not enought to
rise maxfile_lim alone.
I do not know how HP-UX handles TCP/IP sockets with respect to file tables. From
the information I could find it looks like HP-UX uses a file table entry for each
active socket, and if this is true then nfile (and perhaps maxfile_lim) must be
large enought to accomodate for closing sockets as well as open files/sockets.
Detailed information on each parameter is available in the kernel parameters help
pages in SAM, and from your HP support contact.
-- Henrik Nordström Sparetime Squid HackerReceived on Tue Jul 14 1998 - 09:32:35 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:41:06 MST