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-19 00:40:23
Message-ID: 18252.1050712823@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 know they're 8K, but going off of the hint from postgresql.conf, I
> changed it to 16K instead of 2 * 8K:

> #shared_buffers = 64 # 2*max_connections, min 16, typically 8KB each

> Each shared buffer is 8K, need two shared buffers per connection is
> how I read that comment.

It's not very well phrased then. I just updated the comments to look
like this:

#shared_buffers = 64 # min 16, at least max_connections*2, 8KB each
#max_locks_per_transaction = 64 # min 10, ~260*max_connections bytes each
#wal_buffers = 8 # min 4, 8KB each
# fsm = free space map
#max_fsm_relations = 1000 # min 100, ~50 bytes each
#max_fsm_pages = 20000 # min max_fsm_relations*16, 6 bytes each
# note: increasing max_connections also costs about 500 bytes each,
# in addition to costs from shared_buffers and max_locks_per_transaction.

The multipliers for max_connections and max_locks_per_transaction are
based on some experiments I just did (alter parameter, note change in
size of shared memory block...). They're probably somewhat
architecture-dependent, but these should be close enough for the purpose.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Rohitashva Sharma 2003-04-19 10:14:50 Database server in recovery mode
Previous Message Sean Chittenden 2003-04-18 22:09:42 Re: max_connections limit