[squid-users] Outdated information? diskd on FreeBSD 5.3

From: Billy Newsom <[email protected]>
Date: Sun, 19 Dec 2004 17:13:55 -0600

I was wondering if the Squid FAQ has possibly been unchanged for a number of
years. This is regarding section 22, the diskd functions. Do you think that
the numbers recommended might be a little low for most newer systems?

Here are the defaults in a modern kernel, at least on the FreeBSD 5.3 system
I just installed on an i386 system:

# ipcs -Q [For the queues]
msginfo:
  msgmax: 16384 (max characters in a message)
  msgmni: 40 (# of message queues)
  msgmnb: 2048 (max characters in a message queue)
  msgtql: 40 (max # of messages in system)
  msgssz: 8 (size of a message segment)
  msgseg: 2048 (# of message segments in system)

# ipcs -M [For the shared memory]
shminfo:
  shmmax: 33554432(max shared memory segment size)
  shmmin: 1 (min shared memory segment size)
  shmmni: 192 (max number of shared memory identifiers)
  shmseg: 128 (max shared memory segments per process)
  shmall: 8192 (max amount of shared memory in pages)

http://www.squid-cache.org/Doc/FAQ/FAQ-22.html
And now, after the FAQ recommendations:
# ipcs -Q
msginfo:
msgmax: 32768 (max characters in a message)
msgmni: 40 (# of message queues)
msgmnb: 8192 (max characters in a message queue)
msgtql: 2048 (max # of messages in system)
msgssz: 64 (size of a message segment)
msgseg: 512 (# of message segments in system)

# ipcs -M
shminfo:
shmmax: 2097152 (max shared memory segment size)
shmmin: 1 (min shared memory segment size)
shmmni: 32 (max number of shared memory identifiers)
shmseg: 16 (max shared memory segments per process)
shmall: 4096 (max amount of shared memory in pages)

Here is Before and After, in a table

         MESSAGE QUEUES
VALUE: Before After Results
==============================
msgmax: 16384 32768 Higher
msgmni: 40 40 ------
msgmnb: 2048 8192 Higher
msgtql: 40 2048 Higher
msgssz: 8 64 Higher
msgseg: 2048 512 Lower

                   SHARED MEMORY
VALUE: Before After Results
==================================================
shmmax: 33554432(32MB) 2097152 (2MB) LOWER!!
shmmin: 1 1 -------
shmmni: 192 32 LOWER!!
shmseg: 128 16 LOWER!!
shmall: 8192 4096 Lower

My conclusion is that perhaps I should leave alone kernel values which would
end up being lower, but use the FAQ recommendations for any values that
increased. Notice the big difference in the Shared memory settings! The
Squid FAQ will place these values a lot lower than a stock FreeBSD 5.3
system. I have an older FreeBSD system using the older numbers, but I was
considering an update and upgrade to FreeBSD 5.3 it to improve performance.

But as someone may point out, changing the shared memory and message queues
may have no effect on performance, I hesitate to lower the default values of
the kernel. I don't run across many apps which use this memory, so if anyone
knows, I'd like to see what the deal is.

Thanks,
Billy
Received on Sun Dec 19 2004 - 16:13:58 MST

This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:02 MST