Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UN4CE-0007gi-J0 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Apr 2013 16:36:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UN4CD-0003qP-Jn for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Apr 2013 16:36:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UN4CC-0003qK-Tq for pgsql-hackers@postgresql.org; Tue, 02 Apr 2013 16:36:28 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UN4C7-0000np-Ic for pgsql-hackers@postgresql.org; Tue, 02 Apr 2013 16:36:28 +0000 Received: from intern.anarazel.de (unknown [89.204.139.252]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id A833C4E8003; Tue, 2 Apr 2013 18:36:17 +0200 (CEST) Date: Tue, 2 Apr 2013 18:36:09 +0200 From: Andres Freund To: Tom Lane Cc: Robert Haas , Merlin Moncure , Jim Nasby , Jeff Janes , Ants Aasma , Atri Sharma , Greg Stark , Amit Kapila , PostgreSQL-development Subject: Re: Page replacement algorithm in buffer cache Message-ID: <20130402163609.GG2415@alap2.anarazel.de> References: <20130401210920.GC7244@alap2.anarazel.de> <515A1393.9090908@nasby.net> <3236.1364919723@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3236.1364919723@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2013-04-02 12:22:03 -0400, Tom Lane wrote: > Robert Haas writes: > > But, having said that, I still think the best idea is what Andres > > proposed, which pretty much matches my own thoughts: the bgwriter > > needs to populate the free list, so that buffer allocations don't have > > to wait for linear scans of the buffer array. That's just plain too > > slow. > > I agree in general, though I'm not sure the bgwriter process can > reasonably handle this need along with what it's already supposed to be > doing. We may need another background process that is just responsible > for keeping the freelist populated. What else is the bgwriter actually doing otherwise? Sure, it doesn't put the pages on the freelist, but otherwise its trying to do the above isn't it? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers