Re: Fix around conn_duration in pgbench

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: coelho(at)cri(dot)ensmp(dot)fr, masao(dot)fujii(at)oss(dot)nttdata(dot)com, asifr(dot)rehman(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix around conn_duration in pgbench
Date: 2021-08-31 05:28:35
Message-ID: 20210831142835.021618aca21982894e8b9304@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Fabien, Ishii-san,

On Tue, 31 Aug 2021 14:18:48 +0900 (JST)
Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:

> >>> Ok. That makes sense. The output reports "including connections
> >>> establishing" and "excluding connections establishing" regardless with
> >>> -C, so we should measure delays in the same way.
> >>
> >> On second thought, it's more reasonable and less confusing not to
> >> measure the disconnection delays at all? Since whether the benchmark
> >> result
> >> should include the disconnection delays or not is not undocumented,
> >> probably we cannot say strongly the current behavior (i.e., the
> >> disconnection
> >> delays are not measured) is a bug. Also since the result has not
> >> included
> >> the disconnection delays so far, the proposed change might slightly
> >> change
> >> the benchmark numbers reported, which might confuse the users.
> >> ISTM that at least it's unwise to change long-stable branches for
> >> this... Thought?
> >
> > My 0.02€: From a benchmarking perspective, ISTM that it makes sense to
> > include disconnection times, which are clearly linked to connections,
> > especially with -C. So I'd rather have the more meaningful figure even
> > at the price of a small change in an undocumented feature.
>
> +1. The aim of -C is trying to measure connection overhead which
> naturally includes disconnection overhead.

I think it is better to measure disconnection delays when -C is specified in
pg 14. This seems not necessary when -C is not specified because pgbench just
reports "initial connection time".

However, what about pg13 or later? Do you think we should also change the
behavior of pg13 or later? If so, should we measure disconnection delay even
when -C is not specified in pg13?

Regards,
Yugo Nagata

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

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-08-31 05:34:48 Re: Replication slot drop message is sent after pgstats shutdown.
Previous Message Masahiko Sawada 2021-08-31 05:22:39 Re: Replication slot drop message is sent after pgstats shutdown.