Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1CF5C632D25 for ; Mon, 8 Feb 2010 13:49:38 -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 33231-06 for ; Mon, 8 Feb 2010 17:48:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail128088.authsmtp.com (outmail128088.authsmtp.com [62.13.128.88]) by mail.postgresql.org (Postfix) with ESMTP id 2B1F462DBD5 for ; Mon, 8 Feb 2010 13:49:26 -0400 (AST) Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt8.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o18HnO7Q023739; Mon, 8 Feb 2010 17:49:24 GMT Received: from Sidney-Stratton.local (adsl-63-195-55-98.dsl.snfc21.pacbell.net [63.195.55.98]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o18HnK3V088035; Mon, 8 Feb 2010 17:49:21 GMT Message-ID: <4B704EA0.3050906@agliodbs.com> Date: Mon, 08 Feb 2010 09:49:20 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Greg Smith CC: Kevin Grittner , pgsql-performance@postgresql.org, Albe Laurenz Subject: Re: Linux I/O tuning: CFQ vs. deadline References: <4B6FDD26.9010106@2ndquadrant.com> <4B6FD868020000250002F084@gw.wicourts.gov> <4B702E05.1000708@2ndquadrant.com> In-Reply-To: <4B702E05.1000708@2ndquadrant.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: 4a67d233-14da-11df-97bb-002264978518 X-Report-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkGMA9GIUINWEQN c1ACfh19PVdbHwkA A3YKXF5QWVdzWy1z aBRQZABDZ09QVg11 Uk1LR01SWlppCWRf fR14UhF6dwZDNnZx YUIsWiFdWxB4dkVg Q0oARHAHZDM2dWkY AhJFdwNWcgVOdxhN b1F3GhFYa3VsBg8C MSgJGgV5GTRZNTQd Y0YqZU4PR0cNEWx0 DzssJH0xBgtNSyg6 IxgnLFN0 X-Authentic-SMTP: 61633136333939.1014:706/Kp X-AuthFastPath: 255 X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.198 tagged_above=-10 required=5 tests=AWL=0.401, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/122 X-Sequence-Number: 37543 > That's basically what I've been trying to make clear all along: people > should keep an open mind, watch what happens, and not make any > assumptions. There's no clear cut preference for one scheduler or the > other in all situations. I've seen CFQ do much better, you and Albe > report situations where the opposite is true. I was just happy to see > another report of someone running into the same sort of issue I've been > seeing, because I didn't have very much data to offer about why the > standard advice of "always use deadline for a database app" might not > apply to everyone. Damn, you would have to make things complicated, eh? FWIW, back when deadline was first introduced Mark Wong did some tests and found Deadline to be the fastest of 4 on DBT2 ... but only by about 5%. If the read vs. checkpoint analysis is correct, what was happening is the penalty for checkpoints on deadline was almost wiping out the advantage for reads, but not quite. Those tests were also done on attached storage. So, what this suggests is: reads: deadline > CFQ writes: CFQ > deadline attached storage: deadline > CFQ Man, we'd need a lot of testing to settle this. I guess that's why Linux gives us the choice of 4 ... --Josh Berkus