Kernel options for increasing connections/shared buffers in Postgres

Bob Middaugh bob.middaugh at comcast.net
Fri Aug 17 07:54:48 PDT 2007


Hi everyone,
I'm running OpenNMS on 6.2-Release, and I get this error message when it, I think, tries to hit the postgres DB:

FATAL: "Too many clients"

My guess is I'm getting this because I can't increase max connections and shared buffers in postgresql.conf because I haven't added the kernel options they want, yet.  I've never used Postgres before and my exposure to DB's in general is minimal.  I read somewhere, I forget now, that in order to increase max connections and shared buffers in postgresql.conf, you're supposed to have the following options with these values in your kernel: 
SHMMAXPGS=65536
SEMMNI=40
SEMMNS=240
SEMUME=40
SEMMNU=120

It seems most of the docs for OpenNMS relate to linux or solaris.  Are these values ok for FreeBSD?  

I notice in LINT there are more options:
SEMMAP=31
SEMMSL=61
SEMOPM=101
SHMALL=1025
SHMMAX=(SHMMAXPGS *PAGE_SIZE+1)
SHMMIN=2
SHMMNI=33
SHMSEG=9

I google them, but I'm not real sure what it all means when they're used in conjunction with one another.  Should I be using any of them?  If so, what value, since I'm not using the defaults for the one's postgres wants compiled in.

Before I do this, I wanted to see if this was ok.  This box has 512MB RAM, 1GB swap file and it won't be doing anything other than running postgres server8.1, tomcat 4.1 and opennms 1.2.9.

Thanks,
Bob


More information about the freebsd-questions mailing list