Date: Thu, 4 Aug 2005 19:01:29 +0200 From: Claus Guttesen <kometen@gmail.com> To: freebsd-performance@freebsd.org Subject: changing max_connections in postgresql on FreeBSD 5.4 Message-ID: <b41c755205080410013348d0f@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi. I recently lowered max_connections from 1024 to 384 in /usr/local/pgsql/data/postgresql.conf. The server is a quad opteron @ 2 GHz and 4 GB of RAM. This decreased the SIZE and RES values in top and it seems that the current max_connections is more than adequate. To see how many concurrent connections the db-server had I did a 'netstat -na|grep -i establi|wc -l' which showed some 230 established connections during peak. In order to use max_connections set to 1024 I had to raise the following values in the kernel: options SHMMAXPGS=3D327680 options SEMMNI=3D200 options SEMMNS=3D1200 options SEMUME=3D200 options SEMMNU=3D600 The values were taken from the postgresql-ports-installation-notes and were simply increased to fit the max_connections-parameter in postgresql.conf. Will more RAM become available to postgresql if I change the kernel-values mentioned above to half the size? The server does occasionally become loaded with load-averages around 6 or 7 but usually stays below 4. Disk-io is not a problem, usually remains below 1 MB/s, cpu-idle is approx. 5-10 % during peak and around 80 % idle otherwise. regards Claus
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b41c755205080410013348d0f>