Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXvim-0000DT-J2 for pgsql-performance@arkaria.postgresql.org; Wed, 09 Apr 2014 16:51:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXvil-0001XU-Rq for pgsql-performance@arkaria.postgresql.org; Wed, 09 Apr 2014 16:51:31 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXvik-0001XO-Um for pgsql-performance@postgresql.org; Wed, 09 Apr 2014 16:51:31 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXvii-0001CX-5f for pgsql-performance@postgresql.org; Wed, 09 Apr 2014 16:51:30 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WXvih-0005yp-Ks; Wed, 09 Apr 2014 12:51:27 -0400 Date: Wed, 9 Apr 2014 12:51:27 -0400 From: Bruce Momjian To: Heikki Linnakangas Cc: Reza Taheri , "pgsql-performance@postgresql.org" Subject: Re: PGSQL, checkpoints, and file system syncs Message-ID: <20140409165127.GD8686@momjian.us> References: <66CE997FB523C04E9749452273184C6C19DAC05A15@exch-mbx-113.vmware.com> <533DA1E4.30401@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <533DA1E4.30401@vmware.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org 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 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