Re: max_connections limit - Mailing list pgsql-admin

From Tom Lane
Subject Re: max_connections limit
Date
Msg-id 14484.1050702746@sss.pgh.pa.us
Whole thread Raw
In response to Re: max_connections limit  (Sean Chittenden <sean@chittenden.org>)
Responses Re: max_connections limit  (Sean Chittenden <sean@chittenden.org>)
List pgsql-admin
Sean Chittenden <sean@chittenden.org> writes:
> I wonder how correct the following is:

> SHMMAXPGS = ((max_connections * shared_buffers * 16K) + (wal_buffers *
>     8K) + (max_fsm_relations * 40B) + (max_fsm_pages * 6B)) /
>     page_size

Not very.  shared_buffers are 8K apiece, not 16K, and you don't multiply
them by max_connections.  There *is* a multiplier for max_connections
but I'm not sure what it is --- less than 1K, probably.  Also you should
allow for the lock table, which will be some small multiplier times
max_connections * max_locks_per_transaction.

> SEMMNI = 2 * max_connections (????)
> SEMMSL = SEMMNI
> SHMSEG = 10    # (???? this is a per SysV process setting)
> SEMMNS = 1.5 * max_connections (????)
> SEMMNU = 0.75 * max_connections (????)
> SEMUME = 10 (????)

Dunno where you got these semaphore numbers from, either.

            regards, tom lane


pgsql-admin by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Performance Expectations
Next
From: Sean Chittenden
Date:
Subject: Re: max_connections limit