Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 7102E633E4A for ; Mon, 22 Feb 2010 14:00:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98827-07 for ; Mon, 22 Feb 2010 18:00:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp112.biz.mail.sp1.yahoo.com (smtp112.biz.mail.sp1.yahoo.com [69.147.92.225]) by mail.postgresql.org (Postfix) with SMTP id C2D00633E55 for ; Mon, 22 Feb 2010 14:00:36 -0400 (AST) Received: (qmail 20330 invoked from network); 22 Feb 2010 18:00:35 -0000 Received: from [192.168.7.104] (rm_pg@75.37.19.86 with plain) by smtp112.biz.mail.sp1.yahoo.com with SMTP; 22 Feb 2010 10:00:35 -0800 PST X-Yahoo-SMTP: vGlHhPCswBDHoDrPQ1hdAE8TsaGS X-YMail-OSG: pNTpYzAVM1lUg7WPattRSg.k0rrLwtHwJa1wEaogOwhPl9ghnPH6Ggz4L7RP9rkpiwJTvRuWOn_79B_lKcBfSNhxjWJxnnpNJtjXhV4w97b2aSTSk7Tv1TUuZm8BFMskTdTlCO4GJDw1_mjPXu8mSyVBj8xCZd09RTHqrtwgvFm60zwJt508BIQ_FEankXmQveTyyd8zBaevBFyVNkO8dl04fz0_sJFyqv53q67no.D9tQwZxoc5ae7XaWHYx2GsOU4lJWyoOSUfkWY1CUKitqmE5Zq8TTL208GdSp9Kl75uSb43jLrJPhjIqRnTNBjpZM7MWCWw0naGaJlxGtojPHG3l.fF7uWI6XERYK3yOXpMmmjy5lQch7UlU8BG9kMRU77NQXXuzpdI_EsnHozg X-Yahoo-Newman-Property: ymail-3 Message-ID: <4B82C642.8020409@cheapcomplexdevices.com> Date: Mon, 22 Feb 2010 10:00:34 -0800 From: Ron Mayer User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Bruce Momjian CC: Greg Smith , Ron Mayer , pgsql-performance Subject: Re: SSD + RAID References: <201002221437.o1MEbDJ13005@momjian.us> In-Reply-To: <201002221437.o1MEbDJ13005@momjian.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/299 X-Sequence-Number: 37720 Bruce Momjian wrote: > Greg Smith wrote: >> .... If you have a regular SATA drive, it almost certainly >> supports proper cache flushing.... > > OK, but I have a few questions. Is a write to the drive and a cache > flush command the same? I believe they're different as of ATAPI-6 from 2001. > Which file systems implement both? Seems ZFS and recent ext4 have thought these interactions out thoroughly. Find a slow ext4 that people complain about, and that's the one doing it right :-). Ext3 has some particularly odd annoyances where it flushes and waits for certain writes (ones involving inode changes) but doesn't bother to flush others (just data changes). As far as I can tell, with ext3 you need userspace utilities to make sure flushes occur when you need them. At one point I was tempted to try to put such userspace hacks into postgres. I know less about other file systems. Apparently the NTFS guys are aware of such stuff - but don't know what kinds of fsync equivalent you'd need to make it happen. Also worth noting - Linux's software raid stuff (MD and LVM) need to handle this right as well - and last I checked (sometime last year) the default setups didn't. > I thought a > write to the drive was always assumed to flush it to the platters, > assuming the drive's cache is set to write-through. Apparently somewhere around here: http://www.t10.org/t13/project/d1410r3a-ATA-ATAPI-6.pdf they were separated in the IDE world.