Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
How do you troubleshoot system performance using `vmstat`, `iostat`, and `sar`?
senior LevelFormsPerformance
In Simple Words:
vmstat 1: High-level overview of processes (r,b), memory, swap (si,so), and CPU (us,sy,id,wa,st):- High
b(blocked processes) + highwa(I/O wait) indicates disk bottlenecks! si/so> 0 indicates active memory swapping (system running out of RAM).
- High
iostat -xz 1: Deep disk performance: inspects%util(disk saturation),await(average I/O latency in ms), and throughput (rkB/s,wkB/s).sar: Historical system activity reporter (CPU, memory, network interfaces over past days/weeks).