Bitpath

Boss lesson · Unit 01

Find the bottleneck

Amdahl's law on a slow nightly job, from profile to fix

13 exercisesabout 3 min

What you practise

  • Speed up 5% of the run time by 10× and see what you gain (Amdahl's law worked)
  • Profile, guess, fix, measure
  • Knowing when to stop

Try a question from this lesson

Pick one

A nightly job, profiled by stage. A teammate makes format 10× faster. About how long does the whole job take now?

stage         time   share
load data      5 s     5%
match rows    80 s    80%
format        10 s    10%
write file     5 s     5%
total        100 s
Hint

Only one row of the table changes. What happens to the other three?

The idea

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Amdahl's law

What a speed-up is worth depends on how much of the run it touches.

New time = untouched part + (sped-up part ÷ its speed-up)

The untouched part is a floor you cannot get under. If a stage is 10% of the run, making it infinitely fast saves 10% and no more.

So fix the biggest stage first, and work out the gain before you spend a week on it.

11 more exercises in the app

  • 4× type the answer
  • 4× multiple choice
  • 1× order the lines
  • 1× fill the blanks
  • 1× true or false

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy