Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blJre-0006o8-3W for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2016 17:57:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1blJrc-0000yM-Ve for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2016 17:57:21 +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 1blJqE-0007qe-Do for pgsql-hackers@postgresql.org; Sat, 17 Sep 2016 17:55:54 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1blJq9-0002Ik-VB for pgsql-hackers@postgresql.org; Sat, 17 Sep 2016 17:55:51 +0000 Received: by mail-wm0-x22b.google.com with SMTP id k186so92101385wmd.0 for ; Sat, 17 Sep 2016 10:55:49 -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=g2YAQVEtsomegfHAMp+04RveK3wC5YL6ZRJx4xlJ3rc=; b=zI9LBZ5nCqu3d+wwI4irQqT8Bowga3moFWWmSuVSOSw0233pawu2/FJsLBsjJRiOzX IiqU8ouEF8RRc21+tMB159q1Y8oSTjXZJ13pj3ogSx/E5glETRoxVflQMn1bCQN3crvy /eGDWbhyymZVjwyWTohTVrW5UrG8laTt6aswyP8Dc0Z2XbEaeTbhe1wPcfNSJYZ5Qun8 MAp7AaVV0wel0T65h8GiurTErKAFEdHq7YAPA9cgDQWuy9NnuaGXvuK4NAItPgILgbyg YZnkerzTjWZfn0AKIRD7n2B/vogIPW8mDFDUW9BlgCNv4hRoLNMHFwjJ+YOhWs7TU5RT Hc5w== 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=g2YAQVEtsomegfHAMp+04RveK3wC5YL6ZRJx4xlJ3rc=; b=jutoQufY0AY6d29epEyrpntI0RKIV6VMyVV87mD34/9dcLXFlTzv45PZffY8+NIvHU Wgcp5tKa/p1Zs7/RleC3Bvs5OIFPi/ikvY1SDEZb//4KbhkW/7f5PUEWLFwM6r8QMmLJ 980c8rfmXWHtOCXpbv7NwqjJhK5j13Ws4YvOIgJM/9zpMBYER5XTRk+idtAM4rR5jrON URY0gvbmyTWRgApbY2b6V9J5RyL5np9eauXAI435EWlPyHHCN55VhUvyVChenjwTI8FY 3VFMOKIUpVU4c1RvYOORX/NLXo309ScQCJSrYX17M6FDdm2VKHAm8TuRDc/1Mc2nlu/j GCuA== X-Gm-Message-State: AE9vXwOyyYybNza1FspN+2dStvO1tXPBrQu7fqQ+G6744H/ALPvkkJWN/SCJatRAuHhmrPGpD4X+9wP0+nluF87RLvAJYdIV1OB5aVamx+u8O5aGXlnq8K3LvSTSai9VySAOaZ4OXqm/ze3wtrRmPUMR8YQm26rP3ojxMO8En8yBo8FL0BPP3rk787KefkWSGOONVJF5+d4o X-Received: by 10.194.231.99 with SMTP id tf3mr16904096wjc.61.1474134947982; Sat, 17 Sep 2016 10:55:47 -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 4sm13089570wmu.2.2016.09.17.10.55.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Sep 2016 10:55:46 -0700 (PDT) Subject: Re: Speed up Clog Access by increasing CLOG buffers To: Amit Kapila References: <20150903114137.GE27649@awork2.anarazel.de> <20160330230914.GH13305@awork2.anarazel.de> <20160408153054.hgubabeycowlu3tc@alap3.anarazel.de> <8bab43dd-bc76-0c41-950e-8101269dbf4b@2ndquadrant.com> <0733fb9c-c3dc-fe30-1ad1-8c3ddf05c92d@2ndquadrant.com> Cc: Robert Haas , Dilip Kumar , Andres Freund , pgsql-hackers From: Tomas Vondra Message-ID: <3dfb27e5-d3d3-20bb-2b35-3a0e2747625f@2ndquadrant.com> Date: Sat, 17 Sep 2016 19:55:44 +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/17/2016 07:05 AM, Amit Kapila wrote: > On Sat, Sep 17, 2016 at 9:17 AM, Tomas Vondra > wrote: >> On 09/14/2016 05:29 PM, Robert Haas wrote: ... >>> Sure, but you're testing at *really* high client counts here. >>> Almost nobody is going to benefit from a 5% improvement at 256 >>> clients. You need to test 64 clients and 32 clients and 16 >>> clients and 8 clients and see what happens there. Those cases are >>> a lot more likely than these stratospheric client counts. >>> >> >> Right. My impression from the discussion so far is that the patches >> only improve performance with very many concurrent clients - but as >> Robert points out, almost no one is running with 256 active >> clients, unless they have 128 cores or so. At least not if they >> value latency more than throughput. >> > > See, I am also not in favor of going with any of these patches, if > they doesn't help in reduction of contention. However, I think it is > important to understand, under what kind of workload and which > environment it can show the benefit or regression whichever is > applicable. Sure. Which is why I initially asked what type of workload should I be testing, and then done the testing with multiple savepoints as that's what you suggested. But apparently that's not a workload that could benefit from this patch, so I'm a bit confused. > Just FYI, couple of days back one of EDB's partner who was doing the > performance tests by using HammerDB (which is again OLTP focussed > workload) on 9.5 based code has found that CLogControlLock has the > significantly high contention. They were using synchronous_commit=off > in their settings. Now, it is quite possible that with improvements > done in 9.6, the contention they are seeing will be eliminated, but > we have yet to figure that out. I just shared this information to you > with the intention that this seems to be a real problem and we should > try to work on it unless we are able to convince ourselves that this > is not a problem. > So, can we approach the problem from this direction instead? That is, instead of looking for workloads that might benefit from the patches, look at real-world examples of CLOG lock contention and then evaluate the impact on those? Extracting the workload from benchmarks probably is not ideal, but it's still better than constructing the workload on our own to fit the patch. FWIW I'll do a simple pgbench test - first with synchronous_commit=on and then with synchronous_commit=off. Probably the workloads we should have started with anyway, I guess. 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