...
Skip to main content
Print

How to Monitor Server Load With top and htop

With htop you see in one overview how much CPU and memory your server uses and which processes are the heaviest. This lets you quickly find the cause when your VPS responds slowly. Top is present on every Linux server. Htop is a clearer version that you install with one command.

Installing and starting htop

apt install htop -y
htop

On AlmaLinux you install htop with dnf install htop -y.

What do you see in htop?

  • CPU bars: the usage per processor core.
  • Mem and Swp: the used memory and swap.
  • Load average: the average load over 1, 5 and 15 minutes.
  • Process list: sort by CPU or memory with F6 to find the heaviest processes.

Understanding the load average

Compare the load average with the number of CPU cores. If your VPS has 4 cores, a load of up to 4 is normal. If the load is structurally higher, processes are waiting for computing power.

Stopping a process

Select the process in htop and press F9 to stop it. Outside htop you use kill PID.

Structurally too little capacity?

If your server is constantly under heavy load, a larger plan is the solution. With an NVMe VPS you also get the fastest storage.

Related articles

Table of Contents