Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id EAA212E004C for ; Thu, 15 May 2008 14:42:20 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26096-10 for ; Thu, 15 May 2008 14:42:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id E5E072E0047 for ; Thu, 15 May 2008 14:42:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m4FHg9Nj008797; Thu, 15 May 2008 13:42:09 -0400 (EDT) To: Robert Lor cc: Jan de Visser , Greg Smith , Alvaro Herrera , pgsql-performance@postgresql.org Subject: Re: I/O on select count(*) In-reply-to: <482C6AE4.8020607@sun.com> References: <920841.71690.qm@web44808.mail.sp1.yahoo.com> <482B1D5F.EE98.0025.0@wicourts.gov> <20080515020553.GN9838@alvh.no-ip.org> <1159c1e90805141938j5f85b490rb5c1cfdf9e428bce@mail.gmail.com> <28324.1210834939@sss.pgh.pa.us> <482C6AE4.8020607@sun.com> Comments: In-reply-to Robert Lor message dated "Thu, 15 May 2008 11:55:00 -0500" Date: Thu, 15 May 2008 13:42:09 -0400 Message-ID: <8796.1210873329@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/227 X-Sequence-Number: 30195 Robert Lor writes: > Tom Lane wrote: >> It's certainly true that hint-bit updates cost something, but >> quantifying how much isn't easy. > Maybe we can instrument the code with DTrace probes to quantify the > actual costs. Hmm, the problem would be trying to figure out what percentage of writes could be blamed solely on hint-bit updates and not any other change to the page. I don't think that the bufmgr currently keeps enough state to know that, but you could probably modify it easily enough, since callers distinguish MarkBufferDirty from SetBufferCommitInfoNeedsSave. Define another flag bit that's set only by the first, and test it during write-out. regards, tom lane