Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxJaQ-0004Yh-Vd for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Oct 2016 20:05:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bxJaQ-0001Uj-HD for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Oct 2016 20:05:10 +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 1bxJaP-0001Tk-LZ for pgsql-hackers@postgresql.org; Thu, 20 Oct 2016 20:05:09 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bxJaI-0005VQ-G2 for pgsql-hackers@postgresql.org; Thu, 20 Oct 2016 20:05:08 +0000 Received: by mail-qk0-x235.google.com with SMTP id z190so115589034qkc.2 for ; Thu, 20 Oct 2016 13:05:02 -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=YNzMgvcjiQJm3g+bCNUNo1gHO/wKYy69p+sr29ReQgY=; b=vL7OHf6y5b61bUeLtE87JIHEaFcE6k8fVJGmlNevLV8PI0BOUm9/eZIlvy1iQEB04n BNPWwNGUwW8+4x31xUWiy//6biQLVfan3OX8C6fPmMK4E+6SlLZGzEVg8pDxStWy5MO9 x/6zczw8/SzexDRUWdVJnaYu9hLGtqvMiw6RtEFul85Oig+YuQ8PjuS1QnOcqJEnLT8K /7BXz2ecrG693HDfjtQNQ+dCMhMiIhSELkuDUNuQCHCzOldz6vtOCiuCxzhD448Qu6H9 3H3NgKZi29LZXZCVLpzOxpuAxyrdXgQa/kavZeB/wHh5sb7f/gHYSfgyi0KD23E8zDgb bLPg== 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=YNzMgvcjiQJm3g+bCNUNo1gHO/wKYy69p+sr29ReQgY=; b=PjmXPzEc9J6HJ0ZOmNUT86irtYLQbPta+egovhL7BmrRpsPJNcYTaoyDhztXlz7aev hikzMkyCtBEKv5jumeHX0o14QgejTQ6pBU4+aox/Vz1hTYmr50DElTNIai4MkixYSXjQ sybeNzQsSF6YS2JB2D3bsbBNLIEaK63hocYypF0AlWMX0VQMXQqCrU6VcF9OBfVzP3Cb XXWJjgcfhmPjd8k0XqpHZvUj/gVj3WCk6CNf2yv+kOFES3N1TvhVt4Yry/3cIWfP34TC B2MoGQPcueIa6oLqg6mHP0/v/PeLjBNJNtKKNmgGe6xs/R3gcliJMEHgZoH4eXyn9UU8 0UJg== X-Gm-Message-State: ABUngvcRsYPfZrFg1X43xj4uAO8WxQjpEuhWZBVAcadDThBD6NPxqyMIkTi1uhSi3CbnnisZtit0rBKwBRrHpqCMZGV5anYOZgRGR9U3CCZfrA45skcmRQrCmYtfEQlT6FtxymQDZqDeAyI6wPc3ZKHw46tQPJdvC0es1zrtlXKmmVzPGN5DCIQGE9VcmRkOGHZCOViiL8gc X-Received: by 10.194.103.165 with SMTP id fx5mr1326906wjb.188.1476993901488; Thu, 20 Oct 2016 13:05:01 -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 q134sm364456wme.3.2016.10.20.13.05.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 13:05:00 -0700 (PDT) Subject: Re: Speed up Clog Access by increasing CLOG buffers To: Robert Haas , Dilip Kumar References: <3f169562-4544-7b2b-9d25-b058da029ffb@2ndquadrant.com> <3cc206fa-7d36-f020-3856-12ed405e2535@2ndquadrant.com> <65f47a46-f1b2-aee1-d56d-b67de49e3a3b@2ndquadrant.com> <09275f4d-f78d-dd69-22de-57c784dc410e@2ndquadrant.com> Cc: Amit Kapila , Andres Freund , pgsql-hackers From: Tomas Vondra Message-ID: Date: Thu, 20 Oct 2016 22:04:58 +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 10/20/2016 07:59 PM, Robert Haas wrote: > On Thu, Oct 20, 2016 at 11:45 AM, Robert Haas wrote: >> On Thu, Oct 20, 2016 at 3:36 AM, Dilip Kumar wrote: >>> On Thu, Oct 13, 2016 at 12:25 AM, Robert Haas wrote: >> >> ... >> >> So here's my theory. The whole reason why Tomas is having difficulty >> seeing any big effect from these patches is because he's testing on >> x86. When Dilip tests on x86, he doesn't see a big effect either, >> regardless of workload. But when Dilip tests on POWER, which I think >> is where he's mostly been testing, he sees a huge effect, because for >> some reason POWER has major problems with this lock that don't exist >> on x86. >> >> If that's so, then we ought to be able to reproduce the big gains on >> hydra, a community POWER server. In fact, I think I'll go run a quick >> test over there right now... > > And ... nope. I ran a 30-minute pgbench test on unpatched master > using unlogged tables at scale factor 300 with 64 clients and got > these results: > > 14 LWLockTranche | wal_insert > 36 LWLockTranche | lock_manager > 45 LWLockTranche | buffer_content > 223 Lock | tuple > 527 LWLockNamed | CLogControlLock > 921 Lock | extend > 1195 LWLockNamed | XidGenLock > 1248 LWLockNamed | ProcArrayLock > 3349 Lock | transactionid > 85957 Client | ClientRead > 135935 | > > I then started a run at 96 clients which I accidentally killed shortly > before it was scheduled to finish, but the results are not much > different; there is no hint of the runaway CLogControlLock contention > that Dilip sees on power2. > What shared_buffer size were you using? I assume the data set fit into shared buffers, right? FWIW as I explained in the lengthy post earlier today, I can actually reproduce the significant CLogControlLock contention (and the patches do reduce it), even on x86_64. For example consider these two tests: * http://tvondra.bitbucket.org/#dilip-300-unlogged-sync * http://tvondra.bitbucket.org/#pgbench-300-unlogged-sync-skip However, it seems I can also reproduce fairly bad regressions, like for example this case with data set exceeding shared_buffers: * http://tvondra.bitbucket.org/#pgbench-3000-unlogged-sync-skip 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