Submit a Ticket
Support Center » Knowledgebase » Web Server (Apache + IIS) » Investigating server load on a Linux server - VPS/Cloud

Investigating server load on a Linux server - VPS/Cloud

This article contains a very small set of examples on how you can find who and what is taking too much server resources. This article applies for our Linux VPS/Cloud servers only.

1) If you are using cPanel/WHM control panel, you can login to your WHM control panel and find out which site has the most CPU/mem utilization by reviewing the "Daily Process Log".

In your WHM control panel simply navigate to: Main >> Server Status >> Daily Process Log - you can sort the report based on a Date so that you can review historically who and what is consuming your server resources.

For detailed documentation on the Daily Process Log please check: https://documentation.cpanel.net/display/ALD/Daily+Process+Log

2) If you are not using cPanel/WHM or for some reason the Daily Process Log does not return any meaningful data you will need to spend a little more time and get your self "dirty" with hands on commands which will be accessible via SSH connection to your server (We have collection of tutorials on how you can use putty under Windows to access your server via SSH at:  http://www.mochasupport.com/kayako/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=577&nav=0,74 )

Once you login to your server via SSH, you can execute commands such as: "top" which will give you a current snapshot of what is going on with your server and determine what is causing the actual load.

In 90% of the time, the issue is related to a site (Virtual Domain) with heavy CPU/memory utilization which a lot of time will tax your Web Server (Apache/nginx) and/or your MySQL database. To get an idea of what is currently overloading your Web Server, you can use "apache-top".

To install and apache-top, simply execute the following commands once you login to your server via SSH:


To run the tool you can fire up:

* On Apache only server: ./apache-top.py -u http://127.0.0.1/whm-server-status

* On server with Apache + nginx (or our Lightning Fast Guarantee):  ./apache-top.py -u http://127.0.0.1:8081/whm-server-status

Once you start the tool you will be able to get a lot of useful information and almost immediately you will find out what is causing the load on your server. Type "h" as using the tool to see all available commands. You can sort the display by Virtual Host (domains), Requests Type, pressing "Shift+C" sorts the view by CPU usage for example.

--

There are many other tools you can use under Linux to troubleshoot load, including mytop (useful for MySQl troubleshooting), sar, vmstat. We recommend that if you are not familiar with Linux administration to consult with an administrator or consultant who can help you administrate and maintain your server and websites on daily basis.

Once you identify the website, the user account, or application that is loading your server, you can take the following  approaches:

1) Optimize your website, we have a collection of articles available at:


2) If you can't optimize your website, or resources needed, you can look into getting a package with higher resources such as more memory, or CPU power

 This answer was helpful  This answer was not helpful
 Back