From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mikhail <mp39590(at)gmail(dot)com> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Make ENOSPC not fatal in semaphore creation |
Date: | 2021-10-23 01:00:31 |
Message-ID: | 3010886.1634950831@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Mikhail <mp39590(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2021-10-23 01:42:35 | Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers) |
Previous Message | Bruce Momjian | 2021-10-23 00:06:46 | Re: XTS cipher mode for cluster file encryption |