Setting effective_cache size

From: Nandakumar M <m(dot)nanda92(at)gmail(dot)com>
To: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Setting effective_cache size
Date: 2019-01-31 07:30:36
Message-ID: CANcFUu6GCndxHQyTLdDKizKSsV0OY2mNAJzYiLjowtz9pf5fPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

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.

Regards,
Nanda

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Nandakumar M 2019-01-31 07:34:35 Re: Setting effective_cache size
Previous Message Peter Geoghegan 2019-01-30 23:54:08 Re: How can sort performance be so different