Understanding the 0%-100% CPU Usage Metric

Asked by:
John.Lang / 14 Points
Time:
2013-09-14 9:05 am EST
Category:
General Server Setup
Hits:
1,815
Hi Support,

http://www.webhostinghub.com/support/website/website-help/monitor-cpu-resource-usage-graphs-in-cpanel

For the 24 hour graph, why does it always grow upwards for the 24 hour period? and then drop back down on a really steep decline at 12 midnight UTC. The sample graph in this article is a very good example as to what is happening in my account on a regular basis. Given the very little amount of traffic I get I am wondering about the "Type of Metric" that is being calculated for the Y axis (the 0-100%). It does seem to be a "cumulative addition of the prior hours percentage added to the next". This does not make sense when I review the raw access logs and there has been only two or three visitors in a that hour.

I would expect that the 24 hour graph should drop to approx 20% when there is nothing really going on on the web site; so I'm struggling to understand how the graph always seems to have a steady incline when the demand on the account on an hour-by-hour basis does NOT reflect a steady incline through out the day.

I have read and understood the other support article; it has some really good detail but does not explain how that information translates into the graph itself.

http://www.webhostinghub.com/support/website/website-help/excessive-server-loads

So heres an example: In the first hour of the day if I use 100 % of the CPU in that first hour then are you expecting the rest of the 23 hours in the day to be as close as possible to 0% percent? This in turn leads to the conclusion that the graph is really saying that each account is only supposed to use 1/24th of the CPU 100% percent factor which equates to only an allowed usage of approx 4% per hour. Under this metric calculation then the 24 daily graph makes sense as an average usage of 4% per hour which is shown as a cumulative metric would then show exactly like the 24 CPU usage graph currently behaves. Based upon this example the conclusion is that each account has a 4% CPU allocation per hour which in the space of any given day (24 hour period) can be distributed into hours of imbalanced use. Only use 1% per hour in the first 12 hours then your account now has a higher peek allowance of 88% percent to still be used in the next 12 hours but it will expire at hour 24.

Could you provide a more detailed walk through of the calculations involved in the "CPU Usage for the past 24 hours" graph; specifically to explain why a server under very little load seems to "Always grow through out the day and then get reset at midnight", please.

Kind regards,
John.

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by User

0

johnpaulb-whh2
Staff
12,339 Points
2013-09-16 4:13 pm EST
Hello John,

Thank you, this is a good question. You are on shared hosting environment, which means you are "literally" sharing a server with other users. The CPU resource is a limited one, as there are only a set number of processors per server.

This CPU amount in the graph is set by the systems team, and essentially everyone is given a whole pie each (of CPU time) per day, rather than sharing one whole pie.

Once you have used up all the allotted CPU time, you are exceeding 100% usage.

If you are consistently exceeding this amount, using caching typically can help: In PHP when a visitor requests a page, it is generated (by the server) at that time. Caching can help you by saving the commonly accessed pages so they are ready when a visitor to your site requests them.

Using a robots.txt file to stop the bots from crawling your website can also help.

We would have to review your specific logs, to provide a detailed answer. You can create a ticket request for a review of your usage, by sending an email to:
support@webhostinghub.com. Be sure to include either your current Amp password, or the last 4 digits of the current credit card that we have on file for verification.

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul

To submit a comment on this answer, please first login.

Hi John-Paul,

Thanks for the above response.

It does answer the question of an always inclining graph. The graph is NOT supposed to be read as an indication of the usage in that hour but as a cumulative total that represents "each accounts eating (0% to 100%) of their allocated pie" through out the day.

Could you provide more detailed information from the systems team on their definition of "What exactly is the 'CPU amount' that defines an accounts 100% pie". I completely understand that this is a shared hosting environment and am looking to understand more about how the true hardware 100% CPU resource is divided/allocated amongst the accounts to then define each accounts definition of their individual 100% CPU allocation.

Kind regards,
John.
John.Lang
14 Points

2013-09-16 11:25 pm EST
Hello John,

The 100% CPU usage represented by the CPU usage graphs equates to roughly 40 CPU minutes per day or about 1% of the server's total CPU usage time available. However based on the server's total workload for that day, this number can vary slightly.

If you're consistently hitting 100% usage on your account, then you'd want to look into doing things such as cutting down on dynamic requests to a PHP script for example, and serve as much static HTML content as possible which uses exponentially less CPU time than having the server continually re-process the same script again and again throughout the day.

- Jacob
JacobN
3,713 Points
Staff
2013-09-17 12:17 am EST
Hi Jacob,

Excellent. This is information I can work with to reduce the CPU resource usage in specific relation to the WHH cPanel graph and how WHH measures the accounts shared allocation.

Thank you very much for the detailed response.

Kind regards,
John.
John.Lang
14 Points

2013-09-17 12:24 am EST
Hello John,

No problem at all, glad I could more clearly answer your question!

- Jacob
JacobN
3,713 Points
Staff
2013-09-17 12:34 am EST
Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}