CPU usage: CPU minutes vs. percentage

I’m hoping someone can help me out. DreamHost measures server usage in CPU minutes. They’re pretty much the only ones. Every other host I’ve looked at measures in CPU% (for example, CPU usage cannot exceed 20% of the server). Is there any way to translate between the two, so I’m not comparing apples to oranges? As in, 30 CPU minutes = X% or X CPU minutes = 20%?

I’ve been warned for going over my alloted CPU minutes (I’m currently at 50), and since DreamHost is completely incapable of helping me figure out what has pushed me over the limit other than “PHP” - which is uselss, because my entire site is coded in PHP - coupled with having to wait close to 48 hours to a response from a service ticket, I’m ready to move on. I just have no idea how to compare the server usage stats.

Thanks in advance for any help!

Maybe you can get some help from the Knowledge Base:

What are CPU minutes?

You can see which script is taking up the most ressources by running PHP as an Apache-module:
Why do I only see php.cgi in my resource report?

Maybe you should look in to some catching of your scripts?!

[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM

Thanks. I’ve actually read all that, and I understand what CPU minutes are as DH uses them. I’m trying to figure out how that translates to the rest of the world.

And I am running PHP as Apache. So, instead of getting “php.cgi” in my resource report, I just get “php.” I asked DH support for help, but was told I can’t get anything other than what I’m getting.

I’ve thought about caching, but I’m not a programmer in any way, and since I’m running a canned script I have no idea where to start.

It’s going to be really hard to translate actual cpu usage, to a variable percentage. A percentage is going to fluxiate based on what other users on your machine are doing. It would be ok to use 50% of your server if there are only 2 people hosted on it.

I think you’re actually better off with cpu minents, it’s somthign a little more mesurable, and accurate.

Probably one of the best ways to figure out which parts of your site are getting hit up hard, would be to take a look at your stats. What files are accessed most, is it this ‘canned script’ you refered to, or something else. This may not be 100% accurate, but it’s better than just knowing that one of your php scripts.

You can also check out your server logs - just FTP in, move into the log directory. Download and evulate the success logs. You may want to import to a database so you can tweak and sort, but that may also help you figure out where your getting heavy usage.

If you’re regurarly hitting 50cpu min. you don’t have that much you need to trim down on to get to 40cpu min. You might have luck contacting the author of your script, or a support forum associated with it, and see if there is some way to trim down on the resources it’s using. For example, I know a lot of forum softwares kinda resource hogs, and a lot of people have come up with various tricks and code re-writes to help make it run better.


Sorry, I don’t have any more info than you then…

What script are you running? Maybe there already exists a catch-module for it…

[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM

I just looked a bit more in to this…

In the resource-report it is stated that “CPU percentage assumes 24000 cpu seconds per day total”. My guess is that 40 CPU minutes then equals (40*60)/24000 = 10%.

This is supported by http://www.webhostingtalk.com/archive/thread/402592-1.html, where it’s stated that 60-120 CPU minutes per day ~ 16%.

Hope this helps you…

[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM

Thanks for the help, both of you. I’m going to try checking my logs and see what I can figure out.

As for the script, it’s eFiction. I’ve never heard of anyone having problems with CPU usage with this script. It seems like it’s not nearly as resource intensive as a message board, for example.

I too am having problems. I run an Invision message board, and my CPU minutes keep going up every day. And the board isnt really THAT busy, so I dont understand how my usage could be going up like this. And I have no mods or hacks on my board either. It is really frustrating, and I have no idea what I cn do. I cant afford a different server. So I guess Im screwed.

You might try a diferent forum software. As I understnad phpbb is kinda resource intensive. You might consider some alternatives, such as PunBB. I think there was a discussion about various forum softwares a couple months ago on this board, that might provide some other alternatives.

Another thing you can do is disabe feature’s you’re not using. get rid of the who’s on-line sutff. encourage people to be specific with their searches, and set default time frame low. Sometimes little things like that can make your current software take up fewer resoucres, and still provide a good service.

Just sigguestions, hope they’re worth something to ya.


I know how to calculate the cpu usage using php, but is there any script that get the cpu minutes (php if possible)?