Interview Prep/Linux/Migrations, performance and fleet operations

A batch server is constantly swapping and the job is 10× slower. What do you do?

IntermediateScenarioMigrations, performance and fleet operations
Answer

Situation read → The working set doesn't fit in RAM.

What I'd do →

  1. Confirm: vmstat 1 (si/so high), sar -B (major faults), smem -s swap or grep VmSwap /proc/*/status.
  2. Short term: reduce concurrency or memory settings (JVM -Xmx, worker count).
  3. Lower vm.swappiness (e.g. 10) if cache is pushing app pages out.
  4. Long term: add RAM / bigger instance, or fix the job to stream data instead of loading it all.

Why → Swapping replaces nanosecond memory access with millisecond disk access.

Interview tip → Say you'd use cgroups (MemoryHigh) to isolate the batch job from other services.

All Linux questions Roadmap: Linux

More on Migrations, performance and fleet operations