Re: [HACKERS] PostgreSQL and Solaris 7? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] PostgreSQL and Solaris 7?
Date
Msg-id 14192.918746955@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] PostgreSQL and Solaris 7?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] PostgreSQL and Solaris 7?
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Ok. If I consider 64 backends, at least following settings would be
> required from your suggestion:

> 64  entries in semaphore map (SEMMAP)
> 64  semaphore identifiers (SEMMNI)
> 64  semaphores in system (SEMMNS)
> 25  max semaphores per id (SEMMSL)

> Is this correct?

No.  You do need SEMMNS >= 64 of course, but Postgres only needs a
sema identifier for each block of 16 semas, so SEMMNI >= 4 will work.
According to my references, the recommended value of SEMMAP is SEMMNI+2
(it's for keeping track of unused "holes" between allocated sema-ID
groups, so that seems like it ought to be enough).  SEMMSL could be as
low as 16, though I see no reason to reduce the default value.

In reality, of course, you had better leave some slop for other Unix
programs to be able to grab semas of their own.  I'd suggest at least
doubling the minimum SEMMNS and SEMMNI.  (On my HP box, ipcs shows
various root-owned subsystems using 6 sema IDs with a total of 8 semas.
So I'd need at least SEMMNS = 72, SEMMNI = 10 to run 64 backends ---
with no margin for error.)

I never understood why the default sema configuration values were so
small anyway --- it's not like a semaphore uses a huge amount of kernel
space...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oleg Broytmann
Date:
Subject: Re: your mail
Next
From: Oleg Broytmann
Date:
Subject: Re: your mail