How to calculate speedup with Amdahl’s law
Use the shares of original runtime for a fixed amount of work. Let p be the share that gets faster and k the speedup of that part. The remaining share is 1 − p. For ideal parallel workers, k equals the worker count for the parallel part.
New runtime ÷ original runtime = (1 − p) + p ÷ k.
Overall speedup = 1 ÷ [(1 − p) + p ÷ k].
Suppose 80% of an original 100-second run uses four ideal workers. The unchanged 20 seconds remain. The 80-second part takes 20 seconds, so the modeled run takes 40 seconds and the overall speedup is 2.5×. Modeled efficiency is 2.5 ÷ 4 = 62.5%.
Find the minimum ideal workers for a target
For a target S above 1×, divide p by 1/S − (1 − p) and round up to a whole worker. The denominator must be positive. With 80% improved, a 3× target needs 6 ideal workers. The theoretical 5× ceiling is approached as worker count grows, but no finite count reaches it.
A 1× target needs one worker. If the entire original runtime can improve, the ideal model has no finite speedup ceiling. If none can improve, the ceiling is 1×.
Model a faster part or an additional time cost
Use the local speedup mode for an improvement such as making a stage twice as fast. You can add a measured or assumed time cost as a percentage of original runtime for that scenario. The worksheet adds it to the new time. The ideal-worker table and inverse use the no-overhead model.
The model assumes fixed work and ideal scaling for the improved share. Memory bandwidth, communication and coordination affect observed performance. The Cornell Virtual Workshop’s explanation of Amdahl’s law discusses the bound on parallel speedup.