What is the relationship between checkpoint_completion_target and the OS write cache (dirty_background_ratio, dirty_ratio )?

From: "Lazaro Garcia" <lazaro3487(at)gmail(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: What is the relationship between checkpoint_completion_target and the OS write cache (dirty_background_ratio, dirty_ratio )?
Date: 2017-04-05 16:16:35
Message-ID: 002201d2ae28$00f00320$02d00960$@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello everyone, checking the checkpoints theme and the configuration of
memory buffers for writing on to the operating system
(vm.dirty_background_ratio and

Vm.dirty_ratio = 2), I wanted to know what the relationship exists between
these parameters and checkpoint_completion_target, because in this link
https://blog.2ndquadrant.com/basics-of-tuning-checkpoints/ (quite
interesting) mention that they should Configure these kernel parameters to
prevent many dirty pages from accumulating in the cache.

If synchronous_commit = on, it means that each write action will be
persisted in the redo logs before the final commit of the transaction, and
after a checkpoint all the generated Wal will be synchronized with the data
files, then in this scenario:

The bgwriter plays some role during bgwriter_delay by writing the changes of
the shared buffers directly to the data files or the write cache of the
operating system or simply does nothing in synchronous commit mode.

Is Wal_buffers used in synchronous mode?

If after each commit an fsync is executed to write to disk the data
generated by the transaction, what information is stored in the operating
system's write cache, and how much can this value grow if there is write
after each transaction?

Any documentation related to these issues will be well appreciated.

Regards and many thanks to all for your time.

Browse pgsql-admin by date

  From Date Subject
Next Message jeanpierre.carayol 2017-04-05 22:10:41 psqlODBC version 09.06.0200 for Red Hat 6.8.
Previous Message Ertan Küçükoğlu 2017-04-05 12:49:26 Re: PostgreSQL 9.6.1 - Windows 64bit - HDD crash due to power outage