How many VMs per core/vcpu can be run in OpenStack

Albert Vonpupp asked:

I’m working on a simulation tool to model VM behavior and migrations on Cloud environments.

I deployed a little OpenStack cluster with 4 nodes on cheap regular hardware PCs at the university using DevStack. I remember that I couldn’t run more VMs than the actual vCPUs available. I’m not sure if this is a DevStack limitation or because I was using regular PCs hardware.

Assuming that each VM has only one CPU, how many VMs could I run on a host with a CPU with 2 chips, 8 cores per chip (16 total cores) and 2 hw threads per core (32 total hw threads) like specs on [1]?.

Would it be reasonable to think that I could run 32 VMs (one CPU per VM)? Could I run more? How many VMs per hw thread / core could I run?

[1] Specs used on the example: http://www.spec.org/power_ssj2008/results/res2012q4/power_ssj2008-20121031-00575.html

Thanks a lot.

My answer:


OpenStack does indeed allow you to overcommit CPU resources, but the amount that you can overcommit can be limited by local configuration. By default the ratio is 16:1, meaning you can run a maximum of 16 virtual CPU cores for every physical CPU core across all running VMs.

Since most workloads are not very CPU-intensive, overcommitting CPU usually makes sense. But some workloads can be very CPU-intensive, and for those you may want to limit overcommitting. Things run by university students often fall into this category… 🙂

If the overcommit ratio was changed to 1:1 then you would not be able to overcommit CPU at all, and would be limited to running no more vCPUs than physical CPU cores. This seems the most likely explanation for your DevStack issue.

Note also that a single VM cannot have more vCPUs than exist physical CPUs in a compute node. But there is no problem to run more VMs than physical CPU cores.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.