Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j83Gx-0005Jn-7b for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Feb 2020 14:39:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j83Gv-0003iC-Tx for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Feb 2020 14:39:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j83Gv-0003i5-EH for pgsql-hackers@lists.postgresql.org; Sat, 29 Feb 2020 14:39:17 +0000 Received: from courriel.mines-paristech.fr ([77.158.173.149] helo=antispam-1.ensmp.fr) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j83Gn-0001rl-OK for pgsql-hackers@postgresql.org; Sat, 29 Feb 2020 14:39:15 +0000 Received: from smtp-5.mines-paristech.fr (smtp.mines-paristech.fr [77.158.173.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by antispam-1.ensmp.fr (antispam.mines-paristech.fr) with ESMTPS id 17C7855ED8; Sat, 29 Feb 2020 15:39:08 +0100 (CET) Received: from pseudo (90.237.219.88.rev.sfr.net [88.219.237.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp-5.mines-paristech.fr (Postfix) with ESMTPSA id A68BB20147; Sat, 29 Feb 2020 15:39:07 +0100 (CET) Date: Sat, 29 Feb 2020 15:39:06 +0100 (CET) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Kyotaro Horiguchi cc: andres@anarazel.de, pgsql-hackers@postgresql.org Subject: Re: pgbench: option delaying queries till connections establishment? In-Reply-To: <20200228.150039.1814962139504449866.horikyota.ntt@gmail.com> Message-ID: References: <20200227180100.zyvjwzcpiokfsqm2@alap3.anarazel.de> <20200227185129.hikscyenomnlrord@alap3.anarazel.de> <20200228.150039.1814962139504449866.horikyota.ntt@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddttddgieelucetufdoteggodetrfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffujgfkfhgfgggtsehttdertddtredvnecuhfhrohhmpefhrggsihgvnhcuvefqgffnjffquceotghovghlhhhosegtrhhirdgvnhhsmhhprdhfrheqnecukfhppeekkedrvdduledrvdefjedrledtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Kyotaro-san, >> I think this also shows that "including/excluding connections >> establishing" as well as some of the other stats reported pretty >> bogus. In the 'before' case a substantial numer of the connections had >> not yet been established until the end of the test run! > > I see it useful. In most cases we don't care connection time of > pgbench. Especially in the mentioned case the result is just bogus. I > think the reason for "including/excluding connection establishing" is > not that people wants to see how long connection took to establish but > that how long the substantial work took. If each client did run with > continuously re-establishing new connections the connection time would > be useful, but actually all the connections are established at once at > the beginning. > > So FWIW I prefer that the barrier is applied by default Yep. > (that is, it can be disabled) On reflection, I'm not sure I see a use case for not running the barrier if it is available. > and the progress time starts at the time all clients has been > established. Yep, the start time should be set after the connection barrier, and possibly before a start barrier to ensure that no transaction has started before the start time: although performance measures are expected to be slightly false because of how they are measured (measuring takes time), from a benchmarking perspective the displayed result should be <= the actual performance. Now, again, if long benchmarks are run, which for a db should more or less always be the case, this should not matter much. >> starting vacuum...end. > + time to established 5000 connections: 1323ms Yep, maybe showing the initial connection time separately. -- Fabien.