Re: [PATCH] Make ENOSPC not fatal in semaphore creation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Make ENOSPC not fatal in semaphore creation
Date
Msg-id 3010886.1634950831@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Make ENOSPC not fatal in semaphore creation  (Mikhail <mp39590@gmail.com>)
Responses Re: [PATCH] Make ENOSPC not fatal in semaphore creation  (Mikhail <mp39590@gmail.com>)
List pgsql-hackers
Mikhail <mp39590@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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: XTS cipher mode for cluster file encryption
Next
From: Noah Misch
Date:
Subject: Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)