Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id DF7A9349F96 for ; Sat, 4 Feb 2012 19:25:30 -0400 (AST) Received: from [2001:1528:137::f1] (helo=mail.gransy.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rtoz2-0000iZ-Ax for pgsql-performance@postgresql.org; Sat, 04 Feb 2012 23:25:30 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id B37B64A200E for ; Sun, 5 Feb 2012 00:25:13 +0100 (CET) Received: from mail.gransy.com ([82.208.29.194]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id 5y0FyihJt4zY for ; Sun, 5 Feb 2012 00:25:13 +0100 (CET) Received: by mail.gransy.com (Postfix, from userid 5000) id A28444A209A; Sun, 5 Feb 2012 00:25:13 +0100 (CET) Received: from [192.168.1.237] (ip-78-45-133-255.net.upcbroadband.cz [78.45.133.255]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 7B0654A200E for ; Sun, 5 Feb 2012 00:25:13 +0100 (CET) Message-ID: <4F2DBE5A.9090102@fuzzy.cz> Date: Sun, 05 Feb 2012 00:25:14 +0100 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: how to demonstrate the effect of direct I/O ? Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:1528:137::f1 (failed) X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201202/24 X-Sequence-Number: 46196 Hi all, I've been running a lot of benchmarks recently (I'll publish the results once I properly analyze them). One thing I'd like to demonstrate is the effect of direct I/O when the wal_fsync_method is set to open_sync/open_datasync. I.e. I'd like to see cases when this improves/hurts performance (compared to fsync/fdatasync) and if/how this works on SSD compared to old-fashioned HDD. But no matter what, I see no significant differences in performance. This is what pg_test_fsync gives on the SSD (Intel 320): open_datasync 12492.192 ops/sec fdatasync 11646.257 ops/sec fsync 9839.101 ops/sec fsync_writethrough n/a open_sync 10420.971 ops/sec and this is what I get on the HDD (7.2k SATA) open_datasync 120.041 ops/sec fdatasync 120.042 ops/sec fsync 48.000 ops/sec fsync_writethrough n/a open_sync 48.116 ops/sec I can post the rest of the pg_test_fsync output if needed. What should I do to see the effect of direct I/O? I'm wondering if I need something like a RAID array or a controller with write cache to see the difference. All this was run on a kernel 3.1.5 using an ext4 filesystem. thanks Tomas