We start with what our goals are
We have a vm that want to take as much cpu power as possible from the host.
But how shall we configure the VM to make the most of it. You have read about numa nodes and what that means? right? If not look, at the bottom of this post you will find find some nice links.
If you really want to deep dive regarding this read anything that Frank Denneman as written, great stuff!
Also take a look at https://notesfrommwhite.net/ from @mwVme great stuff and do great summary of VMware stuff.
Shall I use vCPU and make it equal to Logical Processors?
Shall I use vCPU and make it equal to Physical socket?
Whats is sockets on a VM?
How many cores per socket on the VM?
So many questions, Lets try the different configurations and see!
I have to answer a few questions during the tests
How many vCPU does the VM see?
How many numa nodes does the VM see?
What is the performance on the VM?
We start with the stuff that I can not change.
We have a server with 2 physical CPU:s
12 Cores per CPU in total 24 cores
Then we have hyper threading enabled so we get 48 Logical processors.
So lets see what are the different configuration that we wanna try out for this VM.
The Windows server is 2019 with 8GB of memory. The picture says 4 but I change that after the screenshot.
In the test vm we have 8 GB ram 40 GB. Newly installed Windows 2019 server. The pictures are related to the the test with 48 vCPU and 48 Cores per socket.
So first of whats does Windows see?
And how many numa nodes can Windows see?
Then we run CPU-Z just to verify:
Now to performance. We use passmarks program to test perfromance.
I don’t wanna bore you out with a lot of picture so you have to believe the excel sheet.
The winner in my case was 48 vCPU and 24 Cores. That will be 2 sockets on the VM and 2 NUMA nodes.
|vCPU||Cores||Sockets||Virtual proc. in VM||Sockets in vm||Numa node in vm||CPU Mark||Integer Math||Floating Point||Prime Nr||SSE||Compression||Encryption||Physiscs||Sorting||Single Thread||Cross-plattform||Total|
Did not get the table nice in WordPress, you can not be good at all the things. So here is a screen shot.
Some sizing rules from vmware blog
Picture below is sizing av VM if the VM has less memory than one of the sockets.
Picture below is sizing av VM if the VM has more memory than one of the sockets.
If you have a single VM on host, the best configuration is to match the physical setup. In my case was
48 vCPU and 24 Cores per socket
I did not look at the application side, that can be my next project if i get the feeling.
I also only used passmarks application to do the test. As you can see the best result in this test was 48 vCPU 24 Cores and results in 2 sockets. So it matches the physical hardware.
Some numbers are better on different configurations, but I have only looked at total numbers. If you want to calculate prime number the best configuration would be 24 vCPU 1 core for the VM.
And over allocation is also something to think about when you have multiple vm:s on same host.
If you enable Hotadd on a VM numa is disabled.
Regarding the sockets, it is purely based on how the CPUs are presented to the guest. Whether you choose dual sockets single core each, or single socket with dual core, vSphere treats those as the same, you get 2 cores of CPU time.
CPU Benchmarks value:
Thank you for reading this far,