CPU scaling benchmark
workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1111.81 ms
total CPU used
4346.42 ms
speedup
3.91×
vs serial
efficiency
97.8%
of 4× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 5.03 | 5.04 | 1084.19 | 1079.15 | 0 |
| 1 | 1.973 | 1.99 | 16.29 | 1106.03 | 1089.74 | 22 |
| 2 | 1.516 | 3.53 | 16.61 | 1106.52 | 1089.91 | 27.45 |
| 3 | 1.478 | 5.02 | 18.74 | 1106.36 | 1087.62 | 27.55 |
main
w1
w2
w3
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.