CPU scaling benchmark
workers
9 +1 main
iters total
500M
50000000/stream
elapsed
1150.78 ms
total CPU used
9741.56 ms
speedup
8.47×
vs serial
efficiency
84.7%
of 10× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 41.04 | 41.05 | 1145.93 | 1104.88 | 0 |
| 1 | 2.254 | 2.27 | 16.78 | 892.8 | 876.02 | 0.17 |
| 2 | 1.762 | 4.06 | 18.73 | 1046.28 | 1027.55 | 0.23 |
| 3 | 3.608 | 7.69 | 20.69 | 1091.9 | 1071.21 | 0.24 |
| 4 | 2.134 | 9.84 | 62.07 | 1148.02 | 1085.95 | 2.23 |
| 5 | 6.947 | 16.82 | 71.57 | 1060.7 | 989.13 | 0.25 |
| 6 | 6.014 | 22.84 | 53.99 | 752.19 | 698.2 | 0.28 |
| 7 | 1.805 | 24.67 | 49.63 | 845.25 | 795.62 | 0.29 |
| 8 | 12.227 | 36.91 | 70.95 | 1125.95 | 1055 | 0.31 |
| 9 | 4.082 | 41.02 | 96.52 | 1134.52 | 1038 | 0.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.