Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 57522635067 for ; Mon, 8 Feb 2010 21:18:53 -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 17726-01-2 for ; Tue, 9 Feb 2010 01:18:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yx0-f202.google.com (mail-yx0-f202.google.com [209.85.210.202]) by mail.postgresql.org (Postfix) with ESMTP id 35701633E1F for ; Mon, 8 Feb 2010 21:14:05 -0400 (AST) Received: by yxe40 with SMTP id 40so2955681yxe.19 for ; Mon, 08 Feb 2010 17:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WxrXI8u10loDJISOLiek+gDi9i/gZj2ci0PFuC9Sy5c=; b=OR3IQdGVzq2dgQ3rOXQ8AND+EKF39woAjPzchw4uJ1LlOAY4dSc26mdk8qfg3JWDCw vBwlonRGtLT0kM6sYrMjzs1ijo50pg6m9YloF8sbvC1mVPbjCQb/A/uq2uOtjUXN3AZz e+Fht/KecWMDcQDj+yXLc8EyAD7iZA5UGmEE8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Lm2G7jWmdMhdOZnib3y8Y/nZKsvPTXvzBTNd72EqmuIjh8jDlqfOXk9JPfHC/kXcvV bmy3BPwPeRloIHRTDh/YZSlE+S14BD01wgTL2g3A4tspxuqkFiGY6u4LFqsDw3GG+UBn Ql5gOyDLBCSXXPj/wOCuYDB+OmRC1Ve2A8riQ= MIME-Version: 1.0 Received: by 10.150.239.9 with SMTP id m9mr9963601ybh.223.1265678043638; Mon, 08 Feb 2010 17:14:03 -0800 (PST) In-Reply-To: <4B704EA0.3050906@agliodbs.com> References: <4B6FDD26.9010106@2ndquadrant.com> <4B6FD868020000250002F084@gw.wicourts.gov> <4B702E05.1000708@2ndquadrant.com> <4B704EA0.3050906@agliodbs.com> Date: Mon, 8 Feb 2010 17:14:03 -0800 Message-ID: <70c01d1d1002081714n637a5739wddb5260e25eed3bc@mail.gmail.com> Subject: Re: Linux I/O tuning: CFQ vs. deadline From: Mark Wong To: Josh Berkus Cc: Greg Smith , Kevin Grittner , pgsql-performance@postgresql.org, Albe Laurenz Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.367 tagged_above=-10 required=5 tests=AWL=0.232, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/126 X-Sequence-Number: 37547 On Mon, Feb 8, 2010 at 9:49 AM, Josh Berkus wrote: > >> That's basically what I've been trying to make clear all along: =A0peopl= e >> should keep an open mind, watch what happens, and not make any >> assumptions. =A0There's no clear cut preference for one scheduler or the >> other in all situations. =A0I've seen CFQ do much better, you and Albe >> report situations where the opposite is true. =A0I 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%. =A0If 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: =A0deadline > CFQ > writes: CFQ > deadline > attached storage: =A0deadline > CFQ > > Man, we'd need a lot of testing to settle this. =A0I guess that's why > Linux gives us the choice of 4 ... I wonder what the impact is from the underlying RAID configuration. Those DBT2 tests were also LVM striped volumes on top of single RAID0 LUNS (no jbod option). Regards. Mark