Re: Setting effective_cache size - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: Setting effective_cache size
Date
Msg-id a65f9c0e0efecf557cbe9ad68888796005e6f176.camel@cybertec.at
Whole thread Raw
In response to Setting effective_cache size  (Nandakumar M <m.nanda92@gmail.com>)
List pgsql-performance
Nandakumar M wrote:
> According to https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server :
> 
> > effective_cache_size should be set to an estimate of how much memory is available for disk caching by the operating
systemand within the database itself, after taking into account what's used by the OS itself and other applications.
 
> 
> I intend to run a java application and postgres server in the same
> server machine. The java application requires 2 GB RAM max.
> 
> Considering that our server machine has 4 GB RAM, should I reduce the
> effective_cache_size to say 768 MB or am I better off with the default
> 4 GB value?
> 
> This is particularly confusing because in this thread Tom Lane says
> the following
> 
> > I see no problem with a value of say 4GB;
> > that's very unlikely to be worse than the pre-9.4 default (128MB) on any modern machine.
> 
> PS : I got the value 768 MB from https://pgtune.leopard.in.ua/#/ by
> giving 1 GB as the amount of memory postgres can use.

I would set effective_cache_size to 2GB or a little lower.

This is a number that tells the optimizer how likely it is to
find index data cached if the index is used repeatedly, so it
is not important to get the value exactly right.

Yours,
Laurenz Albe



pgsql-performance by date:

Previous
From: Nandakumar M
Date:
Subject: Re: Setting effective_cache size
Next
From: Bob Jolliffe
Date:
Subject: Re: How can sort performance be so different