← Inside a computer

Find the bottleneck

A job is only as fast as its slowest part, the bottleneck. Run jobs on an old laptop, see how long each part takes, and upgrade the part that matters: more RAM for many tabs, an SSD for loading, a faster network for downloads, a graphics card for AI.

An old laptop takes a minute and a half to load a game level. You can upgrade one part. Which?

Every job uses several parts. Each part takes some time, and the slowest part, the bottleneck, decides how long you wait. Upgrade the bottleneck and the job speeds up; upgrade anything else and it barely changes.

PredictRead the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.

One upgrade

An old laptop (2 cores, 2.0 GHz, 8 GB RAM, 1 TB hard disk) takes 90 seconds to load a game level. Which one upgrade helps most?

TryTry it on the board and compare the result with your prediction.

Try: run three jobs

Was your prediction right? Look at the red bar each time.

Try it yourselfYour edits are saved in this browser.

Run all three jobs on the old laptop. Which part is the slowest for each one?

Use the board. This ticks when you get there.

InvestigateWork out why it happens, one step at a time.

Worked example: where the 90 seconds go

Worked exampleBefore each step, say what you think comes next.
  1. processor=40÷(2×2)=10 s\text{processor} = 40 \div (2 \times 2) = 10\ \text{s}Work ÷ (cores it can use × GHz).

Now try a faster processor instead.

Same old laptop, but with a processor twice as fast (4 GHz) and still the hard disk. How many seconds does the game level take now?

Sam picks an upgrade. Click the line where it first goes wrong.

The tabs job swaps to the hard disk because the RAM is too small. Which upgrade fixes the cause?

ModifyChange the problem on purpose and see what happens.

Vary: one change each

Try it yourselfYour edits are saved in this browser.

Switching tabs takes 86 s. Change one part to get it under 5 seconds, then run it.

Use the board. This ticks when you get there.

Now the download. Change one part to get it under 200 seconds.

Use the board. This ticks when you get there.

Train the small AI model. Get it under 60 seconds.

Use the board. This ticks when you get there.

Non-example: give the old laptop 32 cores at 4.0 GHz and run the download again. Is it much faster?

Use the board. This ticks when you get there.

PractiseA few on your own, to check you have it.

Name the bottleneck

A video call goes blocky and freezes, but the laptop is new and fast. What is the most likely bottleneck?

An old computer with a hard disk takes two minutes to start up. Which upgrade helps most?

Why do companies train AI models on graphics cards rather than processors?

Review: which spec empties when the power goes off?

MakeMake your own problem using what you have learned. Expect a few tries; that is normal.

Fix the slow export

Then: what is the bottleneck on your own device when it feels slow?

Try it yourselfYour edits are saved in this browser.
Need a hint?

Run it first and find the red bar.

Another hint

The processor is the bottleneck. Which processor spec can the job use more of?

Another hint

The export can use up to 8 cores.

This laptop takes 103 s to export the video. Get it under 60 seconds by changing only one spec.

Use the board. This ticks when you get there.

For teachers

Students run jobs on an old laptop, see how long each part takes, find each job's bottleneck and upgrade only that part (AC9TDI8K01 node 2). About 40 minutes.

Open the teacher guide: answers, solutions, slides and a worksheet.

Students will be able to

Before class

Try the boards yourself.

The one idea: the slowest part decides. This is the hinge for lesson 3: without it, choosing hardware becomes picking the biggest numbers.

The model is simplified on purpose and says so: times add up part by part, the work amounts are made up but in proportion, a hard disk reads about 100 MB/s and an SSD about 2000 MB/s, and when RAM is too small the computer swaps to storage. Real computers overlap these steps and use caches, so real timings are messier; the idea that the slowest part dominates holds.

Hands-on: open Task Manager (Windows) or Activity Monitor (macOS) while a big download or video export runs, and look at which graph is at the top.

Running the lesson

  1. Predict: students who chose the processor will meet the 85 s answer in the worked example.
  2. Try: ask what is different about the three red bars.
  3. Worked example: before the SSD line, ask which part an upgrade should target.
  4. Vary: after task 4, ask why 32 cores didn't help.
  5. Make: ask who used 16 cores and whether that was better than 8 (the export can only use 8).

The hard part (on purpose)

Students reach for "a faster processor" for everything. Let them try it on the download (Vary task 4) and see almost nothing change, rather than telling them.

When students get stuck

Stretch and support

Stretch: After you fix one bottleneck, another part becomes the slowest. Fix the game load until the processor is the bottleneck, then keep going: when does it stop being worth it?

Support: A three-step card: run it, find the longest bar, change only that part.

Where it leads

Next: Choose the hardware (a job, a budget and trade-offs).

Links: Networks (bandwidth versus latency: a video call needs both).

Sources

What each step is for

Now you can
Next lesson3. Choose the hardwareChoosing hardware starts from the job, not the biggest numbers: work out what the job needs most, compare the options on that, weigh the trade-offs, and spend the budget where the bottleneck is.