Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Date
Msg-id 20130110172607.255780@gmx.com
Whole thread Raw
List pgsql-hackers
Josh Berkus wrote:

> The, shared_buffers, wal_buffers, and effective_cache_size (and possible
> other future settings) can be set to -1. If they are set to -1, then we
> use the figure:
> 
> shared_buffers = available_ram * 0.25
> (with a ceiling of 8GB)
> wal_buffers = available_ram * 0.05
> (with a ceiling of 32MB)
> effective_cache_size = available_ram * 0.75
> (with a floor of 128MB)
> 
> If they are set to an amount, then we use the amount they are set to.
> 
> It would be nice to also automatically set work_mem, maint_work_mem,
> temp_buffers, etc. based on the above, but that would be considerably
> more difficult and require performance testing we haven't done yet.

My starting point for work_mem is usually:

work_mem = available_ram * 0.25 / max_connections

Like everything else, I might adjust from there, but it seems like
a sane starting point. Of course, one could easily argue for a
lower percentage or exclusion of some number of maint_work_mem
allocations.

-Kevin



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump --pretty-print-views
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_dump --pretty-print-views