The problem
A slow laptop is a symptom; four parts can be the limit
Calls stutter and a build takes 9 minutes, not 4. Before replacing anything, measure.
This laptop is 2 years old, with 8 cores and 16 gigabytes of memory. Its owner says video calls stutter. And a build that used to take 4 minutes now takes 9. The tempting answer is a new laptop. The method says something else: collect the facts, then measure every resource before blaming one.
Measure first
Read every gauge before naming a cause
CPU 35% busy. Memory full with 6 GB of swap, disk busy 100%, and the CPU throttled to 1.2 GHz.
We open Task Manager, or Activity Monitor on a Mac, and start a build. The processor is only 35 percent busy. Memory is 15.4 of 16 gigabytes, the disk is busy all the time, and the SSD is 94 percent full. And the processor is at 98 degrees, running at 1.2 gigahertz instead of up to 4.4. Three gauges are at their limit, and the processor is not one of them.
The first guess
A processor that mostly waits is not the limit
At 35% busy the processor waits 65% of the time. A faster one would wait faster.
The first guess was a slow processor. But it is working only 35 percent of the time. The rest of the time it waits, for memory pages coming back from the disk. A faster processor would simply wait faster, and in most laptops it is soldered in anyway. One reading has ruled the guess out.
The cause
Memory runs out, the disk stands in, and everything waits
Memory full, 6 GB swapped, disk saturated. Separately, dust makes the CPU throttle to 1.2 GHz.
Here is the chain. Memory is full, so the operating system moves 6 gigabytes of pages to the swap file. The disk is now busy all the time, and every program waits for it. A nearly full SSD makes those writes slower still. And there is a second cause. Dust in the vents has pushed the processor to 98 degrees, so it cuts its own clock to stay safe. The biggest user of memory is a virtual machine that was left running after a test, next to sixty browser tabs.
The fix
Fix the cause, then read the same gauges again
Shut the VM, close tabs, clear the SSD to 70%, clean the vents. The build takes 4.5 minutes again.
Before, everything is red. After: we shut down the virtual machine and close the tabs nobody needs, so memory drops to 10.8 gigabytes and swap nearly empties. We clear old downloads until the SSD is 70 percent full, and clean the vents, so the processor runs cooler and back at 4.0 gigahertz. The build takes four and a half minutes again. The same readings prove it.
The trade-off
The cheapest fix that removes the cause comes first
Habits and cleaning cost nothing. More memory needs a free slot. A new laptop costs the most.
Changing habits and cleaning the vents costs nothing and fixes both causes, as long as the habits hold. Adding memory would also stop the swapping, but many thin laptops have their memory soldered to the board, and it would not fix the heat. A new laptop fixes everything, at the highest cost, for a machine that works once cleaned. We choose the first, and keep more memory in reserve.
The method
Six steps, the same for every fault
Identify, theory, test, fix, verify, document. Each step links to the lesson that teaches its reading.
Here is the whole case on the six steps of the method. Identify the problem. Form a theory by reading every gauge. Test it: the swap and the disk confirm it. Plan and fix. Verify with the same readings, and stop it coming back. Then write it down, with the readings as a baseline. Each step opens the lesson that teaches it.
A real case
At Netflix, a slow server gets ten checks in a fixed order
Netflix checks errors and saturation first, then utilization. vmstat, iostat and free would have named our cause.
Netflix’s performance engineers published the ten commands they run in the first minute on a slow Linux server, always in the same order. They look for errors and for anything saturated first, because those are easy to read, and only then at how busy each part is. On our laptop, three of the ten would have named the cause straight away: vmstat shows the swapping, iostat shows the disk at a hundred percent, and free shows memory full. The habit is the same: look at everything before you blame one part.
Lesson complete
You finished “The laptop got slow”
Nicely done.