From: Bruce Momjian <bruce@momjian.us>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Reza Taheri <rtaheri@vmware.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: PGSQL, checkpoints, and file system syncs
Date: Wed, 9 Apr 2014 12:51:27 -0400
Message-ID: <20140409165127.GD8686@momjian.us> (raw)
In-Reply-To: <533DA1E4.30401@vmware.com>
References: <66CE997FB523C04E9749452273184C6C19DAC05A15@exch-mbx-113.vmware.com>
<533DA1E4.30401@vmware.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On Thu, Apr 3, 2014 at 09:01:08PM +0300, Heikki Linnakangas wrote:
> >Is there something I can set in the PGSQL parameters or in the file
> >system parameters to force a steady flow of writes to disk rather
> >than waiting for a sync system call? Mounting with "commit=1" did not
> >make a difference.
>
> Try setting the vm.dirty_bytes sysctl. Something like 256MB might be a
> good starting point.
>
> This comes up fairly often, see e.g.:
> http://www.postgresql.org/message-id/flat/27C32FD4-0142-44FE-8488-9F36
> 6DC75966@mr-paradox.net
Uh, should he set vm.dirty_bytes or vm.dirty_background_bytes? It is my
understanding that vm.dirty_background_bytes starts the I/O while still
accepting writes, while vm.dirty_bytes stops accepting writes during the
I/O, which isn't optimal. See:
https://www.kernel.org/doc/Documentation/sysctl/vm.txt
dirty_bytes
Contains the amount of dirty memory at which a process generating disk
writes will itself start writeback.
dirty_background_bytes
Contains the amount of dirty memory at which the background kernel
flusher threads will start writeback.
I think we want the flusher to be active, not necessarly the writing
process.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: bruce@momjian.us, hlinnakangas@vmware.com, rtaheri@vmware.com
Subject: Re: PGSQL, checkpoints, and file system syncs
In-Reply-To: <20140409165127.GD8686@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox