How to Identify the Cause of High Load on a Linux VPS?
Monitoring Linux VPS resource usage via SSH
If your website hosted on a Linux VPS takes too long to load, applications respond slowly, or errors occur while processing requests, it is worth checking server resource usage. These problems may be caused by high CPU usage, insufficient RAM, or excessive disk activity.
To diagnose the performance of a Linux-based virtual server, you can use the top and htop command-line utilities. They allow you to monitor system resources in real time and identify which processes are placing the greatest load on the server.
Step 1. Accessing the Linux VPS Command Line
To check the status of your server, you need to connect to it via SSH.
- Open Terminal on Linux or macOS. If you are using Windows 10/11, open PowerShell or Command Prompt.
- Run the following connection command:
ssh root@SERVER_IPReplaceSERVER_IPwith your VPS IP address, which can be found in your Server.UA client area. - When connecting for the first time, the system will ask you to confirm the server’s host key. Verify its authenticity and enter
yes. - Enter the password for the
rootuser and press Enter.
Please note that password characters are not displayed in the terminal as you type. This is a standard security feature.
Step 2. Checking Current System Resource Usage with top
The top utility is available by default in most Linux distributions and does not require additional installation.
To launch it, run the following command:
top
A table displaying system status and active processes will appear in the terminal. The data is automatically refreshed every few seconds.
Here are the main indicators to pay attention to:
- Load Average – the average system load over the past 1, 5, and 15 minutes. If these values consistently exceed the number of virtual CPU cores, this may indicate CPU overload or delays in input/output operations.
- %Cpu(s) – a breakdown of CPU time. The
usvalue represents CPU usage by user processes,sy– by system processes,wa– time spent waiting for input/output operations, andid– the percentage of idle CPU time. - MiB Mem – information about the total (
total), free (free), and used (used) RAM. Pay particular attention to theavail Memvalue, which indicates how much memory is available for running applications. - MiB Swap – information about swap space usage. Heavy swap activity may indicate insufficient RAM.
To quickly identify the processes consuming the most resources, use the following keyboard shortcuts:
| Keyboard shortcut | Action |
|---|---|
| Shift + P | Sort processes by CPU usage |
| Shift + M | Sort processes by RAM usage |
| 1 | Display individual CPU core usage |
| Q | Exit the utility |
Step 3. Examining Active Processes with htop
For a more visual approach to resource monitoring, you can use htop. Unlike the standard top utility, it features color-coded resource usage indicators, a convenient menu, and mouse support.
If the utility is not already available on your server, you need to install it.
For Ubuntu and Debian:
apt update
apt install htop -y
For AlmaLinux and Rocky Linux:
dnf install epel-release -y
dnf install htop -y
Once installed, launch the utility:
htop
At the top of the screen, you will see indicators showing individual CPU core usage, RAM usage (Mem), and swap space usage (Swp).
Below these indicators is a list of active processes. When analyzing them, pay attention to the following columns:
| Column | Description |
|---|---|
| PID | Process identifier |
| CPU% | CPU resource usage |
| MEM% | Percentage of RAM used |
| Command | Process name or launch command |
Press F6 to change the sorting criteria and identify which services are placing the greatest load on the server. For example, these may include the mysqld database process, the php-fpm PHP process manager, or the nginx web server.
To exit the utility, press F10 or Q.
Step 4. Checking Available Disk Space
Server performance issues may be caused not only by CPU overload or insufficient RAM but also by a lack of available disk space.
To check disk space usage, run the following command:
df -h
The terminal will display information about the total, used, and available space on mounted file systems.
Pay attention to the Use% column, which shows the percentage of space used on each file system, particularly the root file system /.
If the disk is nearly full, you may encounter problems when writing files, running databases, or starting system services.
How to Reduce the Load on a Linux VPS?
The next steps depend on the diagnostic results. If certain processes regularly consume a significant portion of server resources, it is worth reviewing the relevant services, caching settings, background tasks, and database queries.
If the high load is caused by growing website traffic or increasing amounts of data being processed, consider upgrading to a VPS configuration with more CPU cores and RAM.
If you are unable to identify the cause of your virtual server’s performance issues, contact the Server.UA technical support team through your client area or other available communication channels. To help us investigate your issue more quickly, we recommend providing your VPS IP address, a description of the problem, and a screenshot or the output of the top or htop commands.