Hyper-V multicore performance issue

Nikhil Parihar 1 Reputation point


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.

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

1 answer

Sort by: Most helpful
  1. Mico Mi 1,901 Reputation points

    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:
    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.