Performance guidance - home many VMs can run on a 4 cores server

svacaroaia

Member
Oct 4, 2012
36
0
6
Hi,

is there a tutorial/document/guide providing suggestions regarding how many VMs can run on a host with X cores ?

I would also be very interested in some advice/details regarding how Proxmox deals with memory over-commiting

For example, assuming all the VM's are configured with only 1 CPU, how many can be run on BL460C ( 2 core Intel® Xeon® X5270, 4 cores each)

Using the same example, how much memory can I allocate to VMs is the total physical memory on the host is 24 Gb ?

Thanks
Steven
 
Hi,

is there a tutorial/document/guide providing suggestions regarding how many VMs can run on a host with X cores ?

I would also be very interested in some advice/details regarding how Proxmox deals with memory over-commiting

For example, assuming all the VM's are configured with only 1 CPU, how many can be run on BL460C ( 2 core Intel® Xeon® X5270, 4 cores each)

Using the same example, how much memory can I allocate to VMs is the total physical memory on the host is 24 Gb ?

Thanks
Steven
Hi Steven,
it's hard (or better say impossible) to give an easy VM/CPU or VM/RAM ratio. It's depends on your VM and your host.
Mostly the IO then RAM and then CPU-power is the bottleneck (go for a good raidcontroller with fast disks).
I have two hosts with 4 cores and 16GB Ram, where 14 VM runs (each). But I have also hosts, where only 4 VMs run...

Udo
 
One thing is certain: what your VM's actually DO is much more important than the sheer number of them. A single VM can put the same amount of stress on a machine as 20 almost idle VM's. So it all depends on your workload, there is no generic rule.

Still, there are a couple of things to know:

1. OpenVZ has much lower CPU overhead than KVM, which means that you can usually host 2-5x as many OpenVZ virtual machines on the same hardware.

2. KVM virtual machines use up all allocated memory when they start, while OpenVZ guests run in the same memory space, so again easily 2-5x as many can run on the same hardware. KSM may help a bit when you have similar KVM machines, but you can't really overprovision with KVM. On your 24GB machine you can run 5x 4GB KVM VM's, because you should leave a couple of GB free for the host system. With OpenVZ, it can be much more.

3. Number of cores is important, but not absolute. Don't forget that processor architectures differ: for example, a Core 2 quad core (or equivalent Xeon) is about as fast as a Sandy Bridge i3 dual core. So newer CPU's are much better in this regard. Your dual socket Xeon X5270 should be fine for a couple of VM's.

4. You don't have to limit your guests to 1 CPU, you are usually better off if you give them at least 2: they will run smoother and compete for the resources just as well. CPU is not RAM, you don't have to divide it up between VM's - but you can balance BETWEEN your virtual machines if you give one VM more cores than the other.

5. Finally, disk IO is a very important thing when sizing your server. It can happen that you see a lot of free CPU time, but your system slows down because the disk can become a serious bottleneck. That's why you better use 4,6 or 8 disk arrays on a HW RAID controller (or even SSD drives), and also leave a couple of GB memory free to Proxmox so the system cache can work well.
 
2. KVM virtual machines use up all allocated memory when they start, while OpenVZ guests run in the same memory space, so again easily 2-5x as many can run on the same hardware. KSM may help a bit when you have similar KVM machines, but you can't really overprovision with KVM. On your 24GB machine you can run 5x 4GB KVM VM's, because you should leave a couple of GB free for the host system. With OpenVZ, it can be much more..
That's not true. KVM with KSM allocates only the amount of memory, that the virtual OS uses. With KSM I can overprovision around 130-140% (eg. physical mem:96GB, provisioned: 130GB, used:80 GB). All are Linux KVM VMs, but with different distributions, and different workload (Oracle DBs, Webservers, Subversion Servers ...).
 

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!