Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UNgZX-0005sA-1y for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2013 09:35:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UNgZW-0006nT-J1 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2013 09:35:06 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UNgZV-0006mU-P3 for pgsql-hackers@postgresql.org; Thu, 04 Apr 2013 09:35:05 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UNgZR-0003Fh-9m for pgsql-hackers@postgresql.org; Thu, 04 Apr 2013 09:35:05 +0000 Received: from 172.24.2.119 (EHLO szxeml207-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BAC35361; Thu, 04 Apr 2013 17:34:49 +0800 (CST) Received: from SZXEML418-HUB.china.huawei.com (10.82.67.157) by szxeml207-edg.china.huawei.com (172.24.2.56) with Microsoft SMTP Server (TLS) id 14.1.323.7; Thu, 4 Apr 2013 17:34:46 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml418-hub.china.huawei.com (10.82.67.157) with Microsoft SMTP Server id 14.1.323.7; Thu, 4 Apr 2013 17:34:47 +0800 From: Amit Kapila To: "'Greg Smith'" , References: <29181.1363981925@sss.pgh.pa.us> <29748.1363983378@sss.pgh.pa.us> <20130401210920.GC7244@alap2.anarazel.de> <515A1393.9090908@nasby.net> <515CDC20.5090005@2ndQuadrant.com> In-Reply-To: <515CDC20.5090005@2ndQuadrant.com> Subject: Re: Page replacement algorithm in buffer cache Date: Thu, 4 Apr 2013 15:04:46 +0530 Message-ID: <008e01ce3117$a5941fc0$f0bc5f40$@kapila@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac4w1rNS23jEuKUJQHKC1KyUZfT3OAAP3VeQ Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -3.3 (---) 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 Thursday, April 04, 2013 7:19 AM Greg Smith wrote: > On 4/2/13 11:54 AM, Robert Haas wrote: > > 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. > > I was hoping this one would make it to a full six years of being on the > TODO list before it came up again, missed it by a few weeks. The > funniest part is that Amit even submitted a patch on this theme a few > months ago without much feedback: > http://www.postgresql.org/message- > id/6C0B27F7206C9E4CA54AE035729E9C382852FF97@szxeml509-mbs > That stalled where a few things have, on a) needing more regression > test workloads, and b) wondering just what the deal with large > shared_buffers setting degrading performance was. For "b)", below are links where it decreased due to large shared buffers. http://www.postgresql.org/message-id/attachment/27489/Results.htm http://www.postgresql.org/message-id/6C0B27F7206C9E4CA54AE035729E9C38285442C 5@szxeml509-mbx As per my observation, it occur when I/O starts. The dip could be due to fluctuation or may be due to some OS scheduling or it could be due to Eviction of dirty pages sooner than it would otherwise. I think the further investigation can be more meaningful if the results can be taken by someone else other than me. One idea to proceed in this line could be we start with this patch and then based on results, do the further experiments to make it more useful. With Regards, Amit Kapila. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers