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 725D0D1ECFC; Thu, 25 Mar 2004 18:53:18 +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 25903-02; Thu, 25 Mar 2004 14:53:22 -0400 (AST) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id CECB4D1ECF6; Thu, 25 Mar 2004 14:53:15 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id i2PIquv29582; Thu, 25 Mar 2004 13:52:56 -0500 (EST) From: Bruce Momjian Message-Id: <200403251852.i2PIquv29582@candle.pha.pa.us> Subject: Re: [HACKERS] fsync method checking In-Reply-To: <200403251716.i2PHGh222327@mail.osdl.org> To: markw@osdl.org Date: Thu, 25 Mar 2004 13:52:56 -0500 (EST) Cc: manfred@colorfullife.com, tgl@sss.pgh.pa.us, josh@agliodbs.com, Q@ping.be, markir@paradise.net.nz, pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org 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/361 X-Sequence-Number: 6217 markw@osdl.org wrote: > > I've made a test run that compares fsync and fdatasync: The performance > > was identical: > > - with fdatasync: > > > > http://khack.osdl.org/stp/290607/ > > > > - with fsync: > > http://khack.osdl.org/stp/290483/ > > > > I don't understand why. Mark - is there a battery backed write cache in > > the raid controller, or something similar that might skew the results? > > The test generates quite a lot of wal traffic - around 1.5 MB/sec. > > Perhaps the writes are so large that the added overhead of syncing the > > inode is not noticable? > > Is the pg_xlog directory on a seperate drive? > > > > Btw, it's possible to request such tests through the web-interface, see > > http://www.osdl.org/lab_activities/kernel_testing/stp/script_param.html > > We have 2 Adaptec 2200s controllers, without the battery backed add-on, > connected to four 10-disk arrays in those systems. I can't think of > anything off hand that would skew the results. > > The pg_xlog directory is not on a separate drive. I haven't found the > best way to lay out of the drives on those systems yet, so I just have > everything on a 28 drive lvm2 volume. We don't actually extend the WAL file during writes (preallocated), and the access/modification timestamp is only in seconds, so I wonder of the OS only updates the inode once a second. What else would change in the inode more frequently than once a second? -- 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