Re: max_connections limit - Mailing list pgsql-admin

From Tom Lane
Subject Re: max_connections limit
Date
Msg-id 18252.1050712823@sss.pgh.pa.us
Whole thread Raw
In response to Re: max_connections limit  (Sean Chittenden <sean@chittenden.org>)
List pgsql-admin
Sean Chittenden <sean@chittenden.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


pgsql-admin by date:

Previous
From: Sean Chittenden
Date:
Subject: Re: max_connections limit
Next
From: Rohitashva Sharma
Date:
Subject: Database server in recovery mode