cpu steal

hamed

Member
Sep 6, 2010
36
0
6
Hi,
I have a 24 core node running proxmox.
On this node, I create a VM and assigned 24 cores cpu to it.
When the VM is using all its cores, the cpu steal percentage on this vm will range from 1% to 9%.

I was wondering why is there cpu steal for this vm and how to prevent it?

Thanks
 
The host OS (Proxmox) requires some CPU to run its various upkeep jobs (doing the hosts share of IO activity, background daemons, etc.). If you assign 24 cores to a VM and you have 24 cores the only way to service the host is by "stealing" some cycles (I prefer the word "scheduling" or "sharing", but that's just semantics).

You've effectively oversubscribed the host. If you don't want this you really have two choices - don't assign 100% of your CPUs or don't set up a virtualization environment for a single VM (run the VM bare metal).

At the end of the day, however, you won't really get more work done. Remember that the "stolen" cycles are really for work that is either (a) directly on behalf of the VM like IO or (b) work that the VM would have to do itself if it was on bare metal. So really, the best thing to do about this is nothing. Don't stress over it.

The "steal percentage" stat really exists so that when you've oversubscribed a host you can tell when a given VM isn't getting enough cycles to get its work done effectively. When you aren't actually oversubscribed it is a stat that doesn't have much meaning for you.
 
If this is really an issue for you and the use case is really to have all 24 cores assigned to a single machine, whats the point of running a hypervisor? just run your application directly on the metal... proxmox is efficient, but nothing is more efficient then direct on metal.
 
In my experience, with any hypervisor you should never assign all physical cores to a VM. If you have 24 physical cores you'll have much better performance by assigning 20 cores to the VM than 24 (because otherwise I/O stalls will take place and slow down the whole node, for example). You can oversell in general (i.e. have 2 VM with 20 cores each even though you only have 24 physical cores instead of 40) but never give all your cores to a single VM.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!