|100 Web Space
|Q&A: CPU Usage Limit
|Page 1 of 1|
|Author:||Oliver [ Fri Dec 22, 2006 1:14 pm ]|
|Post subject:||Q&A: CPU Usage Limit|
What is meant under CPU usage?
All hosting accounts on a server share the same resources, in means of CPU time, memory, disk space, bandwidth, etc. To ensure the stability of the server and a good performance, certain limits need to be set in order to avoid cases when a single account is using all resources, thus making other people's accounts to work slow. One of the limitations is in regards to the CPU usage.
The CPU usage stands for the average server load generated by your scripts during a specific time period - an hour, an entire day or a whole month, and is estimated by comparing your CPU time to the total CPU time (100%), which is assumed to be 34560 seconds/24 hours. You should often check this value in order to comply with the maximum allowed CPU usage for your particular account type. You can see what the CPU usage limit of your plan is just above the Account Usage table.
How is the CPU usage calculated?
Every hit/request made by your account to the CPU requires a certain time to be executed. Our system measures these hits/requests and the CPU time that they use. This includes scripts, applications, web pages, basically all activity of your account. Our system uses a complicated algorithm to calculate what part of the CPU time your account has used for the past 24 hours. The system takes in consideration other accounts' activity and the maximum possible CPU load of the server, which is assumed to be 34560 seconds, so that the result is as accurate as possible. Numerous tests have been run and this algorithm has been proved to be accurate in almost 100% of the cases.
Because the CPU usage limit is applied on a 24 hour basis, in fact you can use more than 4.5% of the CPU time for short periods of time. During high-peak hours your account may be using 20% of the CPU time for example, while during off-peak hours, it may only be using 0.2%. This allows your account to handle sparks and surges in usage, without any problem.
How do I monitor my accounts CPU usage?
You can monitor the CPU usage of your account from the Load Stats section of your control panel, which is located under Live Stats. Use the Show/Hide Help link to display the help, which explains what each of the columns in the Load Stats table shows.
What happens if my account exceeds the CPU usage limit?
If your account exceeds the CPU usage limit, you will be sent a warning email so that you can take measures or upgrade your account to a plan with a higher CPU usage limit. You will be given enough time (24 or 48 hours depending on the CPU over-usage) to take the steps necessary to reduce the CPU limit of your account or upgrade to a more advanced plan.
However if you fail to reduce the CPU limit and you do not upgrade to a plan that has a greater CPU usage limit, your account will be eventually suspended.
How do I reduce the amount of resources being used by my website(s)?
The best work-around for this is to examine your entire daily stats and look for the PHP scripts with the most requests. You can try the following:
1. Figure out what PHP script is causing the maximum CPU/memory load. You may use the WebAlyzer statistics (Traffic Stats section of the Control Panel) and check which particular file has the most requests. For example, it can be http://www.my-best-domain/phpbb/index.php, which has received the most hits. It is most likely that this script may need to be optimized or is being used out of control.
2. Once you have found the script with the largest load, you can now focus on the particular application. Your options depend on whether this script is a part of a larger program, something you have created, or is something that was due to a hacker compromising another script. For example, if you have a blog and a forum running, turn one off, wait a day, then turn it back on. See what sort of impact that has on your Load Stats. Check if there are any new versions or security updates for this particular application. Usually, the new versions are more optimized than the old ones in terms of resource usage.
|Page 1 of 1||All times are UTC|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group