Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A4D531337B50 for ; Wed, 13 Oct 2010 00:23:11 -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 65211-04 for ; Wed, 13 Oct 2010 03:23:04 +0000 (UTC) X-Greylist: delayed 00:06:37.048147 by SQLgrey-1.7.6 Received: from smtp113.biz.mail.mud.yahoo.com (smtp113.biz.mail.mud.yahoo.com [209.191.68.78]) by mail.postgresql.org (Postfix) with SMTP id 0EA461336705 for ; Wed, 13 Oct 2010 00:23:03 -0300 (ADT) Received: (qmail 71820 invoked from network); 13 Oct 2010 03:16:23 -0000 Received: from [192.168.7.104] (rm_pg@75.36.177.178 with plain) by smtp113.biz.mail.mud.yahoo.com with SMTP; 12 Oct 2010 20:16:23 -0700 PDT X-Yahoo-SMTP: vGlHhPCswBDHoDrPQ1hdAE8TsaGS X-YMail-OSG: VBgPyYgVM1kY8bUrADaQaz_B42TixWkDUut_YEZDUlZ.H8o sCh5C5uHnagmDVjugVuim.MMnM3.R7r8YIescyO1s5sG7kDyU9qBq.M18yoy oY4zZMkrzna5U6d3d3_oVwiUGoQ58sVodHcW4X8Are.uA6aH7hV.IZjoLHWp 0wzjTHWjquxmncNJpPdYDJqDhxAUXAV1L9lOUycVSIGCYnOByKTJ1QmnlnZC uTI6P5hfyWhEbnPlroTzeS8GBQzK9gcGAZYKzwryAPtPDMbuIiN.lwRVovxz CUDhcaYQrU4x06fKECmT07g-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4CB52489.8050309@cheapcomplexdevices.com> Date: Tue, 12 Oct 2010 20:16:25 -0700 From: Ron Mayer User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-performance@postgresql.org, gnuoytr@rcn.com, Ron Mayer Subject: Re: How does PG know if data is in memory? References: <4CA9488C.2080502@2ndquadrant.com> <4CAA5974.2050805@wizmail.org> <20101011231134.ANB76937@ms14.lnh.mail.rcn.net> <4CB42BFC0200002500036805@gw.wicourts.gov> In-Reply-To: <4CB42BFC0200002500036805@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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: 201010/190 X-Sequence-Number: 40609 Kevin Grittner wrote: > > ...Sybase named caches...segment off portions of the memory for > specific caches... bind specific database > objects (tables and indexes) to specific caches. ... > > When I posted to the list about it, the response was that LRU > eviction was superior to any tuning any human would do. I didn't > and don't believe that.... > > FWIW, the four main reasons for using it were: > (1) Heavily used data could be kept fully cached in RAM... Lightly-used-but-important data seems like another use case. LRU's probably far better than me at optimizing for the total throughput and/or average response time. But if there's a requirement: "Even though this query's very rare, it should respond ASAP, even at the expense of the throughput of the rest of the system." it sounds like this kind of hand-tuning might be useful.