MidLinux

A Linux box is sluggish and load is high. Walk me through finding the cause.

What they are really testing: Whether you reason about WHAT kind of saturation it is (CPU vs I/O vs memory) instead of blindly killing the top process. Senior signal: load average is not just CPU.

A real interview question

A Linux box is sluggish and load is high. Walk me through finding the cause.

What most people say

drag me

I would open top and kill whatever is using the most CPU.

It assumes the problem is CPU, but high load is often I/O wait or memory pressure where the top-CPU process is innocent. Killing blindly can take down the wrong thing and lose data.

The follow-ups they ask next

  • Load is high but CPU usage is low. What does that mean?

    Classic I/O wait: processes are blocked on disk/network (uncovered by %wa and state D in top), so they count toward load without using CPU. Investigate the storage/dependency, not the CPU.

  • The app slows down over days and recovers on restart. What do you suspect?

    A memory leak: RSS grows until swapping or OOM. Confirm with memory trend over time; fix the leak, and set a memory limit so it is OOMKilled and restarted instead of dragging the whole host.

What the interviewer is listening for

  • Compares load to core count
  • Separates CPU vs I/O wait vs memory
  • Uses iostat/iotop for I/O
  • Understands before killing

What sinks the answer

  • Assumes high load = CPU
  • Kills the top process blindly
  • Unaware of I/O wait or swap

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

I read [load average vs core count], then split it in top: [high %us = CPU app, high %wa = I/O wait, swap = memory]. I find the offender with [htop or iotop/iostat], decide [legit load to scale vs a runaway to fix], then [confirm recovery and add a limit/alert].

Keep going with linux

All 336 cloud engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free