Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1KHM-0007aY-UF for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Oct 2016 21:38:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c1KHM-0003qg-3o for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Oct 2016 21:38:04 +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 1c1KFx-0002JO-C2 for pgsql-hackers@postgresql.org; Mon, 31 Oct 2016 21:36:37 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1c1KFu-0002Eo-4S for pgsql-hackers@postgresql.org; Mon, 31 Oct 2016 21:36:36 +0000 Received: by mail-wm0-x234.google.com with SMTP id n67so253769835wme.1 for ; Mon, 31 Oct 2016 14:36:33 -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=LORDaXWNXeFu8xi/Mlwt10isq0FqusYeDGGQSdZg0vg=; b=2TzBTdTv6DykYjWxdgTGtU2MDXE2nhMl45nNSi1/n/5KEGr61O2upsZVKd6VpZ+XGe dBwlnhAHQL/U0Wp7UkToIO/R7DSJ32ujU9GTAmv1Y9lQvzBlrZaQ8wOMhT8OzFjr/2Zt AjnJrW+9IFFEMSIY2XLLucBOp7DvhT2ghcnV7XuLEI08aN1+q0Fb0bwwW/A4wfyYuR2X BKfFSEn9LjlRDd3Gy6b+ILr0T3toK6lY/tn1p8WkV/01Jx2UP9+nvgVp1W06YmzcZf0k EbqIJKQ4mVE2c9RYN5wUsN8XceKZtEE0y8vgIpzJcSbL/2eIrUU0Hqy1pSEd4V5XVxdi Pp8g== 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=LORDaXWNXeFu8xi/Mlwt10isq0FqusYeDGGQSdZg0vg=; b=HH0+U6jSfAm1CLJfUtCW36ZRCDZCQV/rmugh8OIX6Zh7kcqo93f0WmHxfmvOXaVq0n 77D/qp/q89y/ZEDCt+eOfjgYp0M4bkHF4Njmsw8XcB9LJM4L0oMTxljDlONBGRo6yP+m VEoBmcHI1BrQjYbBToghGDdwsPPI5knotY7T7t4lq92DaBLyk0FvnaoVU5hOM8sYqbJq USIU5NHpvuYTXCDOHBsyDoWjMkZgZlQ0IcT29pbxVfzwHJvLjaDJkdn9MGadV22AQd9e ZBP9cOwzUVQFvEhZpS+fisWl4xFCey8OSJgtCFrxG8bxQ5/XhMcex4vUezGxh3f3iPt3 NQnA== X-Gm-Message-State: ABUngveS6jBAfqa+LvFdBkNTVWIfOvR/1nIhiICmhPsFbXTBwmdSwrwsnPUAxaTJXAgV9AItOBZEpP9GvwwbUO0R5jMF/lG63FwwgrRu6ptHT6sBSEwVzPmtlczJZMAsyMR5fTQfdvqeaCLJy9xmjr76e4EroojVm/cjcDSL92FsjvIuFXpy/Jw4EV+yBTxaeC9QKFHxBK/j X-Received: by 10.194.87.7 with SMTP id t7mr23344792wjz.196.1477949792404; Mon, 31 Oct 2016 14:36:32 -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 hy10sm24303909wjb.10.2016.10.31.14.36.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Oct 2016 14:36:31 -0700 (PDT) Subject: Re: Speed up Clog Access by increasing CLOG buffers To: Amit Kapila References: <09275f4d-f78d-dd69-22de-57c784dc410e@2ndquadrant.com> <4a52a34f-57fa-7bcf-d34c-c15db40f0361@2ndquadrant.com> <8efd9956-059a-78f3-32ff-f1e1a4dd09c8@2ndquadrant.com> Cc: Dilip Kumar , Robert Haas , Andres Freund , pgsql-hackers From: Tomas Vondra Message-ID: Date: Mon, 31 Oct 2016 22:36:28 +0100 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 10/31/2016 08:43 PM, Amit Kapila wrote: > On Mon, Oct 31, 2016 at 7:58 PM, Tomas Vondra > wrote: >> On 10/31/2016 02:51 PM, Amit Kapila wrote: >> And moreover, this setup (single device for the whole cluster) is very >> common, we can't just neglect it. >> >> But my main point here really is that the trade-off in those cases may not >> be really all that great, because you get the best performance at 36/72 >> clients, and then the tps drops and variability increases. At least not >> right now, before tackling contention on the WAL lock (or whatever lock >> becomes the bottleneck). >> > > Okay, but does wait event results show increase in contention on some > other locks for pgbench-3000-logged-sync-skip-64? Can you share wait > events for the runs where there is a fluctuation? > Sure, I do have wait event stats, including a summary for different client counts - see this: http://tvondra.bitbucket.org/by-test/pgbench-3000-logged-sync-skip-64.txt Looking only at group_update patch for three interesting client counts, it looks like this: wait_event_type | wait_event | 108 144 180 -----------------+-------------------+------------------------- LWLockNamed | WALWriteLock | 661284 847057 1006061 | | 126654 191506 265386 Client | ClientRead | 37273 52791 64799 LWLockTranche | wal_insert | 28394 51893 79932 LWLockNamed | CLogControlLock | 7766 14913 23138 LWLockNamed | WALBufMappingLock | 3615 3739 3803 LWLockNamed | ProcArrayLock | 913 1776 2685 Lock | extend | 909 2082 2228 LWLockNamed | XidGenLock | 301 349 675 LWLockTranche | clog | 173 331 607 LWLockTranche | buffer_content | 163 468 737 LWLockTranche | lock_manager | 88 140 145 Compared to master, this shows significant reduction of contention on CLogControlLock (which on master has 20k, 83k and 200k samples), and moving the contention to WALWriteLock. But perhaps you're asking about variability during the benchmark? I suppose that could be extracted from the collected data, but I haven't done that. 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