X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5DCC7D1E2AA for ; Thu, 18 Mar 2004 18:40:50 +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 69856-03 for ; Thu, 18 Mar 2004 14:40:45 -0400 (AST) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 7A298D1B4BA for ; Thu, 18 Mar 2004 14:40:38 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id i2IIeh309334; Thu, 18 Mar 2004 13:40:43 -0500 (EST) From: Bruce Momjian Message-Id: <200403181840.i2IIeh309334@candle.pha.pa.us> Subject: Re: fsync method checking In-Reply-To: <4059E912.2050509@dunslane.net> To: Andrew Dunstan Date: Thu, 18 Mar 2004 13:40:43 -0500 (EST) Cc: PostgreSQL-development X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/818 X-Sequence-Number: 51410 Andrew Dunstan wrote: > > > Bruce Momjian wrote: > > >I have been poking around with our fsync default options to see if I can > >improve them. One issue is that we never default to O_SYNC, but default > >to O_DSYNC if it exists, which seems strange. > > > >What I did was to beef up my test program and get it into CVS for folks > >to run. What I found was that different operating systems have > >different optimal defaults. On BSD/OS and FreeBSD, fdatasync/fsync was > >better, but on Linux, O_DSYNC/O_SYNC was faster. > > > >[snip] > > > >Linux 2.4.9: > > > > > > This is a pretty old kernel (I am writing from a machine running 2.4.22) > > Maybe before we do this for Linux testing on a more modern kernel might > be wise. Sure, I am sure someone will post results. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073