Acceptable CPU Usage

Hi All - can I get some clarification on what is acceptable from a CPU usage standpoint? Everything else on a Linode is limited either physically or it's metered (disk i/o, RAM, storage, bandwidth).

I know there is a CPU usage chart on the account page - but how does that tie back to what is ok for a shared host?

I ask b/c lately I am doing a lot more CPU intensive work with MySQL - these are jobs that could theoretically consume 90-95% of my linodes CPU cycles for hours and hours.

Does the hypervisor manage the sharing of CPU cycles between Linodes? I know there are 4 physical CPU's on the box. but is the CPU that my Linode "sees", is this mine to use freely?

5 Replies

My understanding for CPU is you get at least an equal share of four cores and at most 100% of those four cores. The hosts are actually dual quad core but you are only allocated four of those cores giving you a minimum of 1/20th the capacity of the host on a 360 plan. This doesn't mean you should run the CPUs as hard as you can all the time because you are still using a shared resource.

Disk IO hasn't been metered since the days of UML. Bandwidth only has a soft cap to keep you from burning through your transfer package in less than a day but that can be removed upon request.

Again, you are on a shared host so be a good neighbor. If you think something is abusive then ask if it really needs to be done on that Linode.

RE: disk i/o, didn't know that change was made. I still check /proc/io_status and the token system is still running. I never get close to that limit so it doesn't matter.

As to your point about intentionally be abusive - I totally agree, using 100% to send spam 24/7 wouldn't be cool. On the other hand using 100% CPU to run data mining algorithms isn't necessarily being done with bad intentions.

The question goes back to this, do I need to monitor CPU usage or will something at a higher level keep things balanced.

To draw a comparison, EC2 instances run on shared hardware but I can fire up an instance and crank the CPU to 100% all day long. The VM has full access to the virtual CPU. (note: I am not putting EC2 above Linode, been here since 2005 and I love it dearly)

If you have /proc/io_status, you're on a really old host running UML instead of Xen, so the bits about four CPU cores and no I/O limit don't currently apply to you.

Open a ticket to migrate to Xen and your CPU-intensive multithreaded tasks will be extremely happy, because you'll have access to (approximately) four times as much CPU per unit time. And yeah, there is magic that balances it all out.

As far as "what's appropriate" goes… CPU is transient and underutilized, so as long as you're doing something productive and not simply pimping up your seti@home stats, it's there for the taking. Merely my opinion.

@hoopycat:

As far as "what's appropriate" goes… CPU is transient and underutilized, so as long as you're doing something productive and not simply pimping up your seti@home stats, it's there for the taking. Merely my opinion.
While I generally agree that bursting to maximum CPU usage is not something to be worried about, I do think that if you're in control and know you're going to saturate the CPU for hours on end and have the ability to throttle that slightly (an occasional sleep in a loop or script or whatever), doing so would probably be neighborly, particularly on the smaller plans. I don't think I'd jump through hoops if such throttling were difficult to implement though.

While the CPU is equally shared so it's not an issue of being "unfair", I suspect that for most of us were our Linode to suddenly only get it's guaranteed ~.5GHz of a processor (assuming a 360 plan with everyone CPU bound) we'd "feel" it having been accustomed to being able to soak up some free CPU in most normal scenarios. Yes, it's shared equally, but to a large extent we're all beneficiaries of the fact that it is in fact often idle at any given moment in time.

This of course only happens if multiple Linodes on the same host are CPU bound, and is an unlikely worst case; then again you never know what the other Linodes are going to be doing.

Now, if we were talking about pounding the disk solid for days on end, that would have a much more serious impact on the other Linodes on the same host.

– David

HUGE thanks for pointing out that I should move to a Xen server. I 'm not even worried about maxing out the CPU anymore. Queries that were running in .8 to 1.2 seconds are now all running .05 and below without pushing the CPU. :D

I am so freakin' happy with Linode right now.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct