PostgreSQL on FreeBSD

Wayne Pascoe freebsd-questions at penguinpowered.org
Mon Oct 27 04:42:13 PST 2003


Hi all,

I'm trying to configure and tune postgresql on FreeBSD 4.9. We want to
allow at least 128 concurrent connections but preferably 256. 

Looking at the documentation, we should be okay if we set the following
in our kernel to achieve this:

kern.ipc.somaxconn = 512
kern.ipc.shmall = 65536
kern.ipc.shmmni = 128
kern.ipc.semmni = 8
kern.ipc.semmns = 256

Now, I have three questions...

1. Why do we have to set these in the kernel ? Why does setting them in
/etc/sysctl.conf or /etc/loader.conf not work ? 

2. Is there a recommended list of settings that we should use in our
kernel to allow 128 connections and 256 connections ? 

and lastly, 

3. What is the impact on the rest of the system likely to be by setting
aside this memory as shared memory ? Is it then no longer available to
other applications like Apache and Exim ? Are there any other
performance issues that we should be aware of ? 

Regards,

-- 
Wayne Pascoe
Be nice to your daemons.


More information about the freebsd-questions mailing list