Re: max_connections limit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: Babak Badaei <babak(at)hemaka(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: max_connections limit
Date: 2003-04-18 21:52:26
Message-ID: 14484.1050702746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Sean Chittenden <sean(at)chittenden(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sean Chittenden 2003-04-18 22:09:42 Re: max_connections limit
Previous Message Steve Crawford 2003-04-18 20:35:05 Re: Performance Expectations