CPU scaling benchmark
workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1206.4 ms
total CPU used
7526.08 ms
speedup
6.24×
vs serial
efficiency
89.1%
of 7× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 11.28 | 11.29 | 1061.78 | 1050.49 | 0 |
| 1 | 1.573 | 1.59 | 15.55 | 1023.68 | 1008.13 | 0.1 |
| 2 | 1.428 | 3.04 | 15.11 | 1068.28 | 1053.17 | 9.24 |
| 3 | 1.492 | 4.54 | 16.67 | 1110.55 | 1093.88 | 49.96 |
| 4 | 3.979 | 8.53 | 40.48 | 1203.4 | 1162.92 | 141.71 |
| 5 | 1.364 | 9.91 | 39.73 | 1197.5 | 1157.77 | 135.88 |
| 6 | 1.351 | 11.27 | 43.4 | 1043.12 | 999.72 | 0.16 |
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.