[SOLVED] Effects of the number of CPU Cores

Thorn

New Member
Oct 17, 2014
5
0
1
Hey,

after I started the 'Mastering Proxmox' book, I got to a point where it seems to lack details.
I've read into the effects of the cpuunits setting and am now wondering, wether increasing
or decreasing the numbers of CPU cores inside a virtual machine will influence the capabilitys
of this machine.
I've read, that the sockets are for license issus and do not affect the computing power of the
virtual machine, also I found advice not to configure more than 4 cores inside a vm (as far as
I understood, the limit is the number of the hosts CPU cores, including HT).
However, as I wish to further understand the technologie, I would like to know more on how the
number of cores affects the behavior of the machine. What I read from a VMWare manual, if
you configure a machine with them, the scheduler would need to find a time slice with the same
number of cores available as configured in the virtual machine, which could effectivly slow the
machine down compared to one with lesser cores.
As far as I understood so far, things are quite diffrent with proxmox as they assign time slices
by the configuration of the cpuuunits number. These are connectet to the virtual machines
as a whole, not to their cores?
Does assigning more cores to a machine actually improve it's performance (and if not, why?) and
what side effects can occure if I overassigne cores (say I have a 16 core host with serveral
8 core virtual machines for example) ?

Thanks for your time,
Thorn
 
Last edited:
So no one really knows whether assigning more cores to a machine does influence it's performance at all?
 
Does assigning more cores to a machine actually improve it's performance (and if not, why?)

yes, sure.

and what side effects can occure if I overassigne cores (say I have a 16 core host with serveral
8 core virtual machines for example) ?

normal linux multitasking is used for such case.
 
Thanks for the answer. As I understand now the vm is assigned the time slices by the
cpuunits value relativ to the others, the numbers of cpu's usable during that time is
in turn that of the numbers assigned to the machine?
 
I don't understand this. If, just for semplification, I've a 4 core physical CPU, and 2 VM, with same cpuunits, and VM104 set with 4 core, while VM102 set with 2 cores.
Every second the CPU time should be equally divided (same cpuunits), so VM104 will work for 0.5 seconds and use 4 cores, while VM102 then will work also for 0.5 seconds, but using only 2 cores and leavin the other 2 unutilized? If so there is advantage in assigning for each VM less cores than the physical avalable, or am I wrong?
 
I'd also be interested to hear the answer to this as my colleague asked me the same question today and I honestly didn't have a clue.
 
First: Remember to consider the Proxmox System itself as it does consume cpu time too.

Second: Yes, vm104 would have its time slice (cpu time frame) with 4 cores to itself while VM102 would need
its own timeslice but only utilize two cores leaving the other two idle or possibly for the host system.

Assigning less cores to a VM than physicly available would allow more machines to work on the same timeslice,
in your example: If both machines had only two cores they could work all the time, minus the slices occupied
by the host system.
Problems arise with diffrent settings. Asume you have a 8 core machine and two 4core vm's as well as two
1core vm's. Unless you have both 4cores on the same slice no slice will be fully occupied by the vm's.
On a less likely example: Asume a 12 core host system with two 8 core vm's. Reducing one to 4 cores might
decrease the overall response times, making the hosts slightly faster.

Colleagues of mine did encounter a related problem where their system seemed to .. not the technical correct
term .. lag. They would hang for the shortest timeframes, causing problems with databases. Reducing the
assigned cores on the used vm's solved that. This problem occured on a host with 24 cores and no vm having
more than 8, still there were many vm's running, some with more cores than needed.

Hope this helps.
 
I am reading this old thread, Is there a way to simulate the acceptable number of machines you can have depending of the number of cores (and their speed) ?
 

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!