Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id BBD512E002E for ; Mon, 5 May 2008 20:33:07 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 80364-06 for ; Mon, 5 May 2008 20:32:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from relay-2.mail.nethere.net (relay-2.mail.nethere.net [66.63.128.162]) by developer.postgresql.org (Postfix) with ESMTP id B7AC52E002D for ; Mon, 5 May 2008 20:33:03 -0300 (ADT) Received: from scan-1.mail.nethere.net (scan-1.mail.nethere.net [66.63.128.132]) by relay-2.mail.nethere.net (Postfix) with ESMTP id 4881412B209 for ; Mon, 5 May 2008 16:33:01 -0700 (PDT) Received: from mta-2.mail.nethere.net by scan-1.mail.nethere.net with LMTP id AnWbmGujOEuc; Mon, 5 May 2008 16:33:01 -0700 (PDT) Received: from lisa-james-computer.local (wsip-68-224-174-233.sd.sd.cox.net [68.224.174.233]) by mta-2.mail.nethere.net (Postfix) with ESMTP id 24536130C24 for ; Mon, 5 May 2008 16:33:01 -0700 (PDT) Message-ID: <481F992D.7070509@emolecules.com> Date: Mon, 05 May 2008 16:33:01 -0700 From: Craig James User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: RAID 10 Benchmark with different I/O schedulers (was: Performance increase with elevator=deadline) References: <47FFA7FF.10801@postnewspapers.com.au> <544D07A2-EB3F-4D91-A749-0C4D5D38AB80@gmail.com> In-Reply-To: <544D07A2-EB3F-4D91-A749-0C4D5D38AB80@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/62 X-Sequence-Number: 30030 I had the opportunity to do more testing on another new server to see whether the kernel's I/O scheduling makes any difference. Conclusion: On a battery-backed RAID 10 system, the kernel's I/O scheduling algorithm has no effect. This makes sense, since a battery-backed cache will supercede any I/O rescheduling that the kernel tries to do. Hardware: Dell 2950 8 CPU (Intel 2GHz Xeon) 8 GB memory Dell Perc 6i with battery-backed cache RAID 10 of 8x 146GB SAS 10K 2.5" disks Software: Linux 2.6.24, 64-bit XFS file system Postgres 8.3.0 max_connections = 1000 shared_buffers = 2000MB work_mem = 256MB max_fsm_pages = 1000000 max_fsm_relations = 5000 synchronous_commit = off wal_buffers = 256kB checkpoint_segments = 30 effective_cache_size = 4GB Each test was run 5 times: drop database test create database test pgbench -i -s 20 -U test pgbench -c 10 -t 50000 -v -U test The I/O scheduler was changed on-the-fly using (for example) "echo cfq >/sys/block/sda/queue/scheduler". Autovacuum was turned off during the test. Here are the results. The numbers are those reported as "tps = xxxx (including connections establishing)" (which were almost identical to the "excluding..." tps number). I/O Sched AVG Test1 Test2 Test3 Test4 Test5 --------- ----- ----- ----- ----- ----- ----- cfq 3355 3646 3207 3132 3204 3584 noop 3163 2901 3190 3293 3124 3308 deadline 3547 3923 3722 3351 3484 3254 anticipatory 3384 3453 3916 2944 3451 3156 As you can see, the averages are very close -- closer than the "noise" between runs. As far as I can tell, there is no significant advantage, or even any significant difference, between the various I/O scheduler algorithms. (It also reinforces what the pgbench man page says: Short runs aren't useful. Even these two-minute runs have a lot of variability. Before I turned off AutoVacuum, the variability was more like 50% between runs.) Craig