Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bl6bM-0003fZ-OJ for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2016 03:47:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bl6bM-00013H-36 for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2016 03:47:40 +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 1bl6bL-00013A-Ac for pgsql-hackers@postgresql.org; Sat, 17 Sep 2016 03:47:39 +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 1bl6bH-0004N6-3A for pgsql-hackers@postgresql.org; Sat, 17 Sep 2016 03:47:37 +0000 Received: by mail-wm0-x22b.google.com with SMTP id 1so71819628wmz.1 for ; Fri, 16 Sep 2016 20:47:34 -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=tD8UbNocUUl9vmMYHYet/o+693dQpK1tv6OcIAxzwdk=; b=sg7S7NcYQXyUazgFoeNn7+xcorZcIFCZMuIsF/4v/1VvbOsWfygFInx2wOVR6EEroW iUTikTJcQAtAomgUTK7GMcGo7R8tZCaVSeU43YdWuUMc/y1rYae/tD0RA48uZoyK3Bql G7CR2Wum86TFtISzw0V5jzcXMa6dxNDCsema6zZhQaJTK6pvwm1HEH9eOgiVq0iZErxt /X7abMgtXIY9mmK2rVdCMBfueSiPl+/CN9MmyYpT9UysczsslhwyIkProEc1ax7ypB2f HGjn0fM1prL/3VwC8pG1uAPc+Mper+QOh5XfyYAczIF+Av7AGoE0s1yDrL/8hQFdvmAB bw5A== 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=tD8UbNocUUl9vmMYHYet/o+693dQpK1tv6OcIAxzwdk=; b=jhMW606hZwFXD//8afiv9fToYS2miqRKixy75oPl8RW8bzXnrG4QAtRRGHIISgF+gU JLS4LYifMcM/GklH5atIPVva/3+2NBrim07En7uVP6JSXh+lIEEBj/+uBNo0bNpJ7hHQ TgFp/a6Zcgkvjy69rj9wpWWnS7PLB1mGNDKCvyRgS9Coin3071UkdNFGJbsLTBmnMfEB 5wWrWBewpvSBv48kKM58PFhLoMVEfd69KdClv80xtBvgqxUxJyWJ966Ru8MMFz3TA7jQ 8KY5gFql3GyXJAqrSIIYRk2S7xyz4/xZkmYPib0Gcpg89Ad23vaBD4QMUxffNiz5pBBS pLog== X-Gm-Message-State: AE9vXwMLjy0w9IAQ2LBMLlk/biSdLwWpBBFdHd3JrBs61n1G0EYDj9UBp0eeqeDN+zFz7Yx8HGweeEfM5Gs6uAvjXBhnhxPxuL/vqUClqpjksIdVtGdypQyvurQ+yV3kWVRnV1bhdk8b4i6iBXmcf4ulmUWQpTDh9A2Uy3yLRrONcsk0wPu1NLUCXEm+PyaxGphG64ymT4Gf X-Received: by 10.28.23.18 with SMTP id 18mr449555wmx.100.1474084053467; Fri, 16 Sep 2016 20:47:33 -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 lj2sm11075561wjc.38.2016.09.16.20.47.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 20:47:32 -0700 (PDT) Subject: Re: Speed up Clog Access by increasing CLOG buffers To: Robert Haas , Dilip Kumar References: <20150903114137.GE27649@awork2.anarazel.de> <20160330230914.GH13305@awork2.anarazel.de> <20160408153054.hgubabeycowlu3tc@alap3.anarazel.de> <8bab43dd-bc76-0c41-950e-8101269dbf4b@2ndquadrant.com> Cc: Amit Kapila , Andres Freund , pgsql-hackers From: Tomas Vondra Message-ID: <0733fb9c-c3dc-fe30-1ad1-8c3ddf05c92d@2ndquadrant.com> Date: Sat, 17 Sep 2016 05:47:31 +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/14/2016 05:29 PM, Robert Haas wrote: > On Wed, Sep 14, 2016 at 12:55 AM, Dilip Kumar wrote: >> 2. Results >> ./pgbench -c $threads -j $threads -T 10 -M prepared postgres -f script.sql >> scale factor: 300 >> Clients head(tps) grouplock(tps) granular(tps) >> ------- --------- ---------- ------- >> 128 29367 39326 37421 >> 180 29777 37810 36469 >> 256 28523 37418 35882 >> >> >> grouplock --> 1) Group mode to reduce CLOGControlLock contention >> granular --> 2) Use granular locking model >> >> I will test with 3rd approach also, whenever I get time. >> >> 3. Summary: >> 1. I can see on head we are gaining almost ~30 % performance at higher >> client count (128 and beyond). >> 2. group lock is ~5% better compared to granular lock. > > 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. So while it's nice to improve throughput in those cases, it's a bit like a tree falling in the forest without anyone around. 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