diff options
author | Noah Misch <noah@leadboat.com> | 2013-10-06 09:56:43 -0400 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2013-10-06 09:57:26 -0400 |
commit | 7db0dc0eac4512253c2ec0e6bea60ecd2d7bea27 (patch) | |
tree | ebc168319cd674cd173b547547daae8034aed549 | |
parent | bf2617981ceb88bdcd3cba58308d68f0c4ea3de2 (diff) | |
download | postgresql-7db0dc0eac4512253c2ec0e6bea60ecd2d7bea27.tar.gz postgresql-7db0dc0eac4512253c2ec0e6bea60ecd2d7bea27.zip |
pgbench: Comment on thread timing hazards.
Reviewed by Fabien COELHO.
-rw-r--r-- | contrib/pgbench/pgbench.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 926246e67ba..816400f6dd8 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -2896,7 +2896,16 @@ main(int argc, char **argv) } disconnect_all(state, nclients); - /* get end time */ + /* + * XXX We compute results as though every client of every thread started + * and finished at the same time. That model can diverge noticeably from + * reality for a short benchmark run involving relatively many threads. + * The first thread may process notably many transactions before the last + * thread begins. Improving the model alone would bring limited benefit, + * because performance during those periods of partial thread count can + * easily exceed steady state performance. This is one of the many ways + * short runs convey deceptive performance figures. + */ INSTR_TIME_SET_CURRENT(total_time); INSTR_TIME_SUBTRACT(total_time, start_time); printResults(ttype, total_xacts, nclients, threads, nthreads, |