Thread: max_connections

max_connections

From
"John D. Burger"
Date:
I've recently succeeded in lobbying my sysadmins to upgrade from 7.2.0
to 7.4.8 (thanks to everyone for the advice on how to leverage this).
I'm now fiddling with some of the performance parameters, and I'm
wondering about max_connections.  The default appears to be 100 - this
is at least an order of magnitude higher than I need.  Would much be
saved by dropping this down to 10 or less?  I gather I could dial
shared_buffers up slightly (SHMMAX is 32M on our Solaris boxes), but is
there any substantive benefit to conservatively setting
max_connections?

Thanks.

- John D. Burger
   MITRE



Re: max_connections

From
Tom Lane
Date:
"John D. Burger" <john@mitre.org> writes:
> I'm now fiddling with some of the performance parameters, and I'm
> wondering about max_connections.  The default appears to be 100 - this
> is at least an order of magnitude higher than I need.  Would much be
> saved by dropping this down to 10 or less?

Nothing at all, really, AFAIK; just a little bit of shared memory.

On certain platforms (OS X at least) there is a penalty to oversized
max_connections because each per-backend-slot semaphore is an open file
that has to be passed down when a new backend process is forked.  But
this is not true on Solaris.  I doubt you'd see any difference.

            regards, tom lane