On Sun, Oct 17, 2021 at 01:36:02PM +0100, Stuart Henderson wrote:
> On 2021/10/17 15:31, Mikhail wrote:
> > Hello, current git of postgresql requires more semaphores than OpenBSD
> > currently suggests as a default, I propose to rise the limit to 100.
> > FreeBSD has 340, as a comparison.
> > 
> > Another solution may be to add the note to README of postgresql's port
> > to rise the limit for the future version, but it looks inconvenient.
> 
> It is there already. Perhaps we could lower the suggested value a bit though:
> 
> $ cvs blame README-server | grep semmns 
> Annotations for README-server
> ***************
> 1.13         (sthen    22-Nov-12):    kern.seminfo.semmns=1024

README talks about busy servers, and implicitly states that OpenBSD
defaults are ok for default configuration, the text can be changed of
course, but I still think that changing OS default is a proper solution.

Full excerpt from README:

Tuning for busy servers
=======================
The default sizes in the GENERIC kernel for SysV semaphores are only
just large enough for a database with the default configuration
(max_connections 40) if no other running processes use semaphores.
In other cases you will need to increase the limits. Adding the
following in /etc/sysctl.conf will be reasonable for many systems:

        kern.seminfo.semmni=60
        kern.seminfo.semmns=1024

Reply via email to