CPU scaling benchmark
workers
6 +1 main
iters total
100M
14285714/stream
elapsed
274.55 ms
total CPU used
1293.96 ms
speedup
4.71×
vs serial
efficiency
67.3%
of 7× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 20.65 | 20.66 | 251.81 | 231.15 | 0 |
| 1 | 2.395 | 2.41 | 16.76 | 207.29 | 190.53 | 0.13 |
| 2 | 1.887 | 4.32 | 17.97 | 164.42 | 146.45 | 0.19 |
| 3 | 1.854 | 6.21 | 19.49 | 148.86 | 129.37 | 0.2 |
| 4 | 2.063 | 8.29 | 61.31 | 270.95 | 209.64 | 19.29 |
| 5 | 10.045 | 18.36 | 44.36 | 247.89 | 203.53 | 0.22 |
| 6 | 2.266 | 20.64 | 48.68 | 231.97 | 183.29 | 0.25 |
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.