From: | Roger Wernersson <roger(dot)wernersson(at)mindark(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Semaphores was: Increasing the number of semaphores on FreeBSD 4. 1 (clarification) |
Date: | 2000-11-10 10:55:40 |
Message-ID: | 5146853DD571D411AC54000102070D6101256E@MINGBGNTS02 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Whoa! Shit! I'm working on a system which probably will use ALOT of
semaphores and mutexes. Is this the limits, <1000? I was hoping for
millions. I have asked around but no-one I have asked seems to know the
answer.
I'm using pthreads on Linux right now but will probably use HP-UX, AIX,
True64 or Solaris when going live.
How many semaphores and mutexes can one have, both in theory and
practically?
/Roger
-----Original Message-----
From: Alfred Perlstein [mailto:bright(at)wintelcom(dot)net]
Sent: Friday, November 10, 2000 5:56 AM
To: Philip Hallstrom
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Increasing the number of semaphores on FreeBSD
4.1 (clarification)
* Philip Hallstrom <philip(at)adhesivemedia(dot)com> [001109 20:37] wrote:
>
> > * Philip Hallstrom <philip(at)adhesivemedia(dot)com> [001109 19:12] wrote:
> > > 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?
> >
> > What OS are you using?
>
> FreeBSD 4.1
>
> > > [1]http://postgresql.readysetnet.com/docs/faq-bsdi
> >
> > If it's FreeBSD we've documented the tunables here:
> > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/conf/NOTES?rev=1.857
> >
> > The docs will probably also help if you're using BSD/os.
> >
> > Also you don't want to "go nuts" with raising these values, they
> > can cause the kernel to allocate too much memory for these structures
> > and cause problems booting or running your system.
>
> Yeah, that's what I've seen... I guess I was wondering if there were any
> guidelines to raising them.. I mean should I up the defaults by 10? Or
> up them by a percentage (to keep the relationship), etc...
here's what I use:
options SHMMAXPGS=512000
options SHMSEG=128
options SEMMNI=40 # /* # of semaphore identifiers */
options SEMMNS=240 # /* # of semaphores in system */
options SEMUME=40 # /* max # of undo entries per process
*/
options SEMMNU=120 # /* # of undo structures in system */
I have a gig of RAM though.
--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."
From | Date | Subject | |
---|---|---|---|
Next Message | Vilson farias | 2000-11-10 12:16:47 | Sequencial scan over primary keys |
Previous Message | Chris Picton | 2000-11-10 10:55:04 | bug? |