CPU scaling benchmark
workers
8 +1 main
iters total
500M
55555555/stream
elapsed
1176.72 ms
total CPU used
9147.93 ms
speedup
7.77×
vs serial
efficiency
86.3%
of 9× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 15.48 | 15.49 | 1006.3 | 990.81 | 0 |
| 1 | 2.004 | 2.02 | 19.79 | 1132.99 | 1113.2 | 126.82 |
| 2 | 1.592 | 3.63 | 20.68 | 1050.37 | 1029.69 | 54.22 |
| 3 | 1.508 | 5.15 | 28.99 | 1075.34 | 1046.35 | 69.14 |
| 4 | 1.484 | 6.65 | 50.57 | 1116.18 | 1065.61 | 110.03 |
| 5 | 1.56 | 8.23 | 40.61 | 1076.68 | 1036.07 | 74.39 |
| 6 | 1.454 | 9.7 | 62.97 | 1173.7 | 1110.73 | 167.56 |
| 7 | 4.289 | 14 | 47.66 | 1088.75 | 1041.09 | 84.26 |
| 8 | 1.453 | 15.46 | 42.3 | 756.68 | 714.38 | 0.13 |
main
w1
w2
w3
w4
w5
w6
w7
w8
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.