Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpNbT-00029t-Hq for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Sep 2016 22:45:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpNbS-0002of-P7 for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Sep 2016 22:45:26 +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 1bpNbQ-0002l4-Nt for pgsql-hackers@postgresql.org; Wed, 28 Sep 2016 22:45:24 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bpNbN-00042F-Dm for pgsql-hackers@postgresql.org; Wed, 28 Sep 2016 22:45:24 +0000 Received: by mail-wm0-x231.google.com with SMTP id w72so1493989wmf.0 for ; Wed, 28 Sep 2016 15:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=QsciAuAZZCyNRYKiGXSvCsLaLqZ64+P5uOT5jrRUibI=; b=LEV9IQ704k1owkqnHQWK9XTdOaDTEwlSIr7wijRL4vUor+KEXnUbfAiQkYEiEtNyXr qYr73piJnnQhA0RY1LiVkdAKNbp9QeB1tX1OuPuqpyhdZwHgL/CRbWMds+F8ScyHCRNb 25xWw3HMaIYKJ3oGUaEJg3EJ2ZLKb8/Ki4+935zQG2U0cTXqiiUITUzCt3S3pHhob47I AYe+K1HFkxiolk7yCcJL217IhuIUponrTltB2IKB2W+88pSYmgpkXnwO48KJxagLfgNl a/05PuhbkBLDbeQUcfbUiffNkNr7HvuOnv9ab8H5Bkdf2lSN6mGRdea6kL8ADP0yIo5y FaaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=QsciAuAZZCyNRYKiGXSvCsLaLqZ64+P5uOT5jrRUibI=; b=dv34qG2739UCRVM7LZK6uhOWvel6HWz3oB4I+KA2ZNmY+eeeC7VFZogpRkLjOUFWsA 0eWi4+d08Teou2bfLfgfSqkccyNk9MjZu8nWDdVWjqHHy/EsMSdyPck9hCWMmd1zeXjI ydjpeAV1Uc0mYug+adGAgUl0wPqXBNaYBdmG5gt/SbKQRhxGFUpENjE1oIptVv1XZ2d9 Jcdou+HEPjAo61wlC8ayXGz2O4NHbs2ZeB3Z7B6/B0JEKdD5fautz5MHsZMmCK16TNP4 Qlu5Z+To/rKfz0wiJHoSbvHpBr3CxhfaxAeFTuKWg5D84QM8T7LlgKYpRVwo6N9qSoae 1FKQ== X-Gm-Message-State: AA6/9RmCQeycjiQdgjJSPB9EObLJ54NO1aus+Xmn9qnA6dvMIGXxwIKRJC7mIEY+sIKYqK5xI79wZUmlvXxv6FIw8hDpKc17W+1Pbe7qf7IvO3UDIQZpH3AzCe58sa3PDZPsrFNKrIp0tdSLmRc4BHSFmnvHuYe+2VMhXKRCnLbWR0LGMdtjOqvVLWRbPfhaJAmVH8i+/PYU X-Received: by 10.28.166.196 with SMTP id p187mr9764179wme.121.1475102718829; Wed, 28 Sep 2016 15:45:18 -0700 (PDT) Received: from [10.137.2.17] (ip-89-177-44-58.net.upcbroadband.cz. [89.177.44.58]) by smtp.gmail.com with ESMTPSA id jn7sm10664815wjb.5.2016.09.28.15.45.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2016 15:45:17 -0700 (PDT) Subject: Re: Speed up Clog Access by increasing CLOG buffers To: Robert Haas References: <9e877db7-4dc2-88c1-67ae-034ad1a5cafe@2ndquadrant.com> <26b69fb2-fa4d-530c-7783-1cb9d952c4e5@2ndquadrant.com> <781ac43c-da69-f5c7-a828-7b995691d4cc@2ndquadrant.com> <5da94f12-8141-2f2f-016a-09a8e37bdd30@2ndquadrant.com> <43198bfb-391b-75da-0517-31e56c4d11f4@2ndquadrant.com> Cc: Amit Kapila , Dilip Kumar , Andres Freund , pgsql-hackers From: Tomas Vondra Message-ID: Date: Thu, 29 Sep 2016 00:45:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Thunderbird/46.0a2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 09/28/2016 05:39 PM, Robert Haas wrote: > On Tue, Sep 27, 2016 at 5:15 PM, Tomas Vondra > wrote: >> So, I got the results from 3.10.101 (only the pgbench data), and it looks >> like this: >> >> 3.10.101 1 8 16 32 64 128 192 >> -------------------------------------------------------------------- >> granular-locking 2582 18492 33416 49583 53759 53572 51295 >> no-content-lock 2580 18666 33860 49976 54382 54012 51549 >> group-update 2635 18877 33806 49525 54787 54117 51718 >> master 2630 18783 33630 49451 54104 53199 50497 >> >> So 3.10.101 performs even better tnan 3.2.80 (and much better than 4.5.5), >> and there's no sign any of the patches making a difference. > > I'm sure that you mentioned this upthread somewhere, but I can't > immediately find it. What scale factor are you testing here? > 300, the same scale factor as Dilip. > > It strikes me that the larger the scale factor, the more > CLogControlLock contention we expect to have. We'll pretty much do > one CLOG access per update, and the more rows there are, the more > chance there is that the next update hits an "old" row that hasn't > been updated in a long time. So a larger scale factor also > increases the number of active CLOG pages and, presumably therefore, > the amount of CLOG paging activity. > So, is 300 too little? I don't think so, because Dilip saw some benefit from that. Or what scale factor do we think is needed to reproduce the benefit? My machine has 256GB of ram, so I can easily go up to 15000 and still keep everything in RAM. But is it worth it? regards -- Tomas Vondra 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