CPU scaling benchmark
workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1156.46 ms
total CPU used
7104.22 ms
speedup
6.14×
vs serial
efficiency
87.7%
of 7× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 10.71 | 10.72 | 1138.07 | 1127.35 | 0 |
| 1 | 2.029 | 2.05 | 18.38 | 1149.03 | 1130.65 | 11.1 |
| 2 | 1.556 | 3.63 | 24.17 | 1018.7 | 994.53 | 0.17 |
| 3 | 1.667 | 5.32 | 20.88 | 770.47 | 749.59 | 0.23 |
| 4 | 2.098 | 7.45 | 38.74 | 1038.18 | 999.44 | 0.26 |
| 5 | 1.815 | 9.28 | 38.7 | 1153.98 | 1115.28 | 16.02 |
| 6 | 1.403 | 10.7 | 42.39 | 1029.77 | 987.38 | 0.27 |
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.