Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpc8N-0008Kr-Bb for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Sep 2016 14:16:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpc8M-0006rV-Iw for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Sep 2016 14:16:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpc6w-0004mC-S9 for pgsql-hackers@postgresql.org; Thu, 29 Sep 2016 14:14:54 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bpc6t-0008DE-HP for pgsql-hackers@postgresql.org; Thu, 29 Sep 2016 14:14:54 +0000 Received: by mail-wm0-x22e.google.com with SMTP id w84so300960319wmg.1 for ; Thu, 29 Sep 2016 07:14:51 -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=atHMevfqhD4BxXbD+w2XevmgvP/o196iIZVxuD4XFcQ=; b=oF3D9yuTGB+ZlGedPysnTejaG0K2hkhs3uf61cyl4vRix/fF7Z+VkUQEccZGDdfFpq RiCh70ROyughdIVF0xhp1l+AFJL/HYuycWNUufXbMcDkSooo63zpZjFntjie7X7hTAe1 n3cY4EeIHHrnL0yr6EMjoczCB+qdAChWgaAbtqr80666GrwNxlxB5zHxzgAEHDYEEV2V uBHo+qsAi/GsidU7v33lrikfroXduFCbtMdWMcRTiGwVntCK1+24WlUiYccifaR/+Xdu 6k0I2HysVzi94x6IO0r5DDeYBErFECCKo2w3En5tVTuxZBcjfLFnnwg0vhVisk8XWaQt y6Bw== 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=atHMevfqhD4BxXbD+w2XevmgvP/o196iIZVxuD4XFcQ=; b=d6E6VJX+8C2E0s+bV7/77c90QXnV2gGMyvHV0dSlaL86AkyyshPJSOhyLlOBHXr9Tq zf0n07QuFmR99fg88kSavr8m6LVjWSDrZ/6Bql9XY3VETL3uNCGplUO9kUA4qg255TO8 FClZQtC0Rvzc8H/ujSks60CBKoMvHUXeIuRSOkTp0H76ELqcGdjHev/URf0IisraJaB9 ZOYKpJV2g1nPaRVQJcVlK+DqbODEG5coIGEiQJqaGYNnJyzxxnSe3w1WLI3qha+n6JGV twLrsqESaZY5BMPd7RsUC6kR5m9sA8B+JGRh5iJTgDdk6AuN+gaU4H1J6+5/oZ/I+TSn YKTg== X-Gm-Message-State: AA6/9RnCIM9c5UVGglMBxPehcv5Q5h+ECPB/MXMZk1rw1UIX2pXeathffW9vegwBMixkn/dwwbAa22+rFsC5kb2I3yJflCOOQ2ZXS8CGzb30M3eRL/cwxK5emUtBOXQJHtZkPTaVb+g6rI9iwxGFYsM6m1/8govQ0XskW/RRwRK9EcPLzxPbhJcHTK+0IbJBDTwSfFNpTGej X-Received: by 10.194.246.134 with SMTP id xw6mr2032712wjc.4.1475158490023; Thu, 29 Sep 2016 07:14:50 -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 xb6sm14397805wjb.30.2016.09.29.07.14.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Sep 2016 07:14:48 -0700 (PDT) Subject: Re: Speed up Clog Access by increasing CLOG buffers To: Robert Haas References: <26b69fb2-fa4d-530c-7783-1cb9d952c4e5@2ndquadrant.com> <781ac43c-da69-f5c7-a828-7b995691d4cc@2ndquadrant.com> <5da94f12-8141-2f2f-016a-09a8e37bdd30@2ndquadrant.com> <43198bfb-391b-75da-0517-31e56c4d11f4@2ndquadrant.com> Cc: Amit Kapila , Dilip Kumar , Andres Freund , pgsql-hackers From: Tomas Vondra Message-ID: <3f169562-4544-7b2b-9d25-b058da029ffb@2ndquadrant.com> Date: Thu, 29 Sep 2016 16:14: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/29/2016 03:47 PM, Robert Haas wrote: > On Wed, Sep 28, 2016 at 9:10 PM, Tomas Vondra > wrote: >>> I feel like we must be missing something here. If Dilip is seeing >>> huge speedups and you're seeing nothing, something is different, and >>> we don't know what it is. Even if the test case is artificial, it >>> ought to be the same when one of you runs it as when the other runs >>> it. Right? >>> >> Yes, definitely - we're missing something important, I think. One difference >> is that Dilip is using longer runs, but I don't think that's a problem (as I >> demonstrated how stable the results are). > > It's not impossible that the longer runs could matter - performance > isn't necessarily stable across time during a pgbench test, and the > longer the run the more CLOG pages it will fill. > Sure, but I'm not doing just a single pgbench run. I do a sequence of pgbench runs, with different client counts, with ~6h of total runtime. There's a checkpoint in between the runs, but as those benchmarks are on unlogged tables, that flushes only very few buffers. Also, the clog SLRU has 128 pages, which is ~1MB of clog data, i.e. ~4M transactions. On some kernels (3.10 and 3.12) I can get >50k tps with 64 clients or more, which means we fill the 128 pages in less than 80 seconds. So half-way through the run only 50% of clog pages fits into the SLRU, and we have a data set with 30M tuples, with uniform random access - so it seems rather unlikely we'll get transaction that's still in the SLRU. But sure, I can do a run with larger data set to verify this. >> I wonder what CPU model is Dilip using - I know it's x86, but not which >> generation it is. I'm using E5-4620 v1 Xeon, perhaps Dilip is using a newer >> model and it makes a difference (although that seems unlikely). > > The fact that he's using an 8-socket machine seems more likely to > matter than the CPU generation, which isn't much different. Maybe > Dilip should try this on a 2-socket machine and see if he sees the > same kinds of results. > Maybe. I wouldn't expect a major difference between 4 and 8 sockets, but I may be wrong. 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