Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2cHR-00089o-7d for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jul 2013 07:17:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V2cHQ-000280-NN for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jul 2013 07:17:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2cHP-00026l-Jp for pgsql-bugs@postgresql.org; Fri, 26 Jul 2013 07:17:35 +0000 Received: from smtp-3.ensmp.fr ([194.214.158.102]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V2cHN-0006EW-2C for pgsql-bugs@postgresql.org; Fri, 26 Jul 2013 07:17:35 +0000 Received: from cri.ensmp.fr (4.184.24.93.rev.sfr.net [93.24.184.4]) (authenticated bits=0) by smtp-3.ensmp.fr (8.14.5/8.14.3/JMMC-11/Mar/2010) with ESMTP id r6Q7HHdx027576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Jul 2013 09:17:22 +0200 (MEST) Date: Fri, 26 Jul 2013 09:17:17 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@localhost6.localdomain6 To: digoal@126.com cc: PostgreSQL Bugs List Subject: Re: BUG #8326: pgbench tps wrong BUG In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-Miltered: at cascavel with ID 51F2227D.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID coelho X-j-chkmail-Enveloppe: 51F2227D.000 from 4.184.24.93.rev.sfr.net/4.184.24.93.rev.sfr.net/93.24.184.4/cri.ensmp.fr/ X-Pg-Spam-Score: -3.4 (---) Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org > when client thread big, the tps without connection time wrong!!!! > number of threads: 100 > duration: 10 s My 0.02 €: I cannot test that on my laptop! What kind of server is this? The thread start time is currently taken before thread creation. The overhead of creating 100 threads compared to 10 seconds of run is quite significant and may impact the result. The second issue is that 800 connections and as many server processes must be created, and the time for that must be quite significant as well against the 10 second run. So I would mostly classify that as a feature rather than a bug, because the run is so short. BTW, I'm planning to submit an enhancement patch to pgbench to improve measurements, that will include moving the start time after the thread is started, and possibly help getting more consistent figures. -- Fabien. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs