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

Response times degrade as a host's uptime grows; restarting the app fixes it for a few days.

IntermediateTroubleshootingLoad, CPU and I/O performance
Answer

Likely causes → A resource leak inside the app: memory, file descriptors, threads, connections or a growing in-memory cache.

Diagnose →

ps -o pid,etime,rss,nlwp -p <PID>
ls /proc/<PID>/fd | wc -l

Graph RSS, fd count and thread count over days.

Fix → Hand the trend data to the developers along with heap and thread dumps. Meanwhile, use scheduled rolling restarts as a stopgap.

Prevent → Add per-process resource metrics to your dashboards.

All Linux questions Roadmap: Linux

More on Load, CPU and I/O performance