Welcome, Guest. [ Log In ]
Question   What are CPU minutes?
Search KBase

Top 3 in this Area:
1. What are CPU minutes?
2. Why do I only see php.cgi in my resource report?
3. My account was moved to an evaluation server!

What are CPU minutes?
We measure server resource consumption in CPU minutes. This number indicates how much time a processor spends working for your username. All shared hosting customers should use less than 60 cpu minutes per day for all their users on their account.

It should be noted that bandwidth and cpu usage are very different and do not measure the same resource.
Take the example of serving a single image: On one hand you could have a static image that you link to. This would only use the CPU nessecary for the very optimized apache program to load the image and send it in response.

Now imagine you want to return a random image from a list of images, so you invoke php to pick a random image location. You incur the cpu cost of loading php, but the overall cpu usage is still small.

Now imagine that you want to return a random image from your most recent vacation. You have uploaded all your images in their original size but you want to send it to the visitor as only a 640x480 image so you load the original image and resize it in php. Now you have incurred a very high computation cost to recreate the image in a new size.

In each case you are sending the same amount of information and therefore using the same amount of bandwidth. The process of optimizing your software is finding ways to cut down on unneeded computations. So for instance in this example you could resize the images once on your personal computer before uploading them. Then serve the previously resized image.

Another possible reason for high cpu minutes is described by a customer here: "I run a blog as part of my site and using the daily stats provided by DreamHost on my server (http://domain/stats) I realized that two pages have become spam link magnets. I get thousands of hits on these two pages every day (referrer links are all porn or viagra etc). Both of these pages are also PHP pages - one tracks referrer hits to my site, the other has the word "video" in it is why I think the porn spam is linking to it. But I realized that if I just remove those two files, that would take away most of my CPU time that's being "stolen" by the spam pirates."

It should be noted that noone gets their service turned off because they received a heavy usage email. The only reason we would terminate an account is that there was no response to our emails. In a case with no response in over a month for instance we would eventually have to turn the site off. For some there are just warnings that the usage is high, and others with even higher usage are moved to a server with less customers on it to limit the number of cutomers affected by very high cpu usage. If runaway process usage is not limited, the machines the processes are on become unstable and crash. The idea here is to keep machines stable. There is work involved in optimizing your website, but that is an integral part of what it means to be a web designer.

If you see a number referenced as cpu seconds, simply divide by 60 to get cpu minutes.

If you are presently on an evaluation server you can check CPU usage by downloading the file ~/logs/resources/*.sa.analyzed.0 . You should also be receiving daily resource reports to your primary contact email address. You can also view and download these stats files through the stats url of any of your domains (E.G. http://yourdomain.com/stats/resources )

Also, this kbase article is limited to a few comments and just shows the most recent ones, please use the forum or contact support directly for help. This is an informational, not a discussion page, and you will get better help from support directly.

Last updated: Jan 03, 2006.

User Post (2006-01-04 15:23:48 by scottytoledo)
Thanks for upping the CPU usage again guys. Greatly appreciated! :)
User Post (2005-12-30 16:47:53 by 414845520nas)
If you get the "/stats/resources/ was not found on this server" error message, you have to wait 24 hours after enabling the monitoring of CPU minutes in the control panel.