Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 564DB632287 for ; Mon, 8 Feb 2010 05:45:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 25344-07 for ; Mon, 8 Feb 2010 09:44:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mail.postgresql.org (Postfix) with ESMTP id 8633A632268 for ; Mon, 8 Feb 2010 05:45:16 -0400 (AST) Received: from [192.168.0.105] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Lu2Cs-1NlOhV2agw-010t6k; Mon, 08 Feb 2010 10:45:12 +0100 Message-ID: <4B6FDD26.9010106@2ndquadrant.com> Date: Mon, 08 Feb 2010 04:45:10 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Linux I/O tuning: CFQ vs. deadline Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX185megekYwGWR/IZu179mSUUPIksxoeBid67+h RGDdP1FCqTyWrKvV2SyuSnBvVHbzBntFC8SDvDOc2lqQPl123n bFraGJzN6i9YSitEbqTvU0/BMIuvR43 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.417 tagged_above=-10 required=5 tests=AWL=0.182, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/118 X-Sequence-Number: 37539 Recently I've made a number of unsubstantiated claims that the deadline scheduler on Linux does bad things compared to CFQ when running real-world mixed I/O database tests. Unfortunately every time I do one of these I end up unable to release the results due to client confidentiality issues. However, I do keep an eye out for people who run into the same issues in public benchmarks, and I just found one: http://insights.oetiker.ch/linux/fsopbench/ The problem analyzed in the "Deadline considered harmful" section looks exactly like what I run into: deadline just does some bad things when the I/O workload gets complicated. And the conclusion reached there, "the deadline scheduler did not have advantages in any of our test cases", has been my conclusion for every round of pgbench-based testing I've done too. In that case, the specific issue is that reads get blocked badly when checkpoint writes are doing heavier work; you can see the read I/O numbers reported by "vmstat 1" go completely to zero for a second or more when it happens. That can happen with CFQ, too, but it consistently seems more likely to occur with deadline. -- Greg Smith 2ndQuadrant Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.com