Re: Fix around conn_duration in pgbench

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: Asif Rehman <asifr(dot)rehman(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Subject: Re: Fix around conn_duration in pgbench
Date: 2021-08-05 09:02:19
Message-ID: 20210805180219.cb69b58c53db2311280066af@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Fujii-san,

On Thu, 5 Aug 2021 16:16:48 +0900
Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:

>
>
> On 2021/08/01 14:50, Yugo NAGATA wrote:
> > When -C is not specified, the disconnection time is not measured even in
> > the patch for v14+. I don't think it is a problem because the
> > disconnection delay at the end of benchmark almost doesn't affect the tps.
>
> What about v13 or before? That is, in v13, even when -C is not specified,
> both the connection and disconnection delays are measured. Right?

No. Although there is a code measuring the thread->conn_time around
disconnect_all() in v13 or before;

done:
INSTR_TIME_SET_CURRENT(start);
disconnect_all(state, nstate);
INSTR_TIME_SET_CURRENT(end);
INSTR_TIME_ACCUM_DIFF(thread->conn_time, end, start);

this is a no-op because finishCon() is already called at CSTATE_ABORTED or
CSTATE_FINISHED. Therefore, in the end, the disconnection delay is not
measured even in v13.

Regards,
Yugo Nagata

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2021-08-05 09:27:28 Re: Commitfest overflow
Previous Message osumi.takamichi@fujitsu.com 2021-08-05 08:58:35 RE: Skipping logical replication transactions on subscriber side