Skip to main content

Troubleshooting High Processor Load on Your Server

Understanding CPU usage is important for overall system performance measurement. A high processor load or utilization on nodes can be a nightmare for node owners. Sometimes the load on your server can be due to high traffic on your website, which is good news. In that case, you simply need to upgrade your server to the next level to resolve the issue.

However, in some cases, the CPU utilization is caused by other factors, which you need to troubleshoot. Let’s take a look at how we can identify the real reason for the node's high CPU usage and fix it.

Impacts of High Usage on E2E Nodes

Whenever the CPU usage goes high on your server, the server and website hosted on it will ultimately become slow, or sometimes there is a chance of the server crashing when the load is too high.

That's why we provide real-time monitoring options for all our nodes. You can configure alerts for your nodes, where the load or CPU utilization of your server increases above a certain percentage, and an alert will be received on your registered email ID. We highly recommend you configure this alert to avoid any issues.

Causes of High CPU Utilization or Processor Load

We often face the issue of resource problems on servers. As mentioned earlier, this can be due to high traffic on your website. If that is not the case, let’s now check the common reasons that cause high CPU usage in nodes.

Incorrect Service Level Configuration

Often, CPU usage problems are faced due to errors in service-level configurations. The services should be finely tuned and optimized before deploying them on production servers. The services should be configured, taking into consideration all external and internal environments. When there are multiple processes of the same service, it can lead to high CPU usage.

Inadequate Server Resources

Insufficient resources on your node can also trigger high CPU usage. The resource allocation of your node should always be proportional to the amount of usage.

Poorly Configured Applications

Poorly configured applications may also cause high CPU usage. For instance, having a backup process running at peak times when your server resources are already using their full capacity may cause high utilization. Similarly, ensure that all cron jobs are not run simultaneously and should be scheduled at an appropriate time to maintain normal utilization.

How to Fix High CPU Usage

There are numerous ways of monitoring system load averages. One such command is uptime, which shows how long the system has been running, the number of users, and the load averages:

CPU Usage

The numbers are read from left to right, and the output above means that:

load average over the last 1 minute is 0.18
load average over the last 5 minutes is 0.07
load average over the last 15 minutes is 0.02
High load averages imply that a system is overloaded; many processes are waiting for CPU time.

Top -> which shows the top running process which is consuming more CPU or RAM


top

CPU Usage

With the above command, you will be able to look at top consuming processes and take necessary actions.

The ps command reports a snapshot of a system’s currently running processes. If you want to list the details of a specific process, you can use the below command. For example, to check MySQL process consumption, you can grep MySQL from the ps command, which will display the process ID and processes running.


ps -ef | grep mysql

Similarly, If you want to gracefully stop a running process which has been causing a high utilization on your server, You can use The syntax for the pkill command is as follows

    
pkill processname

for example,

pkill mysql

To kill a particular process, You can use the Process id

kill -9 pid