Toolvito

Works on this device

Amdahl Law Calculator

Amdahl's law tells how much faster a fixed job runs on more processors when only a part of it can run in parallel. Enter the parallel part and the number of processors to get the speedup, its limit, a table and a chart.

Enter your values

Find how much faster a fixed job runs on more processors when only a part of it can run in parallel.

Your values

The share of the run time on one processor that more processors can speed up. The rest always runs on one.

Processors, cores, threads or machines that share the parallel part.

More options

The table and the chart go up in steps of two times: 1, 2, 4, 8 and so on.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose Speedup from the parallel part and the processors.
  2. Enter the part of the work that can run in parallel, as a percent of the run time on one processor.
  3. Enter the number of processors and choose Calculate.
  4. Read the speedup, the efficiency and the limit. The table and the chart show the speedup for 1, 2, 4, 8 and more processors.
  5. Use the other options to find the parallel part from a measured speedup, or the processors needed for a speedup you want.

The formulas

  • Amdahl's law: speedup = 1 ÷ ((1 − p) + p ÷ n). Here p is the part that can run in parallel, as a fraction, and n is the number of processors.
  • Limit: as n grows, the speedup comes close to 1 ÷ (1 − p) and never passes it.
  • Parallel part from a measurement: p = (1 − 1 ÷ speedup) ÷ (1 − 1 ÷ n).
  • Processors for a speedup S: n = p × S ÷ (1 − S × (1 − p)), rounded up.
  • Efficiency = speedup ÷ n.
  • Gustafson's law: scaled speedup = (1 − p) + p × n. Here p is the parallel part of the run time on the n processors, and the work grows with n.

Worked example

A job spends 90% of its time in work that can run in parallel. On 8 processors: 1 ÷ (0.1 + 0.9 ÷ 8) = 1 ÷ 0.2125 = 4.706 times. The efficiency is 4.706 ÷ 8 = 58.8%. The limit is 1 ÷ 0.1 = 10 times, however many processors you add.

To reach 5 times with the same job you need 0.9 × 5 ÷ (1 − 5 × 0.1) = 4.5 ÷ 0.5 = 9 processors. To reach 10 times no number is enough.

Gustafson's law with 90% and 8 processors gives 0.1 + 0.9 × 8 = 7.3 times. It is larger because the work is allowed to grow.

Limits you should know

  • Amdahl's law keeps the amount of work fixed and takes the parallel part as perfectly shared. It leaves out the cost of starting, waiting and talking between processors, so real programs gain less.
  • The parallel part is hard to know before you measure. A value found from one measurement often changes when you measure with more processors.
  • The two laws measure the parallel part in different ways, so do not put the same percent into both and read it as one program.
  • To work with your own run times, use the Parallel Speedup Calculator or the CPU Core Scaling Calculator.

Related tools