Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A9804133798E for ; Fri, 29 Apr 2011 05:35:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 34841-09 for ; Fri, 29 Apr 2011 08:34:50 +0000 (UTC) X-Greylist: delayed 00:09:42.94067 by SQLgrey-1.7.6 Received: from relay.pcl-ipout01.plus.net (relay.pcl-ipout01.plus.net [212.159.7.99]) by mail.postgresql.org (Postfix) with ESMTP id CA55D1336FA7 for ; Fri, 29 Apr 2011 05:34:49 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAMt0uk3Unw4U/2dsb2JhbAClfnfEfIV6BJJ7igM Received: from outmx08.plus.net ([212.159.14.20]) by relay.pcl-ipout01.plus.net with ESMTP; 29 Apr 2011 09:25:05 +0100 Received: from [80.229.150.39] (helo=server.barnhouse) by outmx08.plus.net with esmtp (Exim) id 1QFj0b-0004MQ-Ey; Fri, 29 Apr 2011 09:25:05 +0100 Received: from [192.168.2.132] (James-PC.barnhouse [192.168.2.132]) by server.barnhouse (Postfix) with ESMTP id 140633A2158; Fri, 29 Apr 2011 09:25:46 +0100 (BST) Message-ID: <4DBA75DC.6070506@mansionfamily.plus.com> Date: Fri, 29 Apr 2011 09:25:00 +0100 From: James Mansion User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Robert Haas CC: Claudio Freire , Tomas Vondra , pgsql-performance@postgresql.org Subject: Re: Performance References: <20110412171855.GA14292@tux> <4DA496FA.3070908@fuzzy.cz> <8F22D592-23C1-4A3C-94A5-48363332ADD3@darkstatic.com> <4DA4BFA2.5060601@fuzzy.cz> <4DA4D40A.4010200@fuzzy.cz> <4DA56DA8020000250003C783@gw.wicourts.gov> <4DA6216E.9020907@fuzzy.cz> <4DA63125.5070106@fuzzy.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/403 X-Sequence-Number: 43465 Robert Haas wrote: > The server can and does measure hit rates for the PG buffer pool, but to my knowledge there is no clear-cut way for PG to know whether read() is satisfied from the OS cache or a drive cache or the platter. > > Does the server know which IO it thinks is sequential, and which it thinks is random? Could it not time the IOs (perhaps optionally) and at least keep some sort of statistics of the actual observed times? It might not be appropriate for the server to attempt auto-tuning, but it might be able to provide some information that can be used by a DBA to make informed decisions. James