Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A16061337BD1 for ; Fri, 5 Nov 2010 17:58:49 -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 21184-04 for ; Fri, 5 Nov 2010 20:58:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mail.postgresql.org (Postfix) with ESMTP id 084FC1337BD2 for ; Fri, 5 Nov 2010 17:58:41 -0300 (ADT) Received: from [75.208.160.232] (232.sub-75-208-160.myvzw.com [75.208.160.232]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Mg2HB-1Oral01udB-00O3iR; Fri, 05 Nov 2010 21:58:40 +0100 Message-ID: <4CD46FFC.9060504@2ndquadrant.com> Date: Fri, 05 Nov 2010 13:58:36 -0700 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Mladen Gogala CC: "pgsql-performance@postgresql.org" Subject: Re: Bufer cache replacement LRU algorithm? References: <4CD18F55.6070100@vmsinfo.com> In-Reply-To: <4CD18F55.6070100@vmsinfo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:+a/qozdU6zrvNKtV6+dO9NQg98m7IAh6H1uFr1ST2Ir bNM2uv74qIZsLZbhIuApDvDmQHlQzC8BTiey49LG2wMzeJ/97K zjOEEL5V8Madsd4f65dzVGtsub3VJvW6L2sr3mf0VVi9D+AJAh kM39llZmg0M8ZvkxcYxuANwtJuWK8wA/odjfgP1bzX45gBSv0i UwwNOX4nkLDiMh+rWy5rKN/paRekmMDKy+BT0uDJcI= 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, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/67 X-Sequence-Number: 41091 Mladen Gogala wrote: > Where can I find the documentation describing the buffer replacement > policy? Are there any parameters governing the page replacement policy? I wrote a pretty detailed description of this in my "Inside the PostgreSQL Buffer Cache" presentation at http://projects.2ndquadrant.com/talks and nothing in this specific area has changed significantly since then. There aren't any specific tunables in this area beyond the ones that cover sizing of the buffer pool and how often checkpoints happen. There's a TODO item to benchmark toward whether there's any gain to increasing the maximum usage count an individual page can accumulate, currently hard coded at 5. That's the main thing that could be tunable in this area that currently isn't. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services and Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books