CPU scaling benchmark
workers
8 +1 main
iters total
500M
55555555/stream
elapsed
1167.83 ms
total CPU used
9729.32 ms
speedup
8.33×
vs serial
efficiency
92.6%
of 9× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 28.27 | 28.28 | 1157.05 | 1128.77 | 0 |
| 1 | 1.974 | 1.99 | 18.74 | 1143.26 | 1124.52 | 0.13 |
| 2 | 1.503 | 3.52 | 22.45 | 1098.22 | 1075.77 | 0.2 |
| 3 | 1.415 | 4.95 | 21.53 | 1030.94 | 1009.41 | 0.22 |
| 4 | 4.311 | 9.28 | 32.88 | 1112.94 | 1080.06 | 0.23 |
| 5 | 1.625 | 10.92 | 39.05 | 1070.68 | 1031.63 | 0.24 |
| 6 | 1.712 | 12.65 | 41.97 | 1117.69 | 1075.72 | 0.25 |
| 7 | 1.539 | 14.21 | 40.29 | 1139.82 | 1099.53 | 0.26 |
| 8 | 14.03 | 28.26 | 61.07 | 1164.98 | 1103.91 | 8.03 |
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.