POSIX semaphores patch

The attache patch enables POSIX semaphores usage during shared memory
access.
It should decrease CPU usage on start-up or online upgrade of
installations
with large caches or large number of workers.

I tested the patch on FreeBSD 8.2. There is no sense to test it on
FreeBSD prior to 7.2 version, since semaphores does not work on these
systems.
You can ensure that there are enough semaphores:
sysctl p1003_1b.sem_nsems_max
By default there should be 32 semaphores. On 8.2+ you can increase them
dynamically. You need one semaphores per shared zone.
“sysctl p1003_1b.nsems” shows current number of semaphores.

It would be intresting to test the patch on other platforms - Linux
and Solaris. Please draw attention to alerts in error_log.
Note also that nginx does not destroy semaphores on exit. They should
deleted by kernel automatically. Please check that there is no
semaphore leakage while nginx work.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs