Semaphore scaling
Mike Jakubik
mikej at rogers.com
Mon Mar 8 07:04:27 PST 2004
> -----Original Message-----
> From: Doug White [mailto:dwhite at gumbysoft.com]
> Sent: Thursday, March 04, 2004 2:20 PM
> To: mikej at rogers.com
> Cc: stable at freebsd.org
> Subject: Re: Semaphore scaling
>
> Don't crosspost lists. Thanks.
>
> On Thu, 4 Mar 2004 mikej at rogers.com wrote:
>
> > I am running an application (Plesk) on a 4.9 system that is
> eating up
> > all the semaphores and as a result some processes can't run. I have
> > contacted the software company, and they asked me to increase the
> > semaphore limits in the kernel. However their suggested settings
> > seemed very unproportional to me.
> >
> > So my question is, how should I adjust the values, while keeping
> > things in proportion? I wish to increase the default
> semaphore limit
> > of 10 to 20. Can I simply double the semaphore related values?
>
> The semaphore tunables aren't quite as obvious as they look.
> There are limits on the size of various clusters of things
> whos usage is heavily application-dependent. That being said,
> FreeBSD traditionally has very low SYSVSHM/SEM/MSG limits, so
> doubling them should be safe. I suggest using the ipcs(8)
> command to monitor the usage and adjust accordingly.
>
> The Plesk-supplied limits seem OK to me too. I've put
> Oracle-sized values in there and haven't had any bad effects .. yet :)
>
> Note that you can adjust these with loader tunables as well,
> if you don't want to rebuild the kernel. They have the same
> name as the sysctls that show the current values in kern.ipc.
I have adjusted the variables in /etc/sysctl.conf as follows:
kern.ipc.semmap=60
kern.ipc.semmni=20
kern.ipc.semmns=120
kern.ipc.semmnu=60
kern.ipc.semmsl=120
kern.ipc.semopm=200
kern.ipc.semume=20
However, when I do 'sysctl kern.ipc|grep sem' I get the floowing results:
kern.ipc.semmap: 60
kern.ipc.semmni: 10
kern.ipc.semmns: 60
kern.ipc.semmnu: 30
kern.ipc.semmsl: 120
kern.ipc.semopm: 100
kern.ipc.semume: 10
kern.ipc.semusz: 92
kern.ipc.semvmx: 32767
kern.ipc.semaem: 16384
It seems that kern.ipc.semmni is not being incremented. Am I doing something
wrong here? Is this variable not tunable at boot? Interesting enough, these
values in LINT are represented as x+1, i.e. SEMMAP=31 and SEMMNI=11.
Thanks.
More information about the freebsd-stable
mailing list