The attache patch enables POSIX semaphores usage during shared memory
It should decrease CPU usage on start-up or online upgrade of
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
You can ensure that there are enough semaphores:
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.