Mikhail <mp39...@gmail.com> writes: > +# OpenBSD 5.5 (2014) gained named POSIX semaphores. They work out of the box > +# without changing any sysctl settings, unlike System V semaphores. > +USE_NAMED_POSIX_SEMAPHORES=1
I tried this on an OpenBSD 6.0 image I had handy. The good news is that it works, and I can successfully start the postmaster with a lot of semaphores (I tried with max_connections=10000) without any special system configuration. The bad news is it's *slow*. It takes the postmaster over a minute to start up at 10000 max_connections, and also about 15 seconds to shut down. The regression tests also appear noticeably slower, even at the default max_connections=100. I'm afraid that those "lots of tiny mappings" that Thomas noted have a nasty impact on our process launch times, since the kernel presumably has to do work to clone them into the child process. Now this lashup that I'm testing on is by no means well suited for performance tests, so maybe my numbers are bogus. Also, maybe it's better in more recent OpenBSD releases. But I think we need to take a harder look at performance before we decide that it's okay to change the default semaphore type for this platform. regards, tom lane