Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccXZf-0006yN-87 for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Feb 2017 13:18:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ccXZd-0001JX-C8 for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Feb 2017 13:18:45 +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 1ccXYB-00085h-SH for pgsql-hackers@postgresql.org; Sat, 11 Feb 2017 13:17:16 +0000 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ccXY3-0002U5-VZ for pgsql-hackers@postgresql.org; Sat, 11 Feb 2017 13:17:14 +0000 Received: by mail-wr0-x22a.google.com with SMTP id k90so125186220wrc.3 for ; Sat, 11 Feb 2017 05:17:07 -0800 (PST) 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=0LDi9QpBWCKP0OTiFJVLBfn0ZvAUHerqH7GQteLQG4A=; b=xiEz06PC9GoDVQhDpv95dxX+POZh7o6ZzGuvMj/1AC+HDIBo91J9TK9CiXniEzIaZW 6vioq/iFBnevJOsZf8ut/gaojp69FdGob2j0TvKMEx5Mj67W4RUOu73AHejk5cIsURx8 En2F5jIma+4zGvSzRV0laPn8zhSq3eCMavPSeJNnZWjL+FSg28yI3chht2dRm7m+C3/y +Y/4y84BHxyimq6MDM2m07tkpBA2CR+HQx4TX/Lwz428/hWaHdqJ5yj4zmVItJfNoR2K 20EATU/rNtpP2p07I6VkTGaGmfyNvZbRAG/u/stckUMKqTAlzC1jCgh92q2ex2YW4J6Q DetA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=0LDi9QpBWCKP0OTiFJVLBfn0ZvAUHerqH7GQteLQG4A=; b=L0RwOCqmfaVdhsPB4luLeBZyID9FYzToTSaOo5FxrziHK/BReaaOfnDTAwb5OLZ4/D nNBqg18O7YrvMKCMZrnNJBfcx8iS9eZsydK3Pmbyie7uJD/yxAx+7jrOEOMoVX1uxJsP TuEMjus9MwC25wZ1VQ2Qr/eDcuguNKupdvZDhm8gBmT/gatrljCv7Y7DWwlpRcf3Wkpp wi8cYpPHSp/v2+/G0j4ReUFGVb4djg/Vll8SDz7WcaRAjRfJUI4DbHUnZtMa5zU0asC1 NGEYY2is3tYO/hyfEuBgHRMyYCl0qq/3WddqEyKhJDWK4keRKDvSI/SI9ox8z+qfHY84 7bCA== X-Gm-Message-State: AMke39ns+vw25xMjT/pCEXGpgSYmJUi0zpwTcPWWHVPFYB3QhFqJoOI5c8mOI4P7wYK7HvP0k8PYejEtoWuVUHG0JwyS3r6xdPcov9HvRwwpi2VQn8BQLXOGugArwqdGfMgiaJ1YwEfTpI5kKou9p9noinI43h7reK6mcDBo9ojOX2YTxqFCsBcpi+qrJp7CX1ySP8UR5XAf X-Received: by 10.223.177.136 with SMTP id q8mr11356246wra.134.1486819025451; Sat, 11 Feb 2017 05:17:05 -0800 (PST) Received: from [10.137.2.17] (ip-89-177-46-65.net.upcbroadband.cz. [89.177.46.65]) by smtp.gmail.com with ESMTPSA id w30sm6402510wrb.5.2017.02.11.05.17.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2017 05:17:04 -0800 (PST) Subject: Re: Should we cacheline align PGXACT? To: Alexander Korotkov References: <7503E425-6651-4D40-83FD-592AF580D618@gmail.com> <29160.1471718332@sss.pgh.pa.us> Cc: pgsql-hackers From: Tomas Vondra Message-ID: Date: Sat, 11 Feb 2017 14:17:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 02/11/2017 01:21 PM, Alexander Korotkov wrote: > Hi, Tomas! > > On Sat, Feb 11, 2017 at 2:28 AM, Tomas Vondra > > wrote: > > As discussed at the Developer meeting ~ a week ago, I've ran a > number of benchmarks on the commit, on a small/medium-size x86 > machines. I currently don't have access to a machine as big as used > by Alexander (with 72 physical cores), but it seems useful to verify > the patch does not have negative impact on smaller machines. > > In particular I've ran these tests: > > * r/o pgbench > * r/w pgbench > * 90% reads, 10% writes > * pgbench with skewed distribution > * pgbench with skewed distribution and skipping > > > Thank you very much for your efforts! > I took a look at these tests. One thing catch my eyes. You warmup > database using pgbench run. Did you consider using pg_prewarm instead? > > SELECT sum(x.x) FROM (SELECT pg_prewarm(oid) AS x FROM pg_class WHERE > relkind IN ('i', 'r') ORDER BY oid) x; > > In my experience pg_prewarm both takes less time and leaves less > variation afterwards. > I've considered it, but the problem I see in using pg_prewarm for benchmarking purposes is that it only loads the data into memory, but it does not modify the tuples (so all tuples have the same xmin/xmax, no dead tuples, ...), it does not set usage counters on the buffers and also does not generate any clog records. I don't think there's a lot of variability in the results I measured. If you look at (max-min) for each combination of parameters, the delta is generally within 2% of average, with a very few exceptions, usually caused by the first run (so perhaps the warmup should be a bit longer). 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