EC2 Neighbour Caught Stealing CPU
blog.sematext.com
blog.sematext.com
That's not how it works. CPU steal time is when the hypervisor stalls your CPU because you're using more than your allotted share. Depending on the hypervisor configuration it could happen either consistently (ex: AWS micro instance) or on demand (ex: whenever your neighbors are actually using their fair share). If your neighbors are not using 100% of their slice of the CPU then you can generally use it yourself[1] but if you can't they're not "stealing" from you. You're just not able to use their unused capacity[2].
[1]: For regular AWS instances, not for micro instances which stall almost immediately when using a lot of CPU. Try a non-trivial compile on a micro instance and see what happens.
[2]: Alternatively, you can look at as they're preventing you from "stealing" from your neighbors when they're not using it.
http://adrianotto.com/2010/02/time-stolen-from-a-virtual-mac...
^ read
m1.small nodes expect up to 50% steal because you're explicitly only renting half the CPU. Check how /proc/cpuinfo compares with 1 ECU: http://aws.amazon.com/ec2/faqs/#What_is_an_EC2_Compute_Unit_....
In fact, you can even see over 50% steal because the hypervisor steals from you if you're doing network-intensive work such as accepting TCP connections at a high rate (hundreds of new connections per second).
Amazon AWS guys got straight to the point about it in the forums:
The steal time means you're trying to go over your allocated resources. AWS doesn't give you a dedicated amount of resources, it gives you access to more, so that when the host machine isn't under heavy load you can use more resources, which would otherwise be wasted. [1]
1. https://forums.aws.amazon.com/thread.jspa?threadID=79519#
steal is time when your VM wants to run but the hypervisor doesn't let it because another VM is using it. It does not include time when your VM was idle and another VM was using the CPU.
As a result, steal is often very low until your VM's CPU usage starts increasing. Then, steal increases rapidly.
For example on EC2, 2 m1.small VMs normally share 1 CPU. You might benchmark your application and see it can handle 1000 transactions per second at 10% total CPU. You might then (possibly naively) assume that you can put ~10000 transactions per second through before you hit 100% CPU. In fact, as you went through 4000 transactions per second and towards 5000, your steal would rise rapidly and you'd max your CPU out.