Apps Artificial Intelligence CSS DevOps Go JavaScript Laravel Linux MongoDB MySQL PHP Python Rust Svelte Vue

Find the Most Resource-Intensive Processes on Linux

1 min read .
Find the Most Resource-Intensive Processes on Linux

When a Linux system feels slow, a small number of processes may be consuming most of the CPU, memory, or disk I/O. Several standard tools help identify them quickly.

Highest CPU Usage with ps

ps aux --sort=-%cpu | head

For more rows:

ps aux --sort=-%cpu | head -n 20

Highest Memory Usage

ps aux --sort=-%mem | head

This is a snapshot. For changing workloads, use a live monitor.

Interactive Monitoring with top

top

Press P to sort by CPU and M to sort by memory in common implementations.

Use htop for an Interactive View

sudo apt install htop   # Debian/Ubuntu
sudo dnf install htop   # Fedora/RHEL-family systems where available
htop

htop provides interactive sorting, filtering, tree views, and signaling.

Monitor Disk I/O with iotop

sudo iotop

Install it from your distribution’s package repository if necessary. I/O-heavy processes can make a system feel slow even when CPU usage is modest.

Per-Process Statistics with pidstat

pidstat is part of the sysstat package on many distributions:

pidstat -u 1   # CPU every second
pidstat -r 1   # memory statistics
pidstat -d 1   # disk I/O statistics

Repeated samples are often more useful than a single snapshot for intermittent problems.

Interpret the Result Before Killing Anything

High resource use is not automatically a bug. A compiler, database query, backup, or batch job may legitimately use available resources. Check what the process is doing, whether the load is expected, and whether service-level symptoms actually correlate with it.

Conclusion

Use ps for quick ranked snapshots, top or htop for live monitoring, iotop for disk activity, and pidstat for repeated per-process measurements. Combine the tools rather than assuming CPU percentage alone explains every performance issue.

Related Posts

chevron-up