Hyper-V multicore performance issue

Nikhil Parihar 1 Reputation point
2020-11-27T08:34:10.953+00:00

Hi!

I have a c++ application that calculates 100 factorial a million times. I ran it on windows (host machine) and it took a few milliseconds to get processed but if I run it on Oracle linux 7.3 (Guest machine created through Hyper-V), it takes 40 seconds.

Host machine:

total cores: 4 (8 logical cores with the help of hyperthreading)

ram: 12GB

Guest machine:

total cores: 4 (CPU0, CPU1, CPU2 and CPU3)

ram allocated: 6 GB

Why VM takes so much time? should i prefer virtualBox over Hyper-V in terms of performance? or do i need some kind of drivers on windows to optimize the performance of hyper-V??

NOTE: i've set the virtual machine process affinity and assigned 4 cores and then set its priority to high.

Thanks in advance.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,538 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mico Mi 1,921 Reputation points
    2020-11-30T08:42:10.547+00:00

    Hi,
    Do you have other VMs? If yes, how is the performance on other VMs?
    Please check If the adapter driver and firmware are up to date. If yes, you can try to disable VMQ on physical NICs using the Set-NetAdapterVmq Windows PowerShell command.
    You can confirm that VMQ is disabled by using the Get-NetAdapterVmq Windows PowerShell command.
    And I think the following article may be helpful for you:
    https://www.fastvue.co/tmgreporter/blog/understanding-hyper-v-cpu-usage-physical-and-virtual/
    https://community.spiceworks.com/topic/2122315-hyper-v-core-server-2016-performance-issues
    Thanks for your time!
    Best Regards,
    Mico Mi

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments