Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XUc5b-0001Qg-1o for pgsql-performance@arkaria.postgresql.org; Thu, 18 Sep 2014 13:49:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XUc5Z-0006DX-BF for pgsql-performance@arkaria.postgresql.org; Thu, 18 Sep 2014 13:49:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XUc5Y-0006DQ-3n for pgsql-performance@postgresql.org; Thu, 18 Sep 2014 13:49:36 +0000 Received: from smtp-o-3.desy.de ([2001:638:700:1038::1:9c]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XUc5P-0007AZ-Mn for pgsql-performance@postgresql.org; Thu, 18 Sep 2014 13:49:34 +0000 Received: from smtp-map-3.desy.de (smtp-map-3.desy.de [131.169.56.68]) by smtp-o-3.desy.de (DESY-O-3) with ESMTP id 1A7762805C6 for ; Thu, 18 Sep 2014 15:49:25 +0200 (CEST) Received: from ZITSWEEP4.win.desy.de (zitsweep4.win.desy.de [131.169.97.98]) by smtp-map-3.desy.de (DESY_MAP_3) with ESMTP id EFC08110E for ; Thu, 18 Sep 2014 15:49:24 +0200 (MEST) Received: from smtp-intra-3.desy.de (lb-40-26.desy.de) by ZITSWEEP4.win.desy.de (Clearswift SMTPRS 5.5.0) with ESMTP id ; Thu, 18 Sep 2014 15:49:24 +0200 Received: from z-mta-3.desy.de (z-mta-3.desy.de [131.169.55.137]) by smtp-intra-3.desy.de (DESY-INTRA-3) with ESMTP id 999B91137; Thu, 18 Sep 2014 15:49:24 +0200 (MEST) Received: from z-mta-3.desy.de (localhost [127.0.0.1]) by z-mta-3.desy.de (Postfix) with ESMTP id 92531400C0; Thu, 18 Sep 2014 15:49:24 +0200 (CEST) Received: from z-mta-3.desy.de (localhost [127.0.0.1]) by z-mta-3.desy.de (Postfix) with ESMTP id 7EDDE400C4; Thu, 18 Sep 2014 15:49:24 +0200 (CEST) Received: from z-mbx-2.desy.de (z-mbx-2.desy.de [131.169.55.140]) by z-mta-3.desy.de (Postfix) with ESMTP id 71907400C0; Thu, 18 Sep 2014 15:49:24 +0200 (CEST) Date: Thu, 18 Sep 2014 15:49:24 +0200 (CEST) From: "Mkrtchyan, Tigran" To: Mark Kirkwood Cc: pgsql-performance@postgresql.org Message-ID: <500744138.44329.1411048164322.JavaMail.zimbra@desy.de> In-Reply-To: <541AB149.70504@catalyst.net.nz> References: <88549888.42916.1411034301200.JavaMail.zimbra@desy.de> <541AB149.70504@catalyst.net.nz> Subject: Re: postgres 9.3 vs. 9.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 8.0.7_GA_6021 (ZimbraWebClient - FF31 (Linux)/8.0.7_GA_6021) Thread-Topic: postgres 9.3 vs. 9.4 Thread-Index: h7SYlSL4mnU6k0hPn9FlJ5FGeJ6xUQ== X-Pg-Spam-Score: -1.6 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org ----- Original Message ----- > From: "Mark Kirkwood" > To: "Tigran Mkrtchyan" , pgsql-performance@postgresql.org > Sent: Thursday, September 18, 2014 12:17:45 PM > Subject: Re: [PERFORM] postgres 9.3 vs. 9.4 > > On 18/09/14 21:58, Mkrtchyan, Tigran wrote: > > > > > > Hi Folk, > > > > I am trying to investigate some performance issues which we have with > > postgres > > (a different topic by itself) and tried postgres.9.4beta2, with a hope that > > it > > perform better. > > > > Turned out that 9.4 is 2x slower than 9.3.5 on the same hardware. > > > > Some technical details: > > > > Host: rhel 6.5 2.6.32-431.23.3.el6.x86_64 > > 256 GB RAM, 40 cores, Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz > > 2x160GB PCIe SSD DELL_P320h-MTFDGAL175SAH ( on one 9.3, on an other one > > 9.4 ) > > > > postgres tweaks: > > > > > > default_statistics_target = 100 > > wal_writer_delay = 10s > > vacuum_cost_delay = 50 > > synchronous_commit = off > > maintenance_work_mem = 2GB > > checkpoint_completion_target = 0.9 > > effective_cache_size = 94GB > > work_mem = 402MB > > wal_buffers = 16MB > > checkpoint_segments = 64 > > shared_buffers = 8GB > > max_connections = 100 > > random_page_cost = 1.5 > > # other goodies > > log_line_prefix = '%m <%d %u %r> %%' > > log_temp_files = 0 > > log_min_duration_statement = 5 > > > > in both cases databases are fresh - no data. > > > > Here is a results with pgbench. > > > > > > 9.3.5: > > > > # /usr/pgsql-9.3/bin/pgbench -r -j 1 -c 1 -T 60 > > starting vacuum...end. > > transaction type: TPC-B (sort of) > > scaling factor: 1 > > query mode: simple > > number of clients: 1 > > number of threads: 1 > > duration: 60 s > > number of transactions actually processed: 96361 > > tps = 1605.972262 (including connections establishing) > > tps = 1606.064501 (excluding connections establishing) > > statement latencies in milliseconds: > > 0.001391 \set nbranches 1 * :scale > > 0.000473 \set ntellers 10 * :scale > > 0.000430 \set naccounts 100000 * :scale > > 0.000533 \setrandom aid 1 :naccounts > > 0.000393 \setrandom bid 1 :nbranches > > 0.000468 \setrandom tid 1 :ntellers > > 0.000447 \setrandom delta -5000 5000 > > 0.025161 BEGIN; > > 0.131317 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE > > aid = :aid; > > 0.100211 SELECT abalance FROM pgbench_accounts WHERE aid = :aid; > > 0.117406 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid > > = :tid; > > 0.114332 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE > > bid = :bid; > > 0.086660 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES > > (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); > > 0.035940 END; > > > > > > 9.4beta2: > > > > # /usr/pgsql-9.3/bin/pgbench -r -j 1 -c 1 -T 60 > > starting vacuum...end. > > transaction type: TPC-B (sort of) > > scaling factor: 1 > > query mode: simple > > number of clients: 1 > > number of threads: 1 > > duration: 60 s > > number of transactions actually processed: 34017 > > tps = 566.948384 (including connections establishing) > > tps = 567.008666 (excluding connections establishing) > > statement latencies in milliseconds: > > 0.001879 \set nbranches 1 * :scale > > 0.000526 \set ntellers 10 * :scale > > 0.000490 \set naccounts 100000 * :scale > > 0.000595 \setrandom aid 1 :naccounts > > 0.000421 \setrandom bid 1 :nbranches > > 0.000480 \setrandom tid 1 :ntellers > > 0.000484 \setrandom delta -5000 5000 > > 0.055047 BEGIN; > > 0.172179 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE > > aid = :aid; > > 0.135392 SELECT abalance FROM pgbench_accounts WHERE aid = :aid; > > 0.157224 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid > > = :tid; > > 0.147969 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE > > bid = :bid; > > 0.123001 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES > > (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); > > 0.957854 END; > > > > any ideas? > > > > Hi Tigran, > > Some ideas: > > 60s is too short for reliable results (default settings for checkpoints > is 300s so 600s is the typical elapsed time to get reasonably repeatable > numbers (to ensure you get about 1 checkpoint in your run). In addition > I usually do > > psql < CHECKPOINT; > ! > > Plus > > $ sleep 10 > > before each run so that I've got some confidence that we are starting > from approximately the same state each time (and getting hopefully only > *one* checkpoint per run)! Sure, I can run a longer tests with longer breaks in between. 9.3.5 # /usr/pgsql-9.3/bin/pgbench -r -j 1 -c 1 -T 600 starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 query mode: simple number of clients: 1 number of threads: 1 duration: 600 s number of transactions actually processed: 1037297 tps = 1728.826406 (including connections establishing) tps = 1728.836277 (excluding connections establishing) statement latencies in milliseconds: 0.001471 \set nbranches 1 * :scale 0.000456 \set ntellers 10 * :scale 0.000411 \set naccounts 100000 * :scale 0.000524 \setrandom aid 1 :naccounts 0.000364 \setrandom bid 1 :nbranches 0.000437 \setrandom tid 1 :ntellers 0.000424 \setrandom delta -5000 5000 0.024217 BEGIN; 0.118966 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid; 0.092483 SELECT abalance FROM pgbench_accounts WHERE aid = :aid; 0.108232 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid; 0.107978 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid; 0.080137 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); 0.034015 END; 9.4beta2 # /usr/pgsql-9.3/bin/pgbench -r -j 1 -c 1 -T 600 starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 query mode: simple number of clients: 1 number of threads: 1 duration: 600 s number of transactions actually processed: 373454 tps = 622.422377 (including connections establishing) tps = 622.429494 (excluding connections establishing) statement latencies in milliseconds: 0.001252 \set nbranches 1 * :scale 0.000417 \set ntellers 10 * :scale 0.000384 \set naccounts 100000 * :scale 0.000466 \setrandom aid 1 :naccounts 0.000344 \setrandom bid 1 :nbranches 0.000411 \setrandom tid 1 :ntellers 0.000397 \setrandom delta -5000 5000 0.047489 BEGIN; 0.157164 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid; 0.119992 SELECT abalance FROM pgbench_accounts WHERE aid = :aid; 0.141147 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid; 0.132492 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid; 0.108917 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP); 0.889112 END; Tigran. > > Cheers > > Mark > -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance