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 76473D1CA04; Thu, 18 Mar 2004 20:26:29 +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 09466-02; Thu, 18 Mar 2004 16:26:28 -0400 (AST) Received: from adicia.telenet-ops.be (adicia.telenet-ops.be [195.130.132.56]) by svr1.postgresql.org (Postfix) with ESMTP id 07EC3D1D120; Thu, 18 Mar 2004 16:26:21 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by adicia.telenet-ops.be (Postfix) with SMTP id 4C7051F738E; Thu, 18 Mar 2004 21:26:23 +0100 (MET) Received: from kabel.telenet.be (D5767DEE.kabel.telenet.be [213.118.125.238]) by adicia.telenet-ops.be (Postfix) with ESMTP id 0D9641F7261; Thu, 18 Mar 2004 21:26:22 +0100 (MET) Received: by kabel.telenet.be (Postfix, from userid 501) id 8C538158AD5; Thu, 18 Mar 2004 21:26:21 +0100 (CET) Date: Thu, 18 Mar 2004 21:26:21 +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: <20040318202621.GB8330@ping.be> References: <20040318200359.GA8330@ping.be> <200403182009.i2IK9PJ24080@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403182009.i2IK9PJ24080@candle.pha.pa.us> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/283 X-Sequence-Number: 6139 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. Kurt Simple write timing: write 0.139558 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 8.249364 write, close, fsync 8.356813 Compare one o_sync write to two: one 16k o_sync write 28.487650 two 8k o_sync writes 2.310304 Compare file sync methods with one 8k write: (o_dsync unavailable) open o_sync, write 1.010688 write, fdatasync 25.109604 write, fsync, 26.051218 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.212223 write, fdatasync 27.439907 write, fsync, 27.772294