Good morning,
I am trying to enable hyperthreading in a virtual machine.
I have checked that the Esxi at the bios level has it enabled and it is also enabled at the vsphere level.
But if I check the wmi it always shows
NumberOfCores=1
NumberOfLogicalProcessors=1
NumberOfCores=1
NumberOfLogicalProcessors=1
I think I should put NumberOfLogicalProcessors=2
Could someone help me?
Why do you want hyperthreading in a VM? You can allocate multiple sockets to a VM, and/or multiple cores per socket to a VM, why would you need hyperthreading too?
Hello¡¡
I would need to have hyperthreading enabled by a SAP HANA recommendation. They say it can increase performance by 15%.
Thank you
Those kinds of recommendations usually relate to the host, not to a VM.
This might help: https://blogs.vmware.com/apps/2018/01/hyper-threading-impact-virtual-sap-sizing-performance-part-1-2...
I try to simulate scenario 2
I have configured the virtual machine with 8 vcpus and 4 cores. But it appears two socket, I think it should appear one socket.
In the virtual machine appear
NumberOfCores=1
NumberOfLogicalProcessors=1
I belive that NumberOfLogicalProcessor should be 2.
Thank you.
8vCPUs over 2 virtual sockets = 4 logical processors per socket.
This is an example output of a Windows 11 VM with 2 virtual sockets and 4 vCPUs.
C:\Users\User>wmic cpu get numberofcores, numberoflogicalprocessors
NumberOfCores NumberOfLogicalProcessors
2 2
2 2
So your output for wmic cpu get numberofcores, numberoflogicalprocessors should be two lines of 4, 4 (since there are two virtual sockets).
You should check if the boot options is limiting the number of processors. For example on Windows 10/11 on msconfig the Boot tab has an "Advanced Options" button that can limit the "Number of processors". My guess is that your VM is limited to 1 that is why you are seeing only NumberOfCores=1 and NumberOfProcessors=1
Hi,
This is correct, the following appears
But I need that hyperthreading is active, I believe that the correct should be NumberofCores 4 and NumberOfLogicalProcessors 8
If I run the test on my personal computer, the following is displayed
I am sorry because maybe I am confused and in a virtual machine it should not appear in the same way.
Thank you.
Hyperthreading is not set per VM but for the entire host ,is HT enabled on the host level ?
Hi,
Hyperthreading is correct in the esxi
I could create a virtual machine with 32 vcpus
But SAP HANA requeriment is in the operating system the Thread(s) per core =2
In this moment
Is the same Thread(s) per core that hyperthreading?
Thank you
since you have already enabled HT it's used by the VM and check with SAP HANA about this requirement "But SAP HANA requeriment is in the operating system the Thread(s) per core =2" is it same for a VM which make no sense.
below only requirement is to enable HT - https://wiki.scn.sap.com/wiki/display/VIRTUALIZATION/SAP+HANA+on+VMware+vSphere
In a nutshell: SAP HANA follows general published vSphere Best Practices for databases:
Hi,
As you indicate the vm is already using hyperthreading, but if they type in the os "lscpu" the number of thread is 1
If possible that VM guest OS show "Thread(s) per core =2" or this is imposible and it only show in the hypervisor
I should try to demostrate that hyperthreading is activate and the vm guest os and its benefits are being utilized.
Thank you.
Hi,
I have seen that in other systems this is possible through multithreading.
https://ec2-immersionday.workshop.aws/specifying-a-custom-number-of-vcpus.html
Is this possible with vSphere?
Thank you
I don't think you simulated the Scenario 2 properly from the 2018 whitepaper properly.
On your subsequent screenshot, it shows the host CPU as 2 sockets x Xeon Gold 5217 (8c/16t) CPU. To simulate Scenario 2, your VM needs to have 16 vCPUs (twice the number of cores of the in one CPU socket), but you only allocated 8 vCPUs.
As for seeing HT from within the OS, I don't think that is possible with VMware. What matters is how the vCPUs are scheduled into the physical core/HT. I think the purpose of the SAP/HANA using HT is to have access to same L1/L2 cache as 2 HTs in the the same CPU core share the same L1/L2 cache. All cores share the same L3 cache.
Use this as reference as it states clearly it is for 6.5 and later. The previous whitepaper is from 2018, don't know how relevant it is anymore.
https://core.vmware.com/resource/sap-hana-hyperconverged-infrastructure-hci-solutions-powered-vmware...
Even though you configured as two virtual sockets, normally ESXi would try to schedule all vCPUs in the same socket (for RAM locality reasons).
Anyway, have a good read/understanding first rather than trying settings left, right, and centre.