Documentationchevron_rightTroubleshooting

Troubleshooting · 2 min read

Diagnosing High CPU Usage

Find the process using a VPS's CPU, fix the usual causes such as busy web servers, slow queries, runaway jobs or malware, and know when to upgrade.

Last updated November 26, 2026

Find the process first: top sorted by CPU shows which program is busy. Then fix the cause, which is usually a web server under heavy traffic, a slow database query, a runaway script or cron job, or occasionally malware. If the load is legitimate and steady, move to a plan with more vCPUs.

Find the Busy Process

top                              # press P to sort by CPU, q to quit
ps aux --sort=-%cpu | head -15   # a snapshot of the top 15
uptime                           # load averages for 1, 5 and 15 minutes

The dashboard's Analytics tab shows when the CPU rose, which helps you match it to a deploy, a cron job or a traffic spike; see Monitoring CPU, Memory, Disk and Bandwidth.

A VPS's vCPUs are threads of the host processor, shared with other servers on the host. Load averages above the number of vCPUs (nproc) for long periods mean work is queuing.

Common Causes

A Busy Web Server

tail -n 1000 /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head

One address sending most requests is often a bot. Rate-limit it in the web server, block it with the server firewall, add caching, or put a CDN in front.

Slow Database Queries

mysql -e "SHOW FULL PROCESSLIST;"
sudo -u postgres psql -c "SELECT pid, now() - query_start AS runtime, query FROM pg_stat_activity WHERE state <> 'idle' ORDER BY runtime DESC;"

Add the missing index, or tune the database for the server's memory.

A Runaway Script or Cron Job

ps -eo pid,etime,%cpu,cmd --sort=-%cpu | head
grep CRON /var/log/syslog | tail -20     # journalctl -u crond on AlmaLinux and Rocky Linux

Malware

Signs: CPU near 100% all the time, processes with odd names, connections to unknown addresses.

ps aux | grep -Ei 'xmrig|minerd|kdevtmpfsi|kinsing'
ss -tnp | grep ESTAB

If the server is compromised, do not try to clean it in place. Copy off your data (not programs), then rebuild: restore a backup from before the compromise, or have the operating system reinstalled (Reinstalling the Operating System). Change every password and SSH key that was on it, and work through the Security Hardening Checklist. Open a ticket with the Security category if you need help.

When to Upgrade

If the load is real and steady, move to a plan with more vCPUs from Upgrades & Add-ons; see Upgrading Your VPS Plan. The guide Benchmark a VPS or Dedicated Server helps you measure before and after.

Related

Still stuck? Customers get support from the dashboard, and anyone can open a ticket. If you are not a customer yet, VPS plans deploy in minutes with root access and a browser console.

See VPS pricing