CPU scaling benchmark
workers
9 +1 main
iters total
500M
50000000/stream
elapsed
1153.05 ms
total CPU used
10432.83 ms
speedup
9.05×
vs serial
efficiency
90.5%
of 10× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 23.52 | 23.53 | 1090.75 | 1067.22 | 0 |
| 1 | 2.143 | 2.16 | 23.65 | 1034.46 | 1010.81 | 0.15 |
| 2 | 1.623 | 3.81 | 39.61 | 1132.79 | 1093.18 | 42.16 |
| 3 | 1.563 | 5.39 | 25.91 | 1138.15 | 1112.24 | 47.5 |
| 4 | 1.584 | 6.99 | 32.71 | 1041.97 | 1009.26 | 0.24 |
| 5 | 1.65 | 8.67 | 37.99 | 1042.58 | 1004.59 | 0.25 |
| 6 | 1.555 | 10.24 | 39.63 | 1129.65 | 1090.02 | 41.8 |
| 7 | 4.433 | 14.69 | 50.12 | 1097.16 | 1047.04 | 6.51 |
| 8 | 1.822 | 16.53 | 68.07 | 1150.56 | 1082.49 | 59.94 |
| 9 | 6.964 | 23.51 | 61.12 | 977.1 | 915.98 | 0.27 |
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.