Having more VMs than CPU cores - possible on PVE 3.0?

Nachtfalke

Member
Apr 7, 2013
46
0
6
Hi,

At the moment I am running a server which has 1 physical CPU with 4 cores. All VMs are KVM. Assuming I want to run more than 3 VMs how should I assign the cores?

If I run PVE3.0 and 3VMs I give one core per VM and leave one core over for PVE3.0 itself. So I assume that all 3 VMs running on full speed each one will use 1 core with 100% and everything will work without problems.

But what will happen if I run 4 or 5 VMs and assign 1 core per VM and all VMs are running on full speed. Will this crash a VM or what will happen?


I read much about "CPU units" on the forum and the "kernel fair scheduler" but I don't understand what they do exactly.
Could it make sense - assuming that the 3VMs never running full speed at the same time to assign 2 cores two every VM (3*2=6) even if I only have 4 cores at all so that it will work like "memory ballooning" but with CPU?

Thank you for your help!
 
..VMs will see virtual CPUs (sockets and cores).
The scheduler will spread the available physical processing power between all VMs.
If you have more more virtual cores running than what you have physically in the host, there is no technical problem.
If all VMs run on high load, the total CPU performance each VM will see will simply not match that of the compared physical counterparts, when based on no. of cores.
Meaning each VM with a virtual core will run slower than on a physical core....but it will run nevertheless.

IMHO you will run out of physical memory before you will see a bottleneck in available CPU performance when you have lots of VMs.
 
Hi p3x-749 and ebiss,

thank you for your feedback. When reading your posts and the documentation you pointed me to I think it would make sense to assign all 4 cores the Xeon CPU has to every of the 3 VMs because they mostly do not run on high load and if there is high load mostly only one VM for a short period of time. So this should help to have enough power when one VM has a load peak and 4 cores are really needed.

Another question - how much CPU power will ProxmoxVE use/need when running 3VMs ?

Thank you for your help! I appreciate it!
 
Yes, you can assign the physical CPU scheme to each VM...this only makes sense for a VM where the software/application running inside can make use of more than one core, of course ;)
Also, there are settings for no. of sockets and no. of cores per socket...especially Windoze will be picky with that...for a Desktop Windoze use only one socket and assign all cores to that socket...for Linux, this doesn't really matter.

The performance draw from the host OS itself will mostly depend on the I/O required/produced by the VMs. When all VMs are in idle, the host OS will idle too.
I/O goes into disk- and network-access...you should load virtio drivers into the VMs in order to increase I/O performance for the VMs (and lower performance draw on the host OS respectively).
A VM that just consumes CPU and RAM, with low I/O will run almost at native speed, meaning the host OS will draw/consume almost nothing.
With virtio drivers loaded into the VM, loss to the host OS is in the lower 1-digit percentage magnitude, I'd say.
 
Thank you!

VirtIO Drivers are - of course - already installed on Windows machines (NIC + HDD). Also the Ballooning service for dynamic memory allocation. :D

Question about I/O:
I had VirtIO installed for HDD and NIC. When I was copying 200GB of files from on physica server to a VM server I hat ~ 300MBit/s network speed and sometimes I/O delay of 20-30%. I assume this is because of only having SATA drives (RADI-1) with 7200rpm, right?

I know that these are not the optimal HDDs but it is sufficient for my environment because I am not running to many VMs on these HDDs and do not need to much HDD speed.

So thank you for giving more information not only about CPU but other things like I/O and so. I am new on virtulization techniques and every hint is always welcome :)
 

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!