Root cause

What are the best tools for finding what is slowing down a Linux server?

The tools that find what is slowing a Linux server: top, vmstat, iostat, pidstat, perf, eBPF tools and continuous monitors, with when to use each.

By , Director of Softuvo Solutions (LinkedIn) · Updated

In short

To find what is slowing a Linux server, start with the built-in tools: top or htop for the hot process, vmstat for memory and run-queue pressure, iostat and pidstat for disk I/O, and dmesg for OOM kills and disk errors. Go deeper with perf and the eBPF tools (bpftrace, BCC). For a slowdown that already happened, you need history: sar, atop, or a continuous monitor such as Opservo.

Which tool answers which question?

ToolAnswersPackageCost
top / htopWhich process is using the CPU or memory right now; load and CPU steal (st)procps (top), htopFree, built in or one package
vmstatIs the box swapping (si, so), is the run queue longer than the cores (r), how much I/O waitprocpsFree, built in
iostat -xWhich disk is saturated: %util, await and queue size per devicesysstatFree
pidstat -d / -u / -rWhich process is doing the I/O, the CPU or the page faults, per secondsysstatFree
sarWhat CPU, memory, disk and network looked like at 3 a.m. yesterdaysysstat, with its collector enabledFree
atopPer-process history, so you can replay which process was busy during a past slowdownatopFree
dmesg / journalctlOOM kills, disk I/O errors, services restarting in a loopBuilt inFree
perfWhere the CPU time goes inside a process, down to the functionlinux-tools (matches your kernel)Free
bpftrace and BCC toolsLatency the counters hide: runqlat (CPU queueing), biolatency (disk), opensnoop, execsnoop, tcpretransbpftrace, bpfcc-tools; kernel 4.x or newerFree
NetdataPer-second charts of hundreds of metrics on each serverNetdata agentFree open-source agent; paid cloud plans
OpservoWhy the server is slow, in a sentence, with what changed and the fix; history for every serverOne-command agentFree for 2 servers; Growth ₹999 (about $12) per server per month

Compared on 10 November 2026

In what order should you use them?

Work from the resource down, not from the tool up. For each resource ask how busy it is, whether work is queueing for it, and whether it is reporting errors. The first resource that is saturated is usually the answer.

uptime; nproc                 # load vs cores
vmstat 1 5                    # r > cores? si/so non-zero? wa high?
free -m; df -h; df -i         # memory, space, inodes
iostat -x 1 3                 # %util and await per disk
pidstat -d 1 5                # which process does the I/O
top -o %CPU                   # which process burns CPU
dmesg -T | tail -50           # OOM kills, I/O errors
journalctl -p err --since -1h # what failed in the last hour

If all of that is healthy and the app is still slow, the time is inside the app or the database: profile with perf, measure queueing with runqlat and biolatency, and read the database’s slow-query log.

What if the slowdown already passed?

Every tool above except sar and atop shows only now. When the complaint is "the site was slow at 3 a.m.", you need data that was recorded at 3 a.m.: enable sysstat’s collector or run atop as a service, or use a monitor that keeps history and puts it next to what changed (deploys, restarts, config edits) in the same window.

Where does a monitor fit next to these tools?

The command-line tools are precise but need someone at the terminal who knows which one to run. A monitor runs the same checks on every server all the time. Opservo’s agent collects system, process, disk, kernel-log, service and database facts every 60 seconds; its rules name the cause ("MySQL is waiting on disk: one query pattern is doing full scans of orders") and the change that came before it, and each finding carries the command to fix it, which you can run from the dashboard with approval.

curl -sSL https://api.getopservo.com/install.sh | sudo bash

Last updated 2026-11-10.

FAQ

Related questions

What is the single most useful command for a slow server?+

vmstat 1 5. In one screen it shows whether the CPU run queue is longer than the cores, whether the server is swapping, and how much time is spent waiting on disk, which separates most CPU, memory and disk problems.

How do I find which process is causing high I/O?+

Run pidstat -d 1 from the sysstat package, or iotop. Both list read and write rates per process; the top one is usually a backup, a log writer or the database.

When do I need perf or eBPF?+

When the counters look normal but the app is still slow: perf shows where CPU time goes inside a process, and eBPF tools such as runqlat and biolatency measure how long work waits for the CPU or the disk.

Can a monitoring tool replace these?+

For finding the cause on a fleet, mostly yes: it runs the checks continuously and keeps history. For deep profiling of one process, perf and eBPF tools are still the right tools.