Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7DAF06326B4 for ; Sat, 24 Jul 2010 05:40:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 64362-09 for ; Sat, 24 Jul 2010 08:40:16 +0000 (UTC) X-Greylist: delayed 00:14:30.560273 by SQLgrey-1.7.6 Received: from bifrost.lang.hm (mail.lang.hm [64.81.33.126]) by mail.postgresql.org (Postfix) with ESMTP id 11BD463250C for ; Sat, 24 Jul 2010 05:40:15 -0300 (ADT) Received: from asgard.lang.hm (asgard.lang.hm [10.0.0.100]) by bifrost.lang.hm (8.13.4/8.13.4/Debian-3) with ESMTP id o6O8Pc8D021642; Sat, 24 Jul 2010 01:25:38 -0700 Date: Sat, 24 Jul 2010 01:25:38 -0700 (PDT) From: david@lang.hm X-X-Sender: dlang@asgard.lang.hm To: David Boreham cc: pgsql-performance@postgresql.org Subject: Re: Testing Sandforce SSD In-Reply-To: <4C4A981D.2000605@boreham.org> Message-ID: References: <4C4A9452.9070100@gmail.com> <4C4A981D.2000605@boreham.org> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) 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=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/352 X-Sequence-Number: 39741 On Sat, 24 Jul 2010, David Boreham wrote: >> Do you guys have any more ideas to properly 'feel this disk at its teeth' ? > > While an 'end-to-end' test using PG is fine, I think it would be easier to > determine if the drive is behaving correctly by using a simple test program > that emulates the storage semantics the WAL expects. Have it write a constant > stream of records, fsync'ing after each write. Record the highest record > number flushed so far in some place that won't be lost with the drive under > test (e.g. send it over the network to another machine). > > Kill the power, bring the system back up again and examine what's at the tail > end of that file. I think this will give you the worst case test with the > easiest result discrimination. > > If you want to you could add concurrent random writes to another file for > extra realism. > > Someone here may already have a suitable test program. I know I've written > several over the years in order to test I/O performance, prove the existence > of kernel bugs, and so on. > > I doubt it matters much how long the power is turned of. A second should be > plenty time to flush pending writes if the drive is going to do so. remember that SATA is designed to be hot-plugged, so you don't have to kill the entire system to kill power to the drive. this is a little more ubrupt than the system loosing power, but in terms of loosing data this is about the worst case (while at the same time, it eliminates the possibility that the OS continues to perform writes to the drive as power dies, which is a completely different class of problems, independant of the drive type) David Lang