What is “CPU usage”?
Our servers run programs for many websites, so your PHP scripts and other programs you install can’t use the full resources of a server all the time. That’s okay, though, because your website won’t need to run scripts all the time (it will be idle between visitors, using no resources while it waits for the next page request).
When you run a script, it uses the resources of one of the CPU “cores” of our servers for a certain amount of time.
Because the CPU resources are limited, we measure how much you use, and our hosting plans include different amounts of CPU power, just like they include different amounts of disk space and email mailboxes.
All our hosting plans include plenty of CPU power — in fact, your site can average 20% of a powerful server computer core on even our least expensive plan. In our experience, only very busy sites, or sites with very resource-intensive scripts, use more than that. Most of our customers use much less.
On this page:
- So what’s a “CPU unit”?
- Do you measure CPU usage as an average, or by peak usage?
- How can I see how many CPU units I’m using?
- How do CPU units compare to a “dedicated server”?
- Can you give me an example of exactly how you’d calculate CPU units?
So what’s a “CPU unit”?
CPU power is more abstract than disk space or email mailboxes, so it’s difficult to concisely describe how much you use. We use the phrase “CPU units” as a simple description.
We define a “CPU unit” as being equivalent to 1% of the available resources of one core of a 2.40 GHz Intel Xeon E5-2630 v3 processor. (You can see why we shortened the name!)
If you’re familiar with the concept of a Unix “load average”, 20 CPU units would be roughly equivalent to adding 0.2 to a server’s load all month long.
Looked at another way, 20 CPU units is enough power for an unmodified copy of WordPress to show 45,000 page views per hour, even without caching.
Do you measure CPU usage as an average, or by peak usage?
We measure CPU units as a monthly average, allowing you to use more during busy periods without any penalty.
So if your site uses 1 CPU unit for 23 hours a day, then “bursts” up to 50 CPU units for one busy hour every day, your monthly average would still only be 3 CPU units, and you wouldn’t need to upgrade to a larger plan.
We’ll notify you if your average CPU units are going to exceed the amount included in your plan (although that’s very rare) so you can avoid extra charges.
How can I see how many CPU units I’m using?
The usage page of our “My Account” control panel shows CPU usage graphs that are updated hourly.
If you make a technical change and you want to see how that affects your site, you should wait two hours and then review the graph. That way you can be sure that it shows a full hour of the changed usage.
How do CPU units compare to a “dedicated server”?
A modern single-core dedicated server that other companies might sell you can probably handle about 80 CPU units. If your site ever uses more than that — even for a short period of time — it would stop working properly if it was on that company’s dedicated server.
One of the advantages of using our “shared hosting” instead of a “dedicated server” is that we only charge you for the average usage, not the peak usage.
If your site uses 3 CPU units most of the time, but gets a huge number of visitors once every few months from a listing on a popular news site, that can be very expensive on a dedicated server. If your site needs, say, 280 CPU units to handle a traffic burst for three hours a month, then your dedicated server would need to be able to handle that worst case — you’d need a dedicated quad-core server that might cost a hundred times what we charge you. But of course, you won’t be using that power most of the time.
With our shared hosting, you don’t need to pay for the worst case. We can handle some pretty big “spikes”, and as long as your average usage remains low, the average is what you’ll pay for.
(On the other hand, if your average baseline usage is consistently more than 50 CPU units, you should use a dedicated server instead. Very few sites use that much, though.)
Can you give me an example of exactly how you’d calculate CPU units?
Sure thing. It’s a little geeky, but we want to make sure it’s understandable. The way it works is that we:
- Add up the exact amount of CPU time used by each program you run in a month;
- If your site isn’t on a 2.40 GHz Intel Xeon E5-2630v3 processor, adjust the number to match what it would have been (this makes sure the numbers are the same for all sites, even across servers of slightly different speeds);
- Divide the total by the number of seconds in the month;
- Convert that to a percent and round down to the next whole number. That’s how many CPU units you used.
So imagine that you install WordPress, which is a script that uses the full power of a CPU for about .016 seconds each time it runs (adding plugins and themes makes it use more resources, but we’re considering the simplest case).
For the first 7 days of February, your site is busy and gets 250,000 page views per day. That’s 4,000 seconds per day of CPU time, or 28,000 seconds total. Then for the next 21 days, your site gets 100,000 page views per day. That’s 33,600 more seconds of CPU time. The total usage for the month was 61,600 CPU seconds.
There are 2,419,200 seconds in a 28 day month, so we divide 61,600 by 2,419,200. That’s about 0.0254, or 2.54%. We round that number down and calculate that you used 2 CPU units in February.
As you can see, even a busy site doesn’t use much CPU power compared to the amount we include. And in most cases, a small amount of effort to improve the efficiency of your scripts can make things much better; for example, it’s possible to tweak WordPress to handle hundreds of thousands of page views every day, even with a reasonable amount of plugins installed, and still use less than 10 CPU units.
Copyright © 2000-2019 Tiger Technologies LLC