Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] default resource limits

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] default resource limits
Date: 2005-12-24 15:48:24
Message-ID: 15676.1135439304@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Maybe we need to split this into two pieces, given Tom's legitimate 
> concern about semaphore use. How about we increase the allowed range for 
> shared_buffers and max_fsm_pages, as proposed in my patch, and leave the 
> max_connections issue on the table? I also wondered if instead of first 
> setting max_connections and then shared_buffers/max_fsm_pages, we should 
> try to scale them in synch somehow.

The existing initdb code actually does try to scale them in sync to some
extent --- take a closer look at the arguments being passed during the
max-connections test phase.  It won't choose a large max_connections
unless it can simultaneously get 5 times that many shared_buffers.
I think this probably needs to be more aggressive though.  In a
situation of limited SHMMAX it's probably more important to keep
shared_buffers as high as we can than to get a high max_connections.
We could think about increasing the 5x multiplier, adding Min and/or Max
limits, or some combination.

BTW, I fat-fingered the calculations I was doing last night --- the
actual shmem consumption in CVS tip seems to be more like 17K per
max_connection increment, assuming max_locks_per_connection = 64.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2005-12-24 16:57:21
Subject: Re: [PATCHES] default resource limits
Previous:From: Andrew DunstanDate: 2005-12-24 15:35:00
Subject: Re: [PATCHES] default resource limits

pgsql-patches by date

Next:From: Andrew DunstanDate: 2005-12-24 16:57:21
Subject: Re: [PATCHES] default resource limits
Previous:From: Andrew DunstanDate: 2005-12-24 15:35:00
Subject: Re: [PATCHES] default resource limits

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group