Toolvito

Works on this device

Parallel Speedup Calculator

Enter the run time of a job on one worker and on several workers. The tool gives the speedup, the efficiency and the Karp-Flatt serial fraction. A worker is a processor, a core, a thread or a machine. All numbers are your own measurements.

Enter your values

Enter what you measured on one worker and on all the workers. Get the speedup, the efficiency and the serial fraction behind them.

Your values

Use the same unit for both run times, for example seconds.

Processors, cores, threads or machines that shared the work.

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. Run the same job on one worker and on several workers, and note the two run times.
  2. Choose Speedup and efficiency from two measurements and enter the two times and the number of workers. Use the same unit for both times.
  3. Choose Calculate. Read the speedup, the efficiency and the serial fraction.
  4. If you measured several worker counts, choose Karp-Flatt metric from several measured speedups and enter one row for each.

The formulas

  • Speedup = run time on one worker ÷ run time on n workers. With work rates it is the rate on n workers ÷ the rate on one.
  • Efficiency = speedup ÷ n × 100.
  • Karp-Flatt serial fraction = (1 ÷ speedup − 1 ÷ n) ÷ (1 − 1 ÷ n). It is the share of the work that behaves as if it ran on one worker, found from the measurement.
  • Prediction: parallel part p = (1 − 1 ÷ speedup) ÷ (1 − 1 ÷ n), then speedup on m workers = 1 ÷ ((1 − p) + p ÷ m). This is Amdahl's law.

Worked example

A job takes 240 seconds on one worker and 38 seconds on 8 workers. Speedup: 240 ÷ 38 = 6.316 times. Efficiency: 6.316 ÷ 8 = 78.9%. The run time is 84.2% shorter.

Karp-Flatt: (1 ÷ 6.316 − 1 ÷ 8) ÷ (1 − 1 ÷ 8) = 0.0381, so 3.81% of the work behaves as serial. If that stays the same, the speedup can never pass 1 ÷ 0.0381 = 26.25 times.

How to read several rows: speedups of 1.82, 2.50, 3.08 and 4.71 on 2, 3, 4 and 8 workers all give a serial fraction of about 10%. A fraction that stays the same points to a serial part of the program. A fraction that grows points to a growing cost of running in parallel.

Limits you should know

  • The results are only as good as the measurements. Use the same program, input and settings for both runs, and repeat each run.
  • A prediction from one measurement is a thin basis. The serial fraction often grows with the workers, so a prediction for many more workers is usually too high.
  • A speedup above the number of workers can happen, for example when smaller parts of the work fit the processor cache better. Check the measurements first.
  • To start from a parallel part in percent, without measurements, use the Amdahl Law Calculator. For a table of run times by core count, use the CPU Core Scaling Calculator.

Related tools