Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYwaC-0006k6-3L for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2015 13:35:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZYwaB-0006Dk-Hh for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Sep 2015 13:35:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZYwYs-0004hu-V8 for pgsql-hackers@postgresql.org; Mon, 07 Sep 2015 13:34:19 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZYwYq-0005Dp-3u for pgsql-hackers@postgresql.org; Mon, 07 Sep 2015 13:34:17 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [186.37.82.172]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 2F9744006E3; Mon, 7 Sep 2015 06:34:14 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 525F9E7A; Mon, 7 Sep 2015 10:34:10 -0300 (CLT) Date: Mon, 7 Sep 2015 10:34:10 -0300 From: Alvaro Herrera To: Andres Freund Cc: Amit Kapila , pgsql-hackers Subject: Re: Speed up Clog Access by increasing CLOG buffers Message-ID: <20150907133410.GO2912@alvherre.pgsql> References: <20150903114137.GE27649@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150903114137.GE27649@awork2.anarazel.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.4 (--) 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 Andres Freund wrote: > The buffer replacement algorithm for clog is rather stupid - I do wonder > where the cutoff is that it hurts. > > Could you perhaps try to create a testcase where xids are accessed that > are so far apart on average that they're unlikely to be in memory? And > then test that across a number of client counts? > > There's two reasons that I'd like to see that: First I'd like to avoid > regression, second I'd like to avoid having to bump the maximum number > of buffers by small buffers after every hardware generation... I wonder if it would make sense to explore an idea that has been floated for years now -- to have pg_clog pages be allocated as part of shared buffers rather than have their own separate pool. That way, no separate hardcoded allocation limit is needed. It's probably pretty tricky to implement, though :-( -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, 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