Re: Optimization - Mailing list pgsql-performance

From Nick Fankhauser
Subject Re: Optimization
Date
Msg-id NEBBLAAHGLEEPCGOBHDGOEHOHNAA.nickf@ontko.com
Whole thread Raw
In response to Optimization  ("Justin Long" <justinlong@strategicnetwork.org>)
List pgsql-performance

>Can someone tell me what effective_cache_size should be set to?

You may be able to intuit this from my last post, but if I understand
correctly, what you should be doing is estimating how much memory is likely
to be "left over" for the OS to do disk caching with after all of the basic
needs of the OS, PostgreSQL & any other applications are taken care of. You
then tell postgresql what to expect in terms of caching resources by putting
this number into effective_cache_size, and this allows the query planner
come up with a strategy that is optimized for the expected cache size.

So the "formula" would be: Figure out how much memory is normally in use
allowing adequate margins, subtract this from your total RAM, and make the
remainder your effective_cache size.


-Nick


pgsql-performance by date:

Previous
From: "Nick Fankhauser - Doxpop"
Date:
Subject: Re: Optimization
Next
From: Andrew Sullivan
Date:
Subject: Re: Mapping a database completly into Memory