CPU scaling benchmark
workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1209.95 ms
total CPU used
7006.22 ms
speedup
5.79×
vs serial
efficiency
82.7%
of 7× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 13.3 | 13.31 | 938.02 | 924.71 | 0 |
| 1 | 2.219 | 2.23 | 14.64 | 1055.3 | 1040.66 | 119.38 |
| 2 | 1.581 | 3.84 | 22.97 | 1123.25 | 1100.28 | 185.36 |
| 3 | 2.167 | 6.02 | 17.73 | 767.3 | 749.57 | 0.13 |
| 4 | 1.788 | 7.82 | 37.74 | 1076.24 | 1038.5 | 138.35 |
| 5 | 3.817 | 11.65 | 65.06 | 1207.01 | 1141.95 | 269.13 |
| 6 | 1.628 | 13.29 | 51.52 | 1062.07 | 1010.55 | 126.67 |
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.