For Linux Cloud, Virtual, and Dedicated Servers

This article explains the types of performance problems that can occur while running Linux servers. In addition, you will learn which programs you can use to monitor your server to detect performance problems and eliminate the causes.

Please Note

Regular monitoring of the server is generally recommended in order to detect performance bottlenecks and any problems that may occur at an early stage and to notice a server failure or the failure of individual components or applications in good time. This also applies to certain types of cyber attacks. If you are attacked, a quick response is essential to stop the attack and minimize the damage caused.

Types of Performance Problems

The causes for performance problems can be very diverse. For this reason, it is very important that these are precisely narrowed down.

The following types of performance problems can occur under certain circumstances:

Low SSD/hard disk access speed:

  • Can occur with dedicated servers.

  • Is a possible cause if the server takes a long time to start the operating system or programs and/or login.

  • Can also occur when the operating system or programs use the swap file or need to load or save data.

High system or CPU load:

  • A consistently high CPU usage rate is an indicator that the server's processor is overloaded.

  • If the system or CPU load is too high, there will be delays in running applications and user activities.

  • If the server has too little RAM, this can cause the processor to be permanently very busy.

  • Persistently increased processor load can also be a sign of malware.

Low network interface throughput:

  • Leads to a general delay in rendering and response times.

  • A wide variety of problems can occur if the network interfaces are too busy.

  • Performance issues range from high latency to error messages when accessing web pages.

Analysis tips

  • To determine the cause of performance problems, it is important to distinguish whether they are temporary or permanent.

  • If the performance problems are temporary, see if you can identify a pattern. To do this, analyze the executed processes and regularly performed tasks that are executed by your server.

  • If necessary, reschedule regularly executed tasks and then check whether the performance problems still occur after this change.

  • If necessary, check whether the performance problems always occur when a particular action is executed. For example, this could be a very slow page load or a very slow upload or download.

  • Research what updates have been installed on the server and find out if there is a new update that needs to be installed that will affect the performance of your server.

  • If a process is unknown to you or you are not sure whether it is malware, we recommend that you research the process name on the Internet. Pay particular attention to processes that require an unusually large number of resources.

Attention

We recommend that you install security patches and updates for the operating system and installed programs regularly and in a timely manner, and test them beforehand to check possible effects on your specific environment. Also make sure that security patches and updates for the plugins you use are installed in a timely manner.

Use 'top' for the First Analysis of the Current System Load

To perform an initial analysis of the current system load, you can use the program top. This program is included by default in most Linux distributions.

With the top program, you can display both system information and currently running processes. In the overview, you can sort tasks by CPU usage, memory usage, and runtime.

In addition, this program provides an interactive interface for manipulating processes and for individual configuration. Most features can be selected either by interactive commands or by entries in the personal or system-wide configuration files.

To start top, enter the command top on the command line. You can combine this command with a variety of options.

An overview of the options can be found here:

top - Linux man page

More information about analyzing the system load with top can be found here:

Using the program top to analyze the current system load (Linux)

Use the Program 'atop' for Further Analysis of the System Load

Atop is an ASCII performance monitoring program with which you can display the utilization of a Linux system. Once atop is started, it displays CPU and memory usage as well as information about swap file usage, disk/SSD usage, and network connection usage in 10-second intervals by default. You can also view CPU usage, memory usage, and disk I/O for each process and thread, among other things. In addition, atop allows you to save system and process level statistics in a compressed binary format to a file for long-term analysis. By default, these created log files are kept for 28 days.

To learn how to install atop and create log files for further analysis of system usage, see the following article:

Using Atop to Further Analyze System Usage (Linux)

Test the network connection of the server

The following are several commands that you can use to test your server's network connection.

To obtain meaningful information about the performance of the server's network connection, run the performance tests multiple times and at different times of the day.

To view the currently open network connections, use the following command:

[root@localhost ~]# sudo ss -tpn


To check which processes are currently waiting for connections from the outside, issue the following command:

[root@localhost ~]# sudo ss -tulpn

To test for packet loss, issue the ping command in the form below. When doing this, limit the number of pings with the -c option. :

[root@localhost ~]# ping -c NUMBER IP ADDRESS

or

[root@localhost ~]# ping -c NUMBER DOMAIN OF THE SERVER

Alternatively, if you have connection problems, you can use the Traceroute program. Traceroute allows you to determine which routers a packet is routed through. To use traceroute, enter the following command:

CentOS 7, CentOS Stream 8 and CentOS Stream 9

[root@localhost ~]# yum update
[root@localhost ~]# yum install traceroute

Ubuntu

[root@localhost ~]# sudo apt-get update
[root@localhost ~]# apt-get install inetutils-traceroute

To use traceroute, enter the following command:

[root@localhost ~]# traceroute IP ADDRESS

Checking the Log Files of the Server

Instructions on how to check your server's log files can be found here:

Checking Your Log Files