Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C568F65030D for ; Wed, 13 Aug 2008 03:21:14 -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 70855-02 for ; Wed, 13 Aug 2008 03:21:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id C46B064FD34 for ; Wed, 13 Aug 2008 03:17:48 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id m7D6HjPa015578; Wed, 13 Aug 2008 02:17:45 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id m7D6HiYt015574; Wed, 13 Aug 2008 02:17:44 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Wed, 13 Aug 2008 02:17:44 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Ron Mayer cc: Henrik , pgsql-performance@postgresql.org Subject: Re: Filesystem benchmarking for pg 8.3.3 server In-Reply-To: <48A2050D.4050803@cheapcomplexdevices.com> Message-ID: References: <32A7A76B-16CA-4CDB-AD43-973AD6A3FC7B@mac.se> <48A2050D.4050803@cheapcomplexdevices.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.8 tagged_above=0 required=5 tests=SARE_BAYES_7x5=0.8, SARE_BAYES_8x5=0.8, SARE_BAYES_9x5=1.2 X-Spam-Level: ** X-Archive-Number: 200808/145 X-Sequence-Number: 31026 On Tue, 12 Aug 2008, Ron Mayer wrote: > Really old software (notably 2.4 linux kernels) didn't send > cache synchronizing commands for SCSI nor either ATA; but > it seems well thought through in the 2.6 kernels as described > in the Linux kernel documentation. > http://www.mjmwired.net/kernel/Documentation/block/barrier.txt If you've drank the kool-aid you might believe that. When I see people asking about this in early 2008 at http://thread.gmane.org/gmane.linux.kernel/646040 and serious disk driver hacker Jeff Garzik says "It's completely ridiculous that we default to an unsafe fsync." [ http://thread.gmane.org/gmane.linux.kernel/646040 ], I don't know about you but that barrier documentation doesn't make me feel warm and safe anymore. > If you do have a disk where you need to disable write caches, > I'd love to know the name of the disk and see the output of > of "hdparm -I /dev/sd***" to see if it claims to support such > cache flushes. The below disk writes impossibly fast when I issue a sequence of fsync writes to it under the CentOS 5 Linux I was running on it. Should only be possible to do at most 120/second since it's 7200 RPM, and if I poke it with "hdparm -W0" first it behaves. The drive is a known piece of junk from circa 2004, and it's worth noting that it's an ext3 filesystem in a md0 RAID-1 array (aren't there issues with md and the barriers?) # hdparm -I /dev/hde /dev/hde: ATA device, with non-removable media Model Number: Maxtor 6Y250P0 Serial Number: Y62K95PE Firmware Revision: YAR41BW0 Standards: Used: ATA/ATAPI-7 T13 1532D revision 0 Supported: 7 6 5 4 Configuration: Logical max current cylinders 16383 65535 heads 16 1 sectors/track 63 63 -- CHS current addressable sectors: 4128705 LBA user addressable sectors: 268435455 LBA48 user addressable sectors: 490234752 device size with M = 1024*1024: 239372 MBytes device size with M = 1000*1000: 251000 MBytes (251 GB) Capabilities: LBA, IORDY(can be disabled) Standby timer values: spec'd by Standard, no device specific minimum R/W multiple sector transfer: Max = 16 Current = 16 Advanced power management level: unknown setting (0x0000) Recommended acoustic management value: 192, current value: 254 DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=120ns IORDY flow control=120ns Commands/features: Enabled Supported: * SMART feature set Security Mode feature set * Power Management feature set * Write cache * Look-ahead * Host Protected Area feature set * WRITE_VERIFY command * WRITE_BUFFER command * READ_BUFFER command * NOP cmd * DOWNLOAD_MICROCODE Advanced Power Management feature set SET_MAX security extension * Automatic Acoustic Management feature set * 48-bit Address feature set * Device Configuration Overlay feature set * Mandatory FLUSH_CACHE * FLUSH_CACHE_EXT * SMART error logging * SMART self-test -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD