From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Nandakumar M <m(dot)nanda92(at)gmail(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Setting effective_cache size |
Date: | 2019-01-31 11:57:39 |
Message-ID: | a65f9c0e0efecf557cbe9ad68888796005e6f176.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 system and 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
From | Date | Subject | |
---|---|---|---|
Next Message | Bob Jolliffe | 2019-01-31 13:29:59 | Re: How can sort performance be so different |
Previous Message | Pavel Stehule | 2019-01-31 11:49:27 | Re: [HACKERS] proposal: schema variables |