Re: pgbench progress report improvements - split 3 v2 - A

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, pavel(dot)stehule(at)gmail(dot)com
Subject: Re: pgbench progress report improvements - split 3 v2 - A
Date: 2013-10-06 07:40:40
Message-ID: alpine.DEB.2.02.1310060915490.18141@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Noah,

>>> Patch (4): Redefine "latency" as reported by pgbench and report "lag" more.
>>
>> Here is a first partial patch, which focusses on measuring latency
>> and reporting the measure under --progress.
>
> This patch contains the features pertaining to both hypothetical patches (3)
> and (4), not just (4) like I requested.

Sorry, I misunderstood the expected scope of your request.

> The sum of the squares of the latencies wraps after 2^63/(10^12 * avg_latency
> * nclients) seconds. That's unlikely to come up with the ordinary pgbench
> script, but one can reach it in a few hours when benchmarking a command that
> runs for many seconds. If we care, we can track the figure as a double. I
> merely added a comment about it.

Indeed I thought about that. I choose int64 because the overflow seemed
very unlikely: it would required about 1 billion pretty large 100 ms
latency (2^16.6 µs) transactions to wrap around, which is a multi-year one
thread run. So I stayed homogeneous to the other accumulator and the
surveyed data type. Also, the measure is exact with int64, but rounding or
undeflows could happen with double.

Adding a comment about it is a good idea.

> I restored applicable parts of your update to the --progress documentation
> from pgbench-measurements-v5.patch.
>
> The patch made output like this:
>
> progress: 7.2 s, 1.7 tps, 205.225 stddev 3.484 ms lat, 45.472 ms lag
>
> [...]

Indeed, the postfix English-like version is not very clear.

> progress: 36.0 s, 115.2 tps, lat avg 9.678 ms stddev 1.792, lag 0.143 ms
>
> I switched to that, except that I removed the word "avg" to save horizontal
> space and since lag is also an average though not labelled as such.

Yep, space is a concern. That was one of the reason why I used "+-".

>> + printf("latency average: %.3f ms\n",
>> + 1000.0 * duration / normal_xacts);
>
> I incorporated the "nclients" factor needed here.

Oops!?

Thanks a log for the fixes and the improvements.

Which part do you want as a next step?

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2013-10-06 07:48:04 Re: pgbench - exclude pthread_create() from connection start timing
Previous Message Alvaro Herrera 2013-10-06 04:25:06 Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command.