Re: shared_buffers 8GB maximum - Mailing list pgsql-general

From Vick Khera
Subject Re: shared_buffers 8GB maximum
Date
Msg-id CALd+dceMKo=-tA+w_CavPzF6rSjtkLF6GaanFeH6UCY1NA4izA@mail.gmail.com
Whole thread Raw
In response to Re: shared_buffers 8GB maximum  (Vitaliy Garnashevich <vgarnashevich@gmail.com>)
List pgsql-general
On Sun, Feb 18, 2018 at 7:41 AM, Vitaliy Garnashevich <vgarnashevich@gmail.com> wrote:

In the case when shared_buffers cover most of RAM, most of writes should happen by checkpointer, and cache hit ratio should be high. So a hypothetical question: Could shared_buffers=200GB on a 250 GB RAM server ever be a reasonable setting? (assuming there are no other applications running except postgres, and 50GB is enough for allocating work_mem/maintenance_work_mem and for serving queries)

That amount of shared buffers is not sensible. I found on a 256 GB box that anything over about 50-100GB was counter productive. That was a FreeBSD system where I ran the database on top of ZFS, so there was a lot of data also stored in the ARC (memory cache). There is a setting in postgres to tell it how much RAM your system is using for the disk cache, so set that to a fair estimate of how much your system will use. I set mine to 50% of RAM. I did not limit the cache at the OS level since it is good about giving up that memory for the needs of the running processes.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Need to fix one more glitch in upgrade to -10.2
Next
From: Rich Shepard
Date:
Subject: Re: Need to fix one more glitch in upgrade to -10.2