CPU scaling benchmark
workers
10 +1 main
iters total
500M
45454545/stream
elapsed
1172.67 ms
total CPU used
11693.34 ms
speedup
9.97×
vs serial
efficiency
90.6%
of 11× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 30.59 | 30.6 | 1067.48 | 1036.88 | 0 |
| 1 | 2.016 | 2.03 | 15.56 | 1124.44 | 1108.88 | 57.06 |
| 2 | 1.496 | 3.56 | 35.17 | 1069.51 | 1034.34 | 12.75 |
| 3 | 1.486 | 5.06 | 28.77 | 1099.94 | 1071.17 | 32.57 |
| 4 | 2.756 | 7.84 | 28.85 | 1101.19 | 1072.34 | 45.4 |
| 5 | 1.86 | 9.71 | 50.28 | 1169.72 | 1119.44 | 102.39 |
| 6 | 2.214 | 11.95 | 50.32 | 1137.03 | 1086.71 | 69.65 |
| 7 | 1.609 | 13.58 | 51.19 | 1110.43 | 1059.24 | 45.41 |
| 8 | 7.439 | 21.03 | 70.34 | 1125.48 | 1055.14 | 60 |
| 9 | 2.023 | 23.07 | 58.16 | 1081.41 | 1023.25 | 16.87 |
| 10 | 7.497 | 30.58 | 63.04 | 1088.99 | 1025.95 | 21.6 |
main
w1
w2
w3
w4
w5
w6
w7
w8
w9
w10
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.