Re: [HACKERS] PostgreSQL and Solaris 7?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: t-ishii(at)sra(dot)co(dot)jp
Cc: "Daryl W(dot) Dunbar" <daryl(at)www(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] PostgreSQL and Solaris 7?
Date: 1999-02-11 15:29:15
Message-ID: 14192.918746955@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Broytmann 1999-02-11 15:30:13 Re: your mail
Previous Message Oleg Broytmann 1999-02-11 15:22:10 Re: your mail