Skip to content

Commit 7db0dc0

Browse files
committed
pgbench: Comment on thread timing hazards.
Reviewed by Fabien COELHO.
1 parent bf26179 commit 7db0dc0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

contrib/pgbench/pgbench.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,16 @@ main(int argc, char **argv)
28962896
}
28972897
disconnect_all(state, nclients);
28982898

2899-
/* get end time */
2899+
/*
2900+
* XXX We compute results as though every client of every thread started
2901+
* and finished at the same time. That model can diverge noticeably from
2902+
* reality for a short benchmark run involving relatively many threads.
2903+
* The first thread may process notably many transactions before the last
2904+
* thread begins. Improving the model alone would bring limited benefit,
2905+
* because performance during those periods of partial thread count can
2906+
* easily exceed steady state performance. This is one of the many ways
2907+
* short runs convey deceptive performance figures.
2908+
*/
29002909
INSTR_TIME_SET_CURRENT(total_time);
29012910
INSTR_TIME_SUBTRACT(total_time, start_time);
29022911
printResults(ttype, total_xacts, nclients, threads, nthreads,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy