PostgreSQL Shared Memory and Semaphors

pobox at verysmall.org pobox at verysmall.org
Fri Oct 13 09:29:47 PDT 2006


Hello,

I want to increase the max_connections of PostgreSQL from around 40 to 
around 100. For this I need to change the Shared Memory and Semaphores 
settings.

I followed this link -

http://www.postgresql.org/docs/8.1/interactive/kernel-resources.html#SYSVIPC

and used the proposed values in a test installation FreeBSD 5.5, 
PostgreSQL 8.x, with 96 MB RAM (a VMware guest) -

I added -

kern.ipc.shmall=32768
kern.ipc.shmmax=134217728
kern.ipc.semmap=256
to /etc/sysctl.conf

kern.ipc.semmni=256
kern.ipc.semmns=512
kern.ipc.semmnu=256
to /boot/loader.conf

And I changed max_connections = 40 to 100 in postgresql.conf.

Rebooted and all works OK.

Now I want to do the same on a production machine FreeBSD 5.4, 
PostgreSQL 8.x, with 2 GB RAM.

Are there any dangers I should have in mind?

Thank you,
Iv

PS I know that the values can be compiled into the kernel, but I am not 
that good yet.


More information about the freebsd-questions mailing list