LightMySky

Many Cores and the Limit on Speedup

For a fixed workload with unchanged serial time, Amdahl's ideal model gives speedup 1 / (s + (1 - s) / N), where s is the serial fraction and N is the core count. For positive s, 1 / s is the limiting bound. Coordination and resource contention can reduce gains.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Compute ideal finite-core speedup and the limiting bound for a fixed workload that is one tenth serial
  • Distinguish work that splits across cores from work that splits across data lanes
  • Explain why adding cores can make a program slower

1 · Read

Pipelining overlaps stages inside a core; multiple cores can share a program's work. In Amdahl's model, the workload stays fixed and the serial part takes the same time. If its positive fraction is s, speedup approaches the bound 1 / s as core count grows. A serial tenth gives a tenfold bound, not tenfold speedup at every count.

serial part: unchangedparallel part: divided
The serial part keeps its duration. Only the parallel part is divided among cores. Dividing both parts changes Amdahl's assumptions.
Try it together

Normalize the one-core time to 1. For N cores, ideal time is s + (1 - s) / N; speedup is 1 divided by that time. This assumes equal sharing of the parallel part and no added overhead. With s = 0.25 and N = 3, time is 0.25 + 0.75 / 3 = 0.5, so speedup is 2.

serial time: 0.25parallel time: 0.25total time: 0.5speedup: 2

Multiple cores can execute different instruction streams. SIMD data lanes apply the same operation to several data elements together. Both can be used by one program: several cores might each perform SIMD additions. Lanes do not turn the serial part of a fixed workload into independent tasks.

cores: instruction streamsSIMD lanes: same operation

Actual time includes overhead that the ideal formula leaves out. Dividing work, coordinating results and waiting for shared resources all take time. A lock allows controlled access to a shared resource; workers may have to wait for it. If these costs exceed the time saved by parallel work, more cores can make the program slower.

For a serial tenth on 100 cores, ideal time is 0.1 + 0.9 / 100 = 0.109. Speedup is 1 / 0.109, about 9.17. This is below ten because the parallel part still takes some time. Increasing N reduces that part, but leaves the serial 0.1 unchanged.

serial: 0.1parallel: 0.009total: 0.109speedup: about 9.17

For fixed work, unchanged serial time limits ideal speedup. Compute finite-core time before inverting it. Cores and SIMD lanes differ; overhead can erase the gain.

Original lesson, questions and flashcards written for this dataset.

2 · Watch

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Many Cores and the Limit on Speedup · Computing, ages 19 to 20 · LightMySky