Interview Prep/Linux/Load, CPU and I/O performance

`top` itself is slow to refresh and `ps` takes seconds on a host with 50,000 processes.

BeginnerTroubleshootingLoad, CPU and I/O performance
Answer

Likely causes → Reading /proc for that many processes is costly; often a fork bomb or a runaway process spawner.

Diagnose →

ps -eo user= | sort | uniq -c | sort -rn | head
ps -eo comm= | sort | uniq -c | sort -rn | head

Fix → Stop the spawner (pkill -STOP -u <user> first to freeze, then kill), fix the script or service.

Prevent → Set TasksMax= per service and nproc limits per user.

All Linux questions Roadmap: Linux

More on Load, CPU and I/O performance