CPU scaling benchmark
workers
9 +1 main
iters total
500M
50000000/stream
elapsed
1169.48 ms
total CPU used
10302.8 ms
speedup
8.81×
vs serial
efficiency
88.1%
of 10× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 15.72 | 15.73 | 1150.24 | 1134.51 | 0 |
| 1 | 2.22 | 2.23 | 22.84 | 823.35 | 800.51 | 0.13 |
| 2 | 1.657 | 3.91 | 45.3 | 1156.7 | 1111.4 | 6.59 |
| 3 | 1.632 | 5.56 | 31.73 | 1026.4 | 994.67 | 0.19 |
| 4 | 1.647 | 7.22 | 30.03 | 1105.74 | 1075.71 | 0.2 |
| 5 | 1.719 | 8.96 | 43.41 | 1019.74 | 976.33 | 0.21 |
| 6 | 1.562 | 10.53 | 45.74 | 1097.54 | 1051.8 | 0.23 |
| 7 | 1.596 | 12.14 | 54.09 | 1090.25 | 1036.16 | 0.24 |
| 8 | 1.949 | 14.11 | 60.53 | 1079.16 | 1018.63 | 0.25 |
| 9 | 1.596 | 15.71 | 63.36 | 1166.44 | 1103.08 | 16.33 |
main
w1
w2
w3
w4
w5
w6
w7
w8
w9
fork+handshake
CPU work
parent reap wait
what this measures
Each stream runs a tight integer LCG loop — working set is one CPU register, no memory access,
no shared data. Speedup = sum(stream CPU time) / wall-clock elapsed. Efficiency = speedup / (workers+1).
100% efficiency means perfect linear scaling; less than 100% is the cost of serial fork setup,
reap tail, SMT/core contention.