Increasing the number of semaphores on FreeBSD 4.1 (clarification)

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Increasing the number of semaphores on FreeBSD 4.1 (clarification)
Date: 2000-11-10 02:57:54
Message-ID: Pine.BSF.4.21.0011091855160.64891-100000@oddjob.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi -
I recently tried to start postmaster (7.0.2) with -B 128 -N 64 and
got the "semget failed" error. Looking in the faq[1] it says I need to
increase the amount allowed in the kernel. It tells me what I need to do,
but my question is what values should I set them to? Is there any way to
figure it out based on load, etc? Also, are there detrimental effects to
setting them too high?

From the faq:

---------------------------------------------------------------------
3) How to increasing the number of semaphores.

You may need to increase the number of sysv semaphores. By default,
PostgreSQL allocates 32 semaphores, one for each backend connection.
This is just over half the default system total of 60.

The defaults are in /sys/sys/sem.h:

/* Configuration parameters */
#ifndef SEMMNI
#define SEMMNI 10 /* # of semaphore identifiers */
#endif
#ifndef SEMMNS
#define SEMMNS 60 /* # of semaphores in system */
#endif
#ifndef SEMUME
#define SEMUME 10 /* max # of undo entries per process */
#endif
#ifndef SEMMNU
#define SEMMNU 30 /* # of undo structures in system */
#endif

Set the values you want in your kernel config file, e.g.:

options "SEMMNI=40"
options "SEMMNS=240"
options "SEMUME=40"
options "SEMMNU=120"
---------------------------------------------------------------------

Any insight appreciated. Thanks!

[1]http://postgresql.readysetnet.com/docs/faq-bsdi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alfred Perlstein 2000-11-10 03:24:47 Re: Increasing the number of semaphores on FreeBSD 4.1 (clarification)
Previous Message Alfred Perlstein 2000-11-10 01:53:45 Re: Re: Maybe a strange question, but: "How long may a cursor live?"