Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cK3Qz-0008Pv-Ty for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Dec 2016 13:29:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cK3Qy-0002hl-Rj for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Dec 2016 13:29:24 +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_2) (envelope-from ) id 1cK3Qx-0002h4-Cx for pgsql-hackers@postgresql.org; Thu, 22 Dec 2016 13:29:23 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cK3Qt-0004JZ-F2 for pgsql-hackers@postgresql.org; Thu, 22 Dec 2016 13:29:22 +0000 Received: by mail-wm0-x22f.google.com with SMTP id g23so175780277wme.1 for ; Thu, 22 Dec 2016 05:29:19 -0800 (PST) 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=RrBBKDfjGnB3pZHUH9+X12ZcvQjvPmw4R9fwyxcDc0E=; b=W8cas75H8XWrXP8OZhvILwqjzsyrv0woYzMzWEh+FVS433+im03o/zKfXp2SNkN2+p wOME+nZ0xksntWtposwz+7OQhfyl4hzQrjvVgVTf6S+oXlTqlSlQs9yMIncp8Ec7IF2J U4Ad+2WMsh9vEiXk+9LWO/ExvBNWHBvh6DCFJP3agRRjW2cV7Y2Zj5PT+9HvROg4zY/p 4U+dZI+G6FQK+nRlwwpCaK1O6jKLlS7o9EsK3QPboQVbXy0hXUe3Y8VhjSFwJ8RA1vxT vy2yQEx4UNLIEBrQwMErJsGbXGxv+rW06CpOYP6dq6oGAGJ/H2ZAmK9YLF3A65UyWYJS umqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=RrBBKDfjGnB3pZHUH9+X12ZcvQjvPmw4R9fwyxcDc0E=; b=MLwOpbd4kqcIv7jxWt5qDid4dN2Px7vnCECYBZvZrhvOGIqpJpKMeRFR3evFYuLbr+ RDWBg5RH/p5Vks+nkxOXECwaNI7lccmWIQ3ExjY+5en54kDh9N26FILWfWHyRGh+VzjB rw8sYLwHjiEOpnArmZK4yVULHCZP6IgWERw0fqRJk3gzdwqhcg6kAKnUy0AEFTFuMbul LJlUCv9hwLB1o/ZGVn+Oc6AmK9IUEEc+acMl4SO/7/HJXICDK7o6P2XdEUJAnPNi8+EY 4nAVBYr6z6EIWW5ji0TuSOpaH4rqKw/TwtzkR69Do+eZrrDIdfLwh0L6DFRetjEXqnOc XVag== X-Gm-Message-State: AIkVDXIRLwLDURvCIzQy70pcwCDG1BLvytdhD4fdnrxg4lzhGRZFE8tTO8Q2k7nhHgfKrEyLdEZGTqRuoW2SUhXWddqjOefjWE+sE1PwZb/I1/ZRV3ysFp+iwftdCdx1Ir+rb+r1uOyDx8joiO3+GN4ItzwsVVtzdBHIFCVtYM69ddIyXUXThDpxaaCPrEM7HH+rplpVJjEt X-Received: by 10.28.175.204 with SMTP id y195mr9930132wme.106.1482413357207; Thu, 22 Dec 2016 05:29:17 -0800 (PST) Received: from [10.137.2.17] (ip-89-177-46-65.net.upcbroadband.cz. [89.177.46.65]) by smtp.gmail.com with ESMTPSA id v202sm32011298wmv.8.2016.12.22.05.29.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Dec 2016 05:29:16 -0800 (PST) Subject: Re: Speed up Clog Access by increasing CLOG buffers To: Amit Kapila References: <4a52a34f-57fa-7bcf-d34c-c15db40f0361@2ndquadrant.com> <956b695d-f6c5-d652-bf0c-cea95981547c@BlueTreble.com> <5275bf49-545e-e189-48c5-17b5defc45a2@2ndquadrant.com> <04e39ac9-af28-0fda-8f72-7268197d281f@2ndquadrant.com> Cc: Robert Haas , Jim Nasby , Dilip Kumar , Andres Freund , pgsql-hackers From: Tomas Vondra Message-ID: <84c22fbb-b9c4-a02f-384b-b4feb2c67193@2ndquadrant.com> Date: Thu, 22 Dec 2016 14:29:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <04e39ac9-af28-0fda-8f72-7268197d281f@2ndquadrant.com> 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 Hi, > The attached results show that: > > (a) master shows the same zig-zag behavior - No idea why this wasn't > observed on the previous runs. > > (b) group_update actually seems to improve the situation, because the > performance keeps stable up to 72 clients, while on master the > fluctuation starts way earlier. > > I'll redo the tests with a newer kernel - this was on 3.10.x which is > what Red Hat 7.2 uses, I'll try on 4.8.6. Then I'll try with the patches > you submitted, if the 4.8.6 kernel does not help. > > Overall, I'm convinced this issue is unrelated to the patches. I've been unable to rerun the tests on this hardware with a newer kernel, so nothing new on the x86 front. But as discussed with Amit in Tokyo at pgconf.asia, I got access to a Power8e machine (IBM 8247-22L to be precise). It's a much smaller machine compared to the x86 one, though - it only has 24 cores in 2 sockets, 128GB of RAM and less powerful storage, for example. I've repeated a subset of x86 tests and pushed them to https://bitbucket.org/tvondra/power8-results-2 The new results are prefixed with "power-" and I've tried to put them right next to the "same" x86 tests. In all cases the patches significantly reduce the contention on CLogControlLock, just like on x86. Which is good and expected. Otherwise the results are rather boring - no major regressions compared to master, and all the patches perform almost exactly the same. Compare for example this: * http://tvondra.bitbucket.org/#dilip-300-unlogged-sync * http://tvondra.bitbucket.org/#power-dilip-300-unlogged-sync So the results seem much smoother compared to x86, and the performance difference is roughly 3x, which matches the 24 vs. 72 cores. For pgbench, the difference is much more significant, though: * http://tvondra.bitbucket.org/#pgbench-300-unlogged-sync-skip * http://tvondra.bitbucket.org/#power-pgbench-300-unlogged-sync-skip So, we're doing ~40k on Power8, but 220k on x86 (which is ~6x more, so double per-core throughput). My first guess was that this is due to the x86 machine having better I/O subsystem, so I've reran the tests with data directory in tmpfs, but that produced almost the same results. Of course, this observation is unrelated to this patch. 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