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

default resource limits

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: default resource limits
Date: 2005-12-23 20:38:56
Message-ID: 43AC6060.30203@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

I wrote:

>
>
> Tom Lane wrote:
>
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>  
>>
>>> Nearly everyone seems to agree that the default for max_fsm_pages is 
>>> woefully low, so I would like to have the default for this set 
>>> unconditionally to 200,000 rather than 20,000. The cost would be 
>>> just over 1Mb of shared memory, if the docs are correct. 
>>> Alternatively, we could put this into the mix that is calculated by 
>>> initdb, scaling it linearly with shared_buffers (but with the 
>>> default still at 200,000).
>>>   
>>
>>
>>  
>>
>>> I would also like to propose a more modest increase in 
>>> max_connections and shared_buffers by a factor of 3.
>>>   
>>
>>
>> I don't mind having initdb try larger values to see if they work, but
>> if you are suggesting that we try to force adoption of larger settings
>> I'll resist it.
>>  
>>
>
> OK, works for me. The only thing I suggested might be set in stone was 
> max_fsm_pages; I always envisioned the others being tested as now by 
> initdb.
>
>> "Factor of three" seems mighty weird.  The existing numbers (100 and 
>> 1000)
>> at least have the defensibility of being round.
>>
>>     
>>  
>>
>
> What numbers would you like? If what I suggested seems odd, how about 
> targets of 400 connections, 4000 shared_buffers and 200,000 
> max_fsm_pages?
>
>


Here's a patch that does what I had in mind. On my modest workstation it 
tops out at 400 connections and 2500/125000 
shared_buffers/max_fsm_pages. An idle postmaster with these settings 
consumed less than 4% of the 380Mb of memory, according to top, making 
it still dwarfed by X, mozilla, apache and amavisd among other memory hogs.

Comments welcome.

cheers

andrew

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2005-12-23 20:50:10
Subject: Re: default resource limits
Previous:From: Qingqing ZhouDate: 2005-12-23 20:37:31
Subject: Questions related to xlog

pgsql-patches by date

Next:From: Andrew DunstanDate: 2005-12-23 20:50:10
Subject: Re: default resource limits
Previous:From: Volkan YAZICIDate: 2005-12-23 13:29:40
Subject: Re: tuple count and v3 functions in psql for COPY

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