pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: nagata@sraoss.co.jp
Cc: coelho@cri.ensmp.fr
Cc: thomas.munro@gmail.com
Cc: m.polyakova@postgrespro.ru
Cc: alvherre@2ndquadrant.com
Cc: pgsql-hackers@postgresql.org
Cc: teodor@sigaev.ru
Subject: Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors
Date: Sat, 10 Jul 2021 21:54:35 +0900 (JST)
Message-ID: <20210710.215435.1626054813661714284.t-ishii@gmail.com> (raw)
In-Reply-To: <20210708083506.30fa700e2432d6da81c59393@sraoss.co.jp>
References: <20210701000213.bd91004653d86255979bbdc0@sraoss.co.jp>
	<alpine.DEB.2.22.394.2106301716320.2013120@pseudo>
	<20210708083506.30fa700e2432d6da81c59393@sraoss.co.jp>

I have played with v14 patch. I previously complained that pgbench
always reported 9 errors (actually the number is always the number
specified by "-c" -1 in my case).

$ pgbench -p 11000 -c 10  -T 10  --max-tries=0 test
pgbench (15devel, server 13.3)
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 1
query mode: simple
number of clients: 10
number of threads: 1
duration: 10 s
number of transactions actually processed: 974
number of failed transactions: 9 (0.916%)
number of transactions retried: 651 (66.226%)
total number of retries: 8482
latency average = 101.317 ms (including failures)
initial connection time = 44.440 ms
tps = 97.796487 (without initial connection time)

To reduce the number of errors I provide "--max-tries=9000" because
pgbench reported 8482 errors.

$ pgbench -p 11000 -c 10  -T 10 --max-tries=9000 test
pgbench (15devel, server 13.3)
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 1
query mode: simple
number of clients: 10
number of threads: 1
duration: 10 s
number of transactions actually processed: 1133
number of failed transactions: 9 (0.788%)
number of transactions retried: 755 (66.112%)
total number of retries: 9278
maximum number of tries: 9000
latency average = 88.570 ms (including failures)
initial connection time = 23.384 ms
tps = 112.015219 (without initial connection time)

Unfortunately this didn't work. Still 9 errors because pgbench
terminated the last round of run.

Then I gave up to use -T, and switched to use -t. Number of
transactions for -t option was calculated by the total number of
transactions actually processed (1133) / number of clients (10) =
11.33. I rouned up 11.33 to 12, then multiply number of clients (10)
and got 120. The result:

$ pgbench -p 11000 -c 10  -t 120 --max-tries=9000 test
pgbench (15devel, server 13.3)
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 1
query mode: simple
number of clients: 10
number of threads: 1
number of transactions per client: 120
number of transactions actually processed: 1200/1200
number of transactions retried: 675 (56.250%)
total number of retries: 8524
maximum number of tries: 9000
latency average = 93.777 ms
initial connection time = 14.120 ms
tps = 106.635908 (without initial connection time)

Finally I was able to get a result without any errors.  This is not a
super simple way to obtain pgbench results without errors, but
probably I can live with it.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp





view thread (82+ messages)  latest in thread

Message-ID: <20210710.215435.1626054813661714284.t-ishii@gmail.com>
Permalink:  ../20210710.215435.1626054813661714284.t-ishii@gmail.com/
Also on:    postgresql.org/message-id/20210710.215435.1626054813661714284.t-ishii@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ishii@sraoss.co.jp, nagata@sraoss.co.jp, coelho@cri.ensmp.fr, thomas.munro@gmail.com, m.polyakova@postgrespro.ru, alvherre@2ndquadrant.com, teodor@sigaev.ru
  Subject: Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors
  In-Reply-To: <20210710.215435.1626054813661714284.t-ishii@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox