none
Hyper-V VMQ RRS feed

  • Question

  • Hi,

    I`m setting up VMQ on a Hyper-V host but i`d like to confirm that the settings i have are correct... The host comprises of 2x6 core processors with hyper threading...

    Set-NetAdapterVmq -Name "NET1" -BaseProcessorNumber 2 -MaxProcessors 4 -MaxProcessorNumber 10
    Set-NetAdapterVmq -Name "NET2" -BaseProcessorNumber 12 -MaxProcessors 8 -MaxProcessorNumber 22

    Set-NetAdapterAdvancedProperty -Name "NET1" -RegistryKeyword '*NumaNodeId' -RegistryValue '0'
    Set-NetAdapterAdvancedProperty -Name "NET2" -RegistryKeyword '*NumaNodeId' -RegistryValue '1'

    rss and vmq are enabled on the physical nic`s and also within the vm guests.

    Output in power shell is:

    PS C:\Windows\system32> Get-NetAdapterrss | sort name | ? name -Like "NET*" | ft -A

    Name Enabled Profile BaseProcessor MaxProcessor MaxProcessors Queues
    ---- ------- ------- ------------- ------------ ------------- ------
    NET1 True    Closest :2            :10          8             8     
    NET2 True    Closest :12           :22          8             8     

    regards,


    Tuesday, June 5, 2018 3:36 PM

All replies

  • Hi!

    VMQ uses only physical cores, if you have a HyperThreading (HT) enabled only even logical processors will be used).

    For a setup with 2 CPUs with 6 cores each it would look like this:

    Set-NetAdapterVmq NIC1 -BaseprocessorNumber 2 -MaxProcessors 6
    Set-NetAdapterVmq NIC2 - BaseprocessorNumber 14 -MaxProcessors 6


    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    • Marked as answer by Paininthe Wednesday, June 6, 2018 11:20 AM
    • Unmarked as answer by Paininthe Wednesday, June 6, 2018 11:21 AM
    Tuesday, June 5, 2018 3:55 PM
  • Hi, when entering this i get:

    Set-NetAdapterVmq : No matching keyword value found. The following are valid keyword values: 1, 2, 4, 8, 16

    Set-NetAdapterVmq : No matching keyword value found. The following are valid keyword values: 1, 2, 4, 8, 16
    At line:1 char:1

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (MSFT_NetAdapter...CD02D2415AA2}"):ROOT/StandardCi...rVmqSettingData) [Set-NetAdapterVmq], CimException
        + FullyQualifiedErrorId : Windows System Error 87,Set-NetAdapterVmq

    Also, do i need to enter a -maxprocessornumber too?

    regards,


    • Edited by Paininthe Wednesday, June 6, 2018 11:23 AM
    Wednesday, June 6, 2018 11:22 AM
  • Base and Max CPU properties are used to configure what CPU cores will be used by VMQ. The base processor is the first core in the group and max is the size of the group.  For example, Hyper Threading disabled and base=2 max=4 would assign cores 2-5. VMQ will not leverage hyper threading (HT). If HT is enabled then only even numbered cores will be used. 

    For example: HT enabled, base=2 max=4 would assign even numbered cores 2-8. When ever possible it is best to choose a base value greater than 0 (or 1 in case of HT).  Creating CPU bottlenecks on core 0 has caused performance issues in some implementations.

    In your case Hyperthreading is enabled 2x6 core processors in each server giving 24 logical processors.

    HyperThreading is enabled: NIC1 will use 2,4,6,8,10,12 LPs and NIC2 will use 14,16,18,20,22,24 LPs

    If HyperThreading would be disabled it would look as follows: NIC1 will use 2,3,4,5,6,7 LPs and NIC2 will use 14,15,16,17,18,19 LPs


    Here's an excellent article about VMQs:
    https://blogs.technet.microsoft.com/networking/2016/01/04/virtual-machine-queue-vmq-cpu-assignment-tips-and-tricks/

    Deep dive:

    http://blogs.technet.com/b/networking/archive/2013/09/10/vmq-deep-dive-1-of-3.aspx
    http://blogs.technet.com/b/networking/archive/2013/09/10/vmq-deep-dive-2-of-3.aspx
    http://blogs.technet.com/b/networking/archive/2013/09/10/vmq-deep-dive-3-of-3.aspx


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    Wednesday, June 6, 2018 12:46 PM
  • thanks for that, In my case then with 6 cpu`s and not being able to use 6 i maxprocessors am i to pick 8 and have a slight overlap by 2?

    regards,

    Thursday, June 14, 2018 2:09 PM
  • Try with this for example:

    Set-NetAdapterVmq -Name "NIC1" -BaseProcessorNumber 2 -MaxProcessors 5 -MaxProcessorNumber 10
    Set-NetAdapterVmq -Name "NIC2" -BaseProcessorNumber 14 -MaxProcessors 5 -MaxProcessorNumber 22


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    • Proposed as answer by Tony MCP Friday, November 2, 2018 5:05 AM
    Friday, June 15, 2018 7:07 PM
  • Hi,

    Will try that. Is that the most optimal based on my specs?

    Regards,

    Wednesday, June 20, 2018 12:30 PM
  • Based on your specifications I would say so yes.

    Blog: https://thesystemcenterblog.com  LinkedIn:   

    • Marked as answer by Paininthe Wednesday, June 20, 2018 2:31 PM
    • Unmarked as answer by Paininthe Wednesday, June 20, 2018 2:31 PM
    Wednesday, June 20, 2018 12:38 PM