Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiswQ-0005XA-Gv for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Mar 2016 00:15:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aiswP-0002qH-V3 for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Mar 2016 00:15:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aisv4-0001Hh-Jb for pgsql-hackers@postgresql.org; Thu, 24 Mar 2016 00:14:34 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aisv1-0006RL-9P for pgsql-hackers@postgresql.org; Thu, 24 Mar 2016 00:14:34 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 0E4ED3B4A2A; Thu, 24 Mar 2016 01:14:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (pD9F6A70B.dip0.t-ipconnect.de [217.246.167.11]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 1A7BF3B4A2F; Thu, 24 Mar 2016 01:14:26 +0100 (CET) Received: by anarazel.de (Postfix, from userid 1000) id 8799C1001EF; Thu, 24 Mar 2016 01:14:25 +0100 (CET) Date: Thu, 24 Mar 2016 01:14:25 +0100 From: Andres Freund To: Amit Kapila , Jesper Pedersen , Simon Riggs Cc: David Steele , Robert Haas , Thom Brown , Simon Riggs , pgsql-hackers Subject: Re: Speed up Clog Access by increasing CLOG buffers Message-ID: <20160324001425.GE4686@awork2.anarazel.de> References: <56E7032D.6060908@pgmasters.net> <20160322105221.GD3790@awork2.anarazel.de> <20160323204341.GB4686@awork2.anarazel.de> <20160324001055.GD4686@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160324001055.GD4686@awork2.anarazel.de> X-Pg-Spam-Score: -4.2 (----) 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 Hi, On 2016-03-24 01:10:55 +0100, Andres Freund wrote: > I'm afraid that this patch might be putting bandaid on some of the > absolutely worst cases, without actually addressing the core > problem. Simon's patch in [1] seems to come closer addressing that > (which I don't believe it's safe without going doing every status > manipulation atomically, as individual status bits are smaller than 4 > bytes). Now it's possibly to argue that the bandaid might slow the > bleeding to a survivable level, but I have to admit I'm doubtful. > > Here's the stats for a -s 500 run btw: > Performance counter stats for 'system wide': > 18,747 probe_postgres:TransactionIdSetTreeStatus > 68,884 probe_postgres:TransactionIdGetStatus > 9,718 probe_postgres:PGSemaphoreLock > (the PGSemaphoreLock is over 50% ProcArrayLock, followed by ~15% > SimpleLruReadPage_ReadOnly) > > > My suspicion is that a better approach for now would be to take Simon's > patch, but add a (per-page?) 'ClogModificationLock'; to avoid the need > of doing something fancier in TransactionIdSetStatusBit(). > > Andres > > [1]: http://archives.postgresql.org/message-id/CANP8%2Bj%2BimQfHxkChFyfnXDyi6k-arAzRV%2BZG-V_OFxEtJjOL2Q%40mail.gmail.com Simon, would you mind if I took your patch for a spin like roughly suggested above? Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers