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.89) (envelope-from ) id 1gXxAJ-0007MM-Fp for pgsql-performance@arkaria.postgresql.org; Fri, 14 Dec 2018 23:46:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXxAG-0007Bu-H3 for pgsql-performance@arkaria.postgresql.org; Fri, 14 Dec 2018 23:46:40 +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 1gXxAG-00074F-4b for pgsql-performance@lists.postgresql.org; Fri, 14 Dec 2018 23:46:40 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([202.78.240.226]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXxA7-0000EE-OF for pgsql-performance@lists.postgresql.org; Fri, 14 Dec 2018 23:46:37 +0000 Received: from [IPv6:2406:e001:83f:7801:5886:cc:efa9:e0ca] (unknown [IPv6:2406:e001:83f:7801:5886:cc:efa9:e0ca]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 0B21780AF9 for ; Sat, 15 Dec 2018 12:46:23 +1300 (NZDT) Subject: Re: pgbench results arent accurate To: pgsql-performance@lists.postgresql.org References: From: Mark Kirkwood Message-ID: <166c284a-6e06-8e8b-3b96-e292d3aac781@catalyst.net.nz> Date: Sat, 15 Dec 2018 12:46:20 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: ORIGINATING; auth=pass smtp.auth=mark.kirkwood@catalyst.net.nz smtp.mailfrom=mark.kirkwood@catalyst.net.nz List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk If you have not amended any Postgres config parameters, then you'll get checkpoints approx every 5 min or so. Thus using a Pgbench run time of 5min is going sometimes miss/sometimes hit a checkpoint in progress - which will hugely impact test results. I tend to do Pgbench runs of about 2x checkpoint_timeout - (i.e 10 min for default configurations). Also for increased repeatability, I do a manually triggered checkpoint immediately before each run. regards Mark On 13/12/18 1:53 AM, Mariel Cherkassky wrote: > Hey, > I installed a new postgres 9.6 on both of my machines. I'm trying to > measure the differences between the performances in each machine but > it seems that the results arent accurate. > I did 2 tests : > > 1)In the first test the scale was set to 100 : > pgbench -i -s 100 -U postgres -d bench -h machine_name > pgbench -U postgres -d bench  -h machine_name -j 2 -c 16 -T 300 > RUN    TPS - machine1 TPS-machine2 > 1 697 555 > 2 732 861 > 3 784 842 > > > > > > 2)In this test the scale was set to 10000 : > pgbench -i -s 10000 -U postgres -d bench -h machine_name > pgbench -U postgres -d bench --progress=30 -h machine_name -j 2 -c 16 > -T 300 > RUN TPS-MACHINE1 TPS-MACHINE2 > 1 103 60 > 2 63 66 > 3 74 83 > 4 56 61 > 5 75 53 > 6 73 60 > 7 62 53 > > > In both cases after the initalization I restarted the database and > cleared the cashe(echo 1 > /proc/sys/vm/drop_caches) one time. During > all the runs I didnt shutdown the machine. > > Now, I was hopping the the tps will be almost the same in each machine > for all the runs. In other words, I wanted to see that the tps in > machine1 during all the tps are almost the same but I see that the > values arent accurate. > > Any idea what might cause the differences in every run ?