Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 735A464FCD3 for ; Fri, 15 Aug 2008 01:39:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 92132-06 for ; Fri, 15 Aug 2008 01:39:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp108.biz.mail.mud.yahoo.com (smtp108.biz.mail.mud.yahoo.com [68.142.201.177]) by postgresql.org (Postfix) with SMTP id 46FD66503A6 for ; Fri, 15 Aug 2008 01:33:30 -0300 (ADT) Received: (qmail 68595 invoked from network); 15 Aug 2008 04:33:29 -0000 Received: from unknown (HELO ?192.168.5.112?) (ramayer@forensiclogic.com@75.37.20.87 with plain) by smtp108.biz.mail.mud.yahoo.com with SMTP; 15 Aug 2008 04:33:28 -0000 X-YMail-OSG: U2hCu1QVM1lOzOzlgJtA3.Ux9q5hdbqUmbgTfaxU7C2bGFs.TY3MOP0zOhSg2G.EC31djpw8zNRpeLGSNXs0j5H4wPc9jIMjwF.eew8R1fGIvki7tVSksOscOoMmOb_vbU8a5ho9GovTAGGIgGOROjU4 X-Yahoo-Newman-Property: ymail-3 Message-ID: <48A50718.5000500@cheapcomplexdevices.com> Date: Thu, 14 Aug 2008 21:33:28 -0700 From: Ron Mayer User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Greg Smith CC: Ron Mayer , pgsql-performance@postgresql.org Subject: Re: Filesystem benchmarking for pg 8.3.3 server References: <32A7A76B-16CA-4CDB-AD43-973AD6A3FC7B@mac.se> <48A2050D.4050803@cheapcomplexdevices.com> <48A2F297.9030703@cheapcomplexdevices.com> <48A36090.6070309@cheapcomplexdevices.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/170 X-Sequence-Number: 31051 Greg Smith wrote: > On Wed, 13 Aug 2008, Ron Mayer wrote: > >> Second of all - ext3 fsync() appears to me to be *extremely* stupid. >> It only seems to correctly do the correct flushing (and waiting) for a >> drive's cache to be flushed when a file's inode has changed. > > This is bad, but the way PostgreSQL uses fsync seems to work fine--if it > didn't, we'd all see unnaturally high write rates all the time. But only if you turn off IDE drive caches. What was new to me in these experiments is that if you touch the inode as described here: http://article.gmane.org/gmane.linux.file-systems/21373 then fsync() works and you can leave the IDE cache enabled; so long as your drive supports the flush command -- which you can see by looking for the drive in the output of: %dmesg | grep 'disabling barriers' JBD: barrier-based sync failed on md1 - disabling barriers JBD: barrier-based sync failed on hda3 - disabling barriers >> So I take back what I said about linux and write barriers >> being sane. They're not. > > Right. Where Linux seems to be at right now is that there's this I almost fear I misphrased that. Apparently IDE drives don't lie (the ones that don't support barriers let the OS know that they don't). And apparently write barriers do work. It's just that ext3 only uses the write barriers correctly on fsync() when an inode is touched, rather than any time a file's data is touched. > then it seems buggy. I personally just ignore the fact that they exist > on ext3, and maybe one day ext4 will get this right. +1