Semaphores was: Increasing the number of semaphores on FreeBSD 4. 1 (clarification) 
Author Message
 Semaphores was: Increasing the number of semaphores on FreeBSD 4. 1 (clarification)

Quote:

> > 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.


Quote:
> 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?

Please don't drop me from the CC' list if you expect me to reply.

As far as system tunables, well, it depends on how much memory you
have available and what the OS is capable of.  I just didn't want
Phill to go nuts and try values that were 1000x some reasonable
figure.  In FreeBSD a lot of it is dynamically allocated so there
shouldn't have been a problem in configuring that many segments/semaphores.

The problem is when you actually use them and you run out of kernel
memory, this is _BAD_ and why there are limits in place on most
systems.

Oh, and I'd take a shot at use FreeBSD in production, we do, Yahoo
does and it kicks butt. :)

bye,
-Alfred



Tue, 29 Apr 2003 23:58:52 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Increasing the number of semaphores on FreeBSD 4.1

2. Increasing the number of semaphores on FreeBSD 4.1 (clarification)

3. How to increase semaphores in NT.

4. Question about LWLockAcquire's use of semaphores instead

5. Semaphores Concept

6. How to use Semaphores with D2.0

7. Semaphores error at initdb

8. Problems with semaphores in Sun.

9. Question about LWLockAcquire's use of semaphores instead of spinlocks

10. Semaphores with RedHat6.1

11. semaphore timeout reading data file

12. UNIX semaphores on HPUX


 
Powered by phpBB® Forum Software