Re: [GENERAL] shared_buffers smaller than max_wal_size - Mailing list pgsql-general

From Vladimir Mihailenco
Subject Re: [GENERAL] shared_buffers smaller than max_wal_size
Date
Msg-id CAGzYotdpZxiS1YZ_9tvfMvtiqc6adn63i9=neH69Qbdpzs7QRw@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] shared_buffers smaller than max_wal_size  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: [GENERAL] shared_buffers smaller than max_wal_size
List pgsql-general
Thanks again - for some reason I thought that each page should be fsynced separately...

I am running ZFS and going to try following config on 32gb server:

shared_buffers = 512mb (previously was 6gb)
max_wal_size = 8gb
zfs_arc_max = 24gb

i.e. run with minimal shared buffers and do all the caching in ZFS. As I understand it now such config can provide better results since data will be cached once in ZFS.

On Sun, Sep 24, 2017 at 8:59 PM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
On 09/24/2017 11:03 AM, Vladimir Mihailenco wrote:
> Thanks for your response. Ss I understand it now the difference is
> that checkpoints are synchronous but dirty pages eviction from shared
> buffers are asynchronous, correct? How then Postgres ensures that OS
> writes data to the disk so WAL can be deleted?
>

The last step in a checkpoin is fsync() on the files. Without that, the
checkpoint is considered incomplete and the database won't rely on it.


regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-general by date:

Previous
From: hvjunk
Date:
Subject: [GENERAL] Re: "alter table...if exists... add bigserial "still adds extrasequence
Next
From: John Britto
Date:
Subject: [GENERAL] WAL Archive command.