X-Original-To: pgsql-hackers-win32-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6CDAFD1B4DE for ; Fri, 6 Feb 2004 16:09:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 65219-02 for ; Fri, 6 Feb 2004 12:09:27 -0400 (AST) Received: from smtp017.mail.yahoo.com (smtp017.mail.yahoo.com [216.136.174.114]) by svr1.postgresql.org (Postfix) with SMTP id 99E99D1D412 for ; Fri, 6 Feb 2004 12:09:26 -0400 (AST) Received: from unknown (HELO europa.janwieck.net) (janwieck@68.80.245.191 with login) by smtp017.mail.yahoo.com with SMTP; 6 Feb 2004 16:09:19 -0000 Received: from Yahoo.com (ismtp.afilias.com [216.217.55.254]) (authenticated) by europa.janwieck.net (8.11.6/8.11.6) with ESMTP id i16G9Lr13702; Fri, 6 Feb 2004 11:09:21 -0500 Message-ID: <4023ADCE.5000802@Yahoo.com> Date: Fri, 06 Feb 2004 10:07:58 -0500 From: Jan Wieck User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Zeugswetter Andreas SB SD , Bruce Momjian , PostgreSQL-development , PostgreSQL Win32 port list Subject: Re: [HACKERS] Sync vs. fsync during checkpoint References: <46C15C39FEB2C44BA555E356FBCD6FA49620A3@m0114.s-mxs.net> <2297.1075992889@sss.pgh.pa.us> In-Reply-To: <2297.1075992889@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/63 X-Sequence-Number: 603 Tom Lane wrote: > "Zeugswetter Andreas SB SD" writes: >> So Imho the target should be to have not much IO open for the checkpoint, >> so the fsync is fast enough, even if serial. > > The best we can do is push out dirty pages with write() via the bgwriter > and hope that the kernel will see fit to write them before checkpoint > time arrives. I am not sure if that hope has basis in fact or if it's > just wishful thinking. Most likely, if it does have basis in fact it's > because there is a standard syncer daemon forcing a sync() every thirty > seconds. Looking at the response time charts I did for showing how vacuum delay is doing, it seems at least on Linux there is hope that that is the case. Those charts have just a regular 5 minute checkpoint with enough checkpoint segments for that, and no other sync effort done at all. The system has a hard time to handle a larger scaled test DB, so it is definitely well saturated with IO. The charts are here: http://developer.postgresql.org/~wieck/vacuum_cost/ > > That means that instead of an I/O storm every checkpoint interval, > we get a smaller I/O storm every 30 seconds. Not sure this is a big > improvement. Jan already found out that issuing very frequent sync()s > isn't a win. In none of those charts I can see any checkpoint caused IO storm any more. Charts I'm currently doing for 7.4.1 show extremely clear spikes at checkpoints. If someone is interested in those as well I will put them up. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #