From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Fix pgbench --progress report under (very) low rate |
Date: | 2015-03-22 10:12:55 |
Message-ID: | alpine.DEB.2.10.1503221053590.14445@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
When running with low rate, the --progress is only printed when there is
some activity, which makes it quite irregular, including some catching up
with stupid tps figures.
Shame on me for this "feature" (aka bug) in the first place.
This patch fixes this behavior by considering the next report time as a
target to meet as well as transaction schedule times.
Before the patch:
sh> ./pgbench -R 0.5 -T 10 -P 1 -S
progress: 1.7 s, 0.6 tps, lat 6.028 ms stddev -nan, lag 1.883 ms
progress: 2.2 s, 2.3 tps, lat 2.059 ms stddev -nan, lag 0.530 ms
progress: 7.3 s, 0.4 tps, lat 2.944 ms stddev 1.192, lag 2.624 ms
progress: 7.3 s, 1402.5 tps, lat 5.115 ms stddev 0.000, lag 0.000 ms
progress: 7.3 s, 0.0 tps, lat -nan ms stddev -nan, lag inf ms
progress: 7.3 s, 335.2 tps, lat 3.106 ms stddev 0.000, lag 0.000 ms
progress: 8.8 s, 0.0 tps, lat -nan ms stddev -nan, lag inf ms
progress: 8.8 s, 307.6 tps, lat 4.855 ms stddev -nan, lag 0.000 ms
progress: 10.0 s, 0.0 tps, lat -nan ms stddev -nan, lag -nan ms
After the patch:
sh> ./pgbench -R 0.5 -T 10 -P 1 -S
progress: 1.0 s, 0.0 tps, lat -nan ms stddev -nan, lag -nan ms
progress: 2.0 s, 1.0 tps, lat 5.980 ms stddev 0.000, lag 0.733 ms
progress: 3.0 s, 1.0 tps, lat 1.905 ms stddev 0.000, lag 0.935 ms
progress: 4.0 s, 1.0 tps, lat 3.966 ms stddev 0.000, lag 0.623 ms
progress: 5.0 s, 2.0 tps, lat 2.527 ms stddev 1.579, lag 0.512 ms
progress: 6.0 s, 0.0 tps, lat -nan ms stddev -nan, lag -nan ms
progress: 7.0 s, 0.0 tps, lat -nan ms stddev -nan, lag -nan ms
progress: 8.0 s, 1.0 tps, lat 1.750 ms stddev 0.000, lag 0.767 ms
progress: 9.0 s, 0.0 tps, lat -nan ms stddev -nan, lag -nan ms
progress: 10.0 s, 2.0 tps, lat 2.403 ms stddev 1.386, lag 0.357 ms
To answer a question before it is asked: I run low rates because I'm
looking at latency (rather than throughput) under different conditions.
For instance with the above tests, the latency is about 3 ms, but it
varies with the tps: (0.5 tps => 3 ms, 10 tps => 1 ms, 50 tps => 0.8 ms,
100 tps => 0.5 ms, 200 tps => 0.75 ms, 1000 tps => 0.5 ms...).
--
Fabien.
Attachment | Content-Type | Size |
---|---|---|
pgbench-sleeping-progress-1.patch | text/x-diff | 877 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2015-03-22 10:30:05 | Re: proposal: searching in array function - array_position |
Previous Message | Pavel Stehule | 2015-03-22 09:46:02 | Re: [PATCH] Add transforms feature |