My dedicated server is slow or has a high load average. How do I find out why?

A load average is just a number until you know what it's waiting on. Let's find out in ten minutes.

Steps

Connect by SSH. Take note of the number of CPU cores with nproc. A load average near that number means the CPUs are busy; well above it means work is queuing.

  1. Check the load: uptime. The three numbers are the 1, 5, and 15 minute averages.
  2. See what is busy right now: top. Press P to sort by CPU and M to sort by memory.
  3. Look at the %wa value in the top header. A high number means the server is waiting on disk, not busy computing.
  4. Check memory: free -h. If available is nearly zero and swap is in use, the server is short of RAM.
  5. Check for a hungry process: ps aux --sort=-%cpu | head -10.
  6. If disk wait is high, see which device: iostat -x 2 5 (install sysstat if missing).
  7. Check the logs around the time it began: sudo journalctl --since "1 hour ago" | tail -100.
  8. Look at what's hitting your web server. A burst of requests from one address or a bad bot shows up in your access log. Block it in your firewall or web server.
  9. Restart only the service that's misbehaving, not the whole server, then watch uptime again.

If it didn't work

  • Disk-wait load can mean a failing drive; see our article on failing drives.
  • A sudden load spike with huge network traffic may be an attack; see our DDoS article.
  • Open a ticket in the portal, set Department to Technical Support, and include your Main IP, uptime, the top of top, and when it started. On managed servers we give best-effort help with application tuning.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 1