CPU scaling benchmark
workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1157.3 ms
total CPU used
7233.15 ms
speedup
6.25×
vs serial
efficiency
89.3%
of 7× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 13.97 | 13.98 | 962.76 | 948.78 | 0 |
| 1 | 2.232 | 2.25 | 15.04 | 1141.77 | 1126.73 | 179.18 |
| 2 | 1.826 | 4.1 | 18.35 | 1118.21 | 1099.86 | 158.4 |
| 3 | 1.807 | 5.92 | 23.31 | 986.62 | 963.31 | 29.33 |
| 4 | 4.637 | 10.57 | 44.35 | 993.14 | 948.79 | 35.76 |
| 5 | 1.697 | 12.28 | 44.35 | 1154.11 | 1109.76 | 191.51 |
| 6 | 1.658 | 13.96 | 44.35 | 1080.27 | 1035.92 | 117.65 |
main
w1
w2
w3
w4
w5
w6
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.