Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A11966504ED for ; Tue, 9 Dec 2008 23:06:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 32020-06 for ; Tue, 9 Dec 2008 23:06:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f14.google.com (mail-bw0-f14.google.com [209.85.218.14]) by mail.postgresql.org (Postfix) with ESMTP id E9B756504CC for ; Tue, 9 Dec 2008 23:06:34 -0400 (AST) Received: by bwz7 with SMTP id 7so183037bwz.19 for ; Tue, 09 Dec 2008 19:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=1Jo2GnuN0EmCvcssUEK+6HsCcwkursS/bxP1IfI4fBU=; b=Y64TpH7znL8jjf0tplRSf+XBL12u8NSjwcfNsJh16bmvHxZ78Pu94XjtVlLBkZgkbd CquDiTiOmO5OgWMO+XYxYeuG5csd6NUWIrHZ66vrEQL4Rpzg+aK3mixcVeavTXR1vtah id/DQ0aLqtcBUUUhu6cJejbnupBRClmrN7gn8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=x0J05NN1zyg5AjhB6W7HGW2MmL6mDqxIXRERiLN3FLIcO+yLNcEJMcqBB/3ew7cAfm h9xF3/3sNVZCUMOyIAz0wuAOJ0fPtSlN9FjxQRhhn5lwLYqlkMIm29KRvDgoDdxqt8+e SPv8O1wp5NM5yn5DH0eD7d28xfEFHYU+vxIa8= Received: by 10.223.110.6 with SMTP id l6mr587239fap.53.1228878391941; Tue, 09 Dec 2008 19:06:31 -0800 (PST) Received: by 10.223.106.209 with HTTP; Tue, 9 Dec 2008 19:06:31 -0800 (PST) Message-ID: <603c8f070812091906j2f164215v91c907f8bff8e440@mail.gmail.com> Date: Tue, 9 Dec 2008 22:06:31 -0500 From: "Robert Haas" To: "Scott Carey" Subject: Re: Need help with 8.4 Performance Testing Cc: "Tom Lane" , "jd@commandprompt.com" , "Merlin Moncure" , "Scott Marlowe" , "Jean-David Beyer" , "pgsql-performance@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <603c8f070812091458w14021741s61996a27e94f1c82@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/105 X-Sequence-Number: 32141 > Well, when select count(1) reads pages slower than my disk, its 16x + slower > than my RAM. Until one can demonstrate that the system can even read pages > in RAM faster than what disks will do next year, it doesn't matter much that > RAM is faster. It does matter that RAM is faster for sorts, hashes, and > other operations, but at the current time it does not for the raw pages > themselves, from what I can measure. > > This is in fact, central to my point. Things will be CPU bound, not I/O > bound. It is mentioned that we still have to access things over the bus, > and memory is faster, etc. But Postgres is too CPU bound on page access to > take advantage of the fact that memory is faster (for reading data pages). As I understand it, a big part of the reason for the posix_fadvise patch is that the current system doesn't do a good job leveraging many spindles in the service of a single query. So the problem is not that the CPU overhead is too large in some general sense but that the disk and CPU operations get serialized, leading to an overall loss of performance. On the other hand, there are certainly cases (such as a database which is entirely in RAM, or all the commonly used parts are in RAM) where there really isn't very much I/O, and in those cases of course the CPU cost will dominate. ...Robert