Server Running Slow: CPU, RAM and Disk Troubleshooting
Server performance troubleshooting guide: CPU, RAM, disk, swap, process analysis, and network testing checklist. Diagnose Linux server slowdowns step by step.
Table of Contents
Introduction
If your server is running slow, you need to follow a systematic checklist to identify the source of the problem. This guide explains the most common performance issues and their solutions step by step.
This guide is prepared for Linux servers (Ubuntu, Debian, CentOS, Rocky Linux).
1. CPU Usage Check
# General CPU usage
top -bn1 | head -5
# Interactive detailed view
htop
# Top CPU-consuming processes
ps aux --sort=-%cpu | head -20
If CPU usage is consistently above 90%, you need to identify and optimize intensive processes or increase server resources.
2. RAM Usage Check
free -h
ps aux --sort=-%mem | head -20
| Metric | Healthy | Warning | Critical |
|---|---|---|---|
| RAM Usage | < 70% | 70-90% | > 90% |
| Swap Usage | 0 | < 25% | > 50% |
| Available | > 20% | 10-20% | < 10% |
High swap usage (> 50%) means RAM is insufficient. Swap is much slower than RAM since it uses disk storage.
3. Disk Usage and I/O
df -h
du -sh /* 2>/dev/null | sort -rh | head -10
iostat -x 1 5
If disk usage exceeds 90%, performance issues may begin. Above 95% is critical.
4. Swap Analysis
free -h | grep Swap
swapon --show
Swap clearing is a temporary solution. For a permanent fix, increase RAM or optimize memory-consuming applications.
5. Network Performance
ss -s
ss -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -rn | head -10
A very high number of connections (10,000+) can exhaust server resources. You might be under a DDoS attack — check the Path Panel attack history.
6. System Logs
dmesg | tail -50
dmesg | grep -i "oom\\|killed process"
journalctl -p err --since "1 hour ago"
If you see OOM killer logs, RAM is insufficient and the system is forcefully terminating processes to free memory.
Quick Health Check
echo "=== CPU ==="; top -bn1 | head -5; echo "\n=== RAM ==="; free -h; echo "\n=== DISK ==="; df -h /; echo "\n=== LOAD ==="; uptime
When to Contact Support
- No obvious issue found in the checks above
- Suspected hardware-level problem
- Network performance is degraded and DDoS attack suspected
- OOM killer is repeatedly triggered
Related Articles
SSH Connection Problem: Can't Connect to Server
SSH connection troubleshooting guide: Path.net firewall rules, Default Block, creating a filter rule for SSH port, and step-by-step troubleshooting.
RDP Connection Problem: Can't Connect to Windows Server
RDP connection troubleshooting guide: Path.net firewall rules, Default Block, creating a filter rule for RDP port, and step-by-step troubleshooting.
How to Run an MTR Test and Submit Results to Support
Guide to running MTR network tests with WinMTR and Linux MTR, creating ICMP filter rules, and submitting results to support. Diagnose packet loss and latency.