CPU scaling benchmark
workers
9 +1 main
iters total
500M
50000000/stream
elapsed
1167.84 ms
total CPU used
9893.36 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 | 32.48 | 32.49 | 893.35 | 860.86 | 0 |
| 1 | 1.847 | 1.86 | 15.81 | 1112.15 | 1096.34 | 221.22 |
| 2 | 1.415 | 3.3 | 22.62 | 1097.04 | 1074.42 | 208.9 |
| 3 | 2.665 | 5.98 | 23.34 | 957.4 | 934.06 | 66.85 |
| 4 | 2.567 | 8.57 | 44.7 | 1119.22 | 1074.52 | 226 |
| 5 | 3.159 | 11.75 | 40.38 | 1164.8 | 1124.42 | 271.59 |
| 6 | 1.374 | 13.14 | 48.58 | 755.07 | 706.49 | 0.13 |
| 7 | 9.997 | 23.16 | 64.6 | 1165.2 | 1100.6 | 274.39 |
| 8 | 3.15 | 26.32 | 54.6 | 975.5 | 920.9 | 87.17 |
| 9 | 6.127 | 32.47 | 74.67 | 1075.42 | 1000.75 | 187.11 |
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.