@@ -2,8 +2,9 @@ This outlines modifications to BSD/OS for running PostgreSQL:
22
331) How to increase resource limits
442) How to increase the number of shared memory buffers
5+ 3) How to increasing the number of semaphores
56
6- Bruce Momjian (pgman@candle.pha.pa.us) 2000-06-09
7+ Bruce Momjian (pgman@candle.pha.pa.us) 2000-07-7
78
89---------------------------------------------------------------------------
910
@@ -44,3 +45,35 @@ plus add 1 for every additional 4MB of shared memory you desire.
4445/sys/i386/i386/i386_param.c:28:#define SYSPTSIZE 0 /* dynamically...
4546
4647sysptsize can not be changed by sysctl on the fly.
48+
49+ ---------------------------------------------------------------------------
50+
51+ 3) How to increasing the number of semaphores.
52+
53+ You may need to increase the number of sysv semaphores. By default,
54+ PostgreSQL allocates 32 semaphores, one for each backend connection.
55+ This is just over half the default system total of 60.
56+
57+ The defaults are in /sys/sys/sem.h:
58+
59+ /* Configuration parameters */
60+ #ifndef SEMMNI
61+ #define SEMMNI 10 /* # of semaphore identifiers */
62+ #endif
63+ #ifndef SEMMNS
64+ #define SEMMNS 60 /* # of semaphores in system */
65+ #endif
66+ #ifndef SEMUME
67+ #define SEMUME 10 /* max # of undo entries per process */
68+ #endif
69+ #ifndef SEMMNU
70+ #define SEMMNU 30 /* # of undo structures in system */
71+ #endif
72+
73+ Set the values you want in your kernel config file, e.g.:
74+
75+ options "SEMMNI=40"
76+ options "SEMMNS=240"
77+ options "SEMUME=40"
78+ options "SEMMNU=120"
79+
0 commit comments