X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BFCEED1B904; Thu, 18 Mar 2004 21:09:51 +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 18499-09; Thu, 18 Mar 2004 17:09:53 -0400 (AST) Received: from apate.telenet-ops.be (apate.telenet-ops.be [195.130.132.57]) by svr1.postgresql.org (Postfix) with ESMTP id 84812D1B566; Thu, 18 Mar 2004 17:09:47 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by apate.telenet-ops.be (Postfix) with SMTP id 15C1D37FAF; Thu, 18 Mar 2004 22:09:54 +0100 (MET) Received: from kabel.telenet.be (D5767DEE.kabel.telenet.be [213.118.125.238]) by apate.telenet-ops.be (Postfix) with ESMTP id 76305380C5; Thu, 18 Mar 2004 22:09:53 +0100 (MET) Received: by kabel.telenet.be (Postfix, from userid 501) id 16415158AD5; Thu, 18 Mar 2004 22:09:51 +0100 (CET) Date: Thu, 18 Mar 2004 22:09:51 +0100 From: Kurt Roeckx To: Bruce Momjian Cc: Tom Lane , Mark Kirkwood , pgsql-performance@postgresql.org, PostgreSQL-development Subject: Re: [HACKERS] fsync method checking Message-ID: <20040318210951.GA8784@ping.be> References: <20040318202621.GB8330@ping.be> <200403182034.i2IKYLp27844@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403182034.i2IKYLp27844@candle.pha.pa.us> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/286 X-Sequence-Number: 6142 On Thu, Mar 18, 2004 at 03:34:21PM -0500, Bruce Momjian wrote: > Kurt Roeckx wrote: > > Here are my results on Linux 2.6.1 using cvs version 1.7. > > > > Those times with > 20 seconds, you really hear the disk go crazy. > > > > And I have the feeling something must be wrong. Those results > > are reproducible. > > > > Wow, your O_SYNC times are great. Where can I buy some? :-) > > Anyway, we do need to find a way to test this because obviously there is > huge platform variability. New results with version 1.8: Simple write timing: write 0.150613 Compare fsync times on write() and non-write() descriptor: (If the times are similar, fsync() can sync data written on a different descriptor.) write, fsync, close 9.170472 write, close, fsync 8.851715 Compare one o_sync write to two: one 16k o_sync write 2.617860 two 8k o_sync writes 2.563437 Compare file sync methods with one 8k write: (o_dsync unavailable) open o_sync, write 1.031721 write, fdatasync 25.599010 write, fsync, 26.192824 Compare file sync methods with 2 8k writes: (The fastest should be used for wal_sync_method) (o_dsync unavailable) open o_sync, write 2.268718 write, fdatasync 27.029396 write, fsync, 27.399243