Windows: Line-Based vs. Message Signaled-Based Interrupts. MSI tool.

Discussion in 'Operating Systems' started by mbk1969, May 7, 2013.

  1. Serjh

    Serjh New Member

    Messages:
    1
    Likes Received:
    0
    GPU:
    1080 TI
    Hey,
    Thanks so much for this tool and thread, it has been incredible helpful.
    Could you go into a bit more detail about what limits and max limits are?

    This would make more sense if I didn't have a Samsung nvme 970 pro which automatically filled in some of these columns. It chose to use a limit of 2048 and max limit of 33. It has 33 IRQ slots taken up.
    My set up is in the screenshot below. Why does my nvme choose to have a limit of 2048 when the max limit is 33? And does that mean it's going to reserve all my cores/threads until it finishes a queue of 2048 interrupts across 33 threads?

    Any more information would be greatly appreciated. Thanks!
     

    Attached Files:

  2. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,285
    Likes Received:
    7,367
    GPU:
    GF RTX 2070 Super
    @Serjh

    Limit is value obtained from registry keys related to device.
    Max limit is value obtained from OS.

    Usually limit value is set (in registry) by inf-file from device driver package (during its installation).
    It can be that device driver package is one for client and server OS. And (maybe) server OS can offer max limit value equals to 2048 interrupts for NVMe device.

    PS As for multiple IRQs (in MSI mode) being serviced by different CPU cores - this thing is either configurable or hardcoded into driver.
     
  3. jumpingjackflash5

    jumpingjackflash5 New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    RX550
    Hello,

    thank you very much for this great utility. I improved with it the latencies on multiple PCs and notebooks. Yes, some devices dont work with MSI enabled but majority does and can be switched into this mode. Then the overall responsiveness increases usually, microstuttering is decreased, if not the settings can be easily reverted withín the program or by reinstalling the driver.

    As for Atheros questions that were raised here, my experience is that AR8161 works very good in MSI mode both with 2.1.0.21 and 2.1.0.27 driver version. In the desktop usage in this case it is also useful to limit the number of MSIs to 1 (by default it on some computers shows up to 16 MSI max limit. If I let it be without limiting it occupies multiple "negative IRQs", which can be beneficial with other drivers (like NVMe or graphic driver). But with this particular Atheros driver I didn't see or measure any, the responsiveness didnt seem to improve with multiple IRQs for network card. This is consistent with what is in the INF file for Atheros, it does not enable MSIs by default

    [Msi.Addreg]
    HKR, "Interrupt Management", 0x00000010
    HKR, "Interrupt Management\MessageSignaledInterruptProperties", 0x00000010
    HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 0
    HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 1

    but somehow when it gets installed this limit 1 is not applied in my case and there is just max number 16, so I had to add it manually and it works well.

    But some other atheros chips like AR8131, with the same driver on different PC, did not work and I had to revert the settings to line-based mode.
    So Atheros drivers can be tricky but when it works it brings improvements to system responsiveness.

    To sum up, it is worth trying to optimize the system with this utility, in general I gained more perceived improvements with older PCs or with PCs where there is many devices, but also on new PCs it can be used.
     
  4. jumpingjackflash5

    jumpingjackflash5 New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    RX550
    Hello,

    thank you very much for this great utility. I improved with it the latencies on multiple PCs and notebooks. Yes, some devices dont work with MSI enabled but majority does and can be switched into this mode. Then the overall responsiveness increases usually, microstuttering is decreased, if not the settings can be easily reverted withín the program or by reinstalling the driver.

    As for Atheros questions that were raised here, my experience is that AR8161 works very good in MSI mode both with 2.1.0.21 and 2.1.0.27 driver version. In the desktop usage in this case it is also useful to limit the number of MSIs to 1 (by default it on some computers shows up to 16 MSI max limit. If I let it be without limiting it occupies multiple "negative IRQs", which can be beneficial with other drivers (like NVMe or graphic driver). But with this particular Atheros driver I didn't see or measure any, the responsiveness didnt seem to improve with multiple IRQs for network card. This is consistent with what is in the INF file for Atheros, it does not enable MSIs by default for some card but specifies the limit in one section

    [Msi.Addreg]
    HKR, "Interrupt Management", 0x00000010
    HKR, "Interrupt Management\MessageSignaledInterruptProperties", 0x00000010
    HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 0
    HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 1

    but somehow when it gets installed (with MSI and MSIX modes seen in the utility as supported) this limit 1 is not applied in my case and there is just max number 16, so I had to add it manually and it works well.

    Device PNP properties
    Display name : Qualcomm Atheros AR8161 PCI-E Gigabit Ethernet Controller (NDIS 6.30)
    PDO name : \Device\NTPNP_PCI0014
    Driver version : 2.1.0.27
    Driver inf-path : oem7.inf
    Driver provider : Qualcomm Atheros
    Driver rank : 16711681

    Device PCI properties
    PCI device type : PciExpressTreatedAsPci
    PCI-E max speed : v.1
    PCI-E max lanes : 1
    Interrupt modes : LineBased, Msi, MsiX
    Max MSI limit : 16

    But some other atheros chips like AR8131, with the same driver on different PC, did not work and I had to revert the settings to line-based mode.
    So Atheros drivers can be tricky but when it works it brings improvements to system responsiveness.

    To sum up, it is worth trying to optimize the system with this utility, in general I gained more perceived improvements with older PCs or with PCs where there is many devices, but also on new PCs it can be used.
     

  5. jumpingjackflash5

    jumpingjackflash5 New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    RX550
    One more thing, usually the devices that have got a lot of interrupts and activity affect the responsiveness the most. On the other hand, there are some devices that can be switched into MSI mode, but are seldom used or are not used most of the time - here it is probably not important to try the MSI mode.
    Generally, it is great that a state when all the sharing of line based interrupts is eliminated by switching some devices into MSI mode, and that important devices like graphic cards or storage controllers run in MSI mode, provided their drivers support this mode well and are stable in this mode.
     
  6. Warkratos

    Warkratos Active Member

    Messages:
    76
    Likes Received:
    36
    GPU:
    RTX 2060 6Gb
    I just got a new setup, installed all necessary drivers. Realtek Ethernet and AHCI Drivers are set to high priority automatically. The only thing I did was enable MSI mode for RTX 2060. Any suggestions?

    [​IMG]
     
  7. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,285
    Likes Received:
    7,367
    GPU:
    GF RTX 2070 Super
  8. EdKiefer

    EdKiefer Ancient Guru

    Messages:
    2,609
    Likes Received:
    267
    GPU:
    MSI 970 Gaming 4G
    @mbk1969, Hi, I read a few links you posted in another thread .
    https://www.reddit.com/r/intel/comments/9uc03d/the_i219v_nic_on_your_new_z390_motherboard_and/
    https://github.com/djdallmann/GamingPCSetup/tree/master/NETWORK

    I ran the PS command "Get-NetAdapterHardwareInfo | fl" with these results.

    Name : Ethernet
    InterfaceDescription : Intel(R) 82579V Gigabit Network Connection
    DeviceType : Conventional PCI
    SegmentNumber : 0
    BusNumber : 0
    DeviceNumber : 25
    FunctionNumber : 0
    SlotNumber :
    NumaNode :
    PciCurrentSpeedAndMode : 0
    PciExpressCurrentLinkSpeed : Unknown
    PciExpressCurrentLinkWidth :
    PciExpressMaxLinkSpeed : Unknown
    PciExpressMaxLinkWidth :
    PciExpressVersion :
    LineBasedInterruptSupported : False
    MsiInterruptSupported : False
    MsiXInterruptSupported : False

    Notice False for last three options which your tool says 82579V Gigabit Network supports both linebased and Msi modes (IRQ= -8)
    My question is shouldn't Get-NetAdapterHardwareInfo | fl show lineBasedInteruptSupport True even if MsiInterruptSupported is false?
    I mean can't have all three false as that is only ways interupts work?
     
    Last edited: Dec 8, 2020
  9. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,285
    Likes Received:
    7,367
    GPU:
    GF RTX 2070 Super
    @EdKiefer

    Are you sure you ran that command in elevated PowerShell?
     
  10. EdKiefer

    EdKiefer Ancient Guru

    Messages:
    2,609
    Likes Received:
    267
    GPU:
    MSI 970 Gaming 4G
    Positive, I do a right click on start and use the PS with admin menu context option.

    I just now tried all three ways, from the start menu, and tried also PS ISE all with admin rights, the same thing last three entries are false.

    Everything is working fine, I was just reading those links and tried that PS script (Get-NetAdapterHardwareInfo | fl) to see what it produced as the one link said my card is not supported for multi RSS queues.
     
    Last edited: Dec 8, 2020

  11. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,285
    Likes Received:
    7,367
    GPU:
    GF RTX 2070 Super
    Not last 3 entries, last 9 entries are not reported.

    RSS is only needed on server workloads. To spread DPCs across different CPUs user can utilize different methods.

    Upd:
    Here is the log from my work rig:
    Code:
    Get-NetAdapterHardwareInfo | fl
    
    Name                        : WiFi
    InterfaceDescription        : Intel(R) Dual Band Wireless-AC 3168
    DeviceType                  : PCI Express treated as PCI
    SegmentNumber               : 0
    BusNumber                   : 2
    DeviceNumber                : 0
    FunctionNumber              : 0
    SlotNumber                  :
    NumaNode                    :
    PciCurrentSpeedAndMode      :
    PciExpressCurrentLinkSpeed  : 2.5 GT/s
    PciExpressCurrentLinkWidth  : 1
    PciExpressMaxLinkSpeed      : 2.5 GT/s
    PciExpressMaxLinkWidth      : 1
    PciExpressVersion           : 1.1
    LineBasedInterruptSupported : True
    MsiInterruptSupported       : True
    MsiXInterruptSupported      : False
    
    Name                        : Ethernet
    InterfaceDescription        : Realtek PCIe GbE Family Controller
    DeviceType                  : PCI Express treated as PCI
    SegmentNumber               : 0
    BusNumber                   : 3
    DeviceNumber                : 0
    FunctionNumber              : 0
    SlotNumber                  :
    NumaNode                    :
    PciCurrentSpeedAndMode      :
    PciExpressCurrentLinkSpeed  : 2.5 GT/s
    PciExpressCurrentLinkWidth  : 1
    PciExpressMaxLinkSpeed      : 2.5 GT/s
    PciExpressMaxLinkWidth      : 1
    PciExpressVersion           : 1.1
    LineBasedInterruptSupported : True
    MsiInterruptSupported       : True
    MsiXInterruptSupported      : True
    
    Upd:
    And that command does not require elevation...

    Upd:
    Note that "DeviceType : PCI Express treated as PCI" not "Conventional PCI"
     
    Last edited: Dec 8, 2020
  12. EdKiefer

    EdKiefer Ancient Guru

    Messages:
    2,609
    Likes Received:
    267
    GPU:
    MSI 970 Gaming 4G
    I also checked SG TCP optimizer which uses PS for many settings and RSS was set to enabled. I just wasn't expecting those results.

    also ran this.
    PS C:\WINDOWS\system32> Get-SmbClientNetworkInterface

    Interface Index RSS Capable RDMA Capable Speed IpAddresses Friendly Name
    --------------- ----------- ------------ ----- ----------- -------------
    13 False False 1 Gbps {fe80::b19b:ef6a:5f9f:5a59, 69.116.236.152} Ethernet
    9 False False 0 bps {fe80::31bc:e4b2:ea8b:cc3d} Wi-Fi 2

    Then
    PS C:\WINDOWS\system32> Get-NetAdapterRSS

    Name : Ethernet
    InterfaceDescription : Intel(R) 82579V Gigabit Network Connection
    Enabled : True
    NumberOfReceiveQueues : 1
    Profile : Closest
    BaseProcessor: [Group:Number] : 0:0
    MaxProcessor: [Group:Number] : 0:3
    MaxProcessors : 4
    RssProcessorArray: [Group:Number/NUMA Distance] : 0:0/0 0:1/0 0:2/0 0:3/0
    IndirectionTable: [Group:Number]

    So here it shows it is True, anyway thanks for help, this is a ASUS P8- Z77V Pro MB.
     
    Last edited: Dec 8, 2020
  13. Astyanax

    Astyanax Ancient Guru

    Messages:
    9,091
    Likes Received:
    3,116
    GPU:
    GTX 1080ti
    @EdKiefer

    assuming you're using an intel platform with an intel pch, the ethernet controller is on a pcie-like interface dedicated to the 82579, thats why the powershell can't get PCIE information for it, this includes the MSI info.


    Regardless what the powershell is saying, the device natively supports MSI's and should use them by default.

    The second bit of the quote refers to the fact a second 82579 can be implemented in the system (Dual Lan) as well as on non intel platform usage, for which i've seen later 825xx on a few AMD boards.
     
    Last edited: Dec 9, 2020
  14. EdKiefer

    EdKiefer Ancient Guru

    Messages:
    2,609
    Likes Received:
    267
    GPU:
    MSI 970 Gaming 4G
    Ahh, I see, well that makes sense then, Yes This is an Intel 3570k in a ASUS P8Z77v pro mb and the NIC is onboard one.
    It is with IRQ -8 which was with default msi mode from the driver (I didn't have to enable it).
     
  15. popcorn9499

    popcorn9499 New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    1080ti 11gb
    Might be too much of an ask but is it possible to get a copy of the source code?

    I was thinking of looking into adding some command line functionality to grant the ability to set turn msi on, for specific devices on boot if it wasnt already configured. Figured this would be a easy enough way to get that functionality.
     

  16. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,285
    Likes Received:
    7,367
    GPU:
    GF RTX 2070 Super
    On boot of what - OS or app?
    I don`t get the meaning of your feature. Can you describe it step by step?

    PS If you just want to turn MSI mode for all devices (in bulk) I can give you link to PowerShell script. I just removed it to not endanger users with unbootable OS.
     
    Last edited: Dec 14, 2020
  17. popcorn9499

    popcorn9499 New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    1080ti 11gb
    I wouldnt mind a powershell script. Here is my situation. I am running a windows 10 vm passing through a video card and usb controller etc. My goal was to set most if not all devices to MSI mode and give a prompt to let me know if it needed to set any device to MSI mode since my understanding is a restart is likely required to have Message signal based interrupts to work. so turning on all devices in bulk would probably be just fine since I enabled it for all the devices anyways.

    What I was thinking with the application was just to have a command line argument you set so I could make a task that launched at startup doing this but if you are willing to send a powershell script that would be greatly appreciated. Thank you
     
  18. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,285
    Likes Received:
    7,367
    GPU:
    GF RTX 2070 Super
    https://www.mediafire.com/file/rcgtxc73fp00x26/MSI_mode_utils.zip/file

    It requires elevation. So you should create task with privileges (with privileged account).
    In case you are not familiar with PowerShell, when executed without input parameter script prints all devices with MSI mode turned On/turned Off/not configured. To turn MSI mode On execute script with parameter "on"/to turn MSI mode Off - with "off"/to generate text of reg-file with current state of registry values related to MSI mode - with "reg".
     
  19. popcorn9499

    popcorn9499 New Member

    Messages:
    3
    Likes Received:
    0
    GPU:
    1080ti 11gb
    Thank you this is much appreciated. It is exactly what I wanted.
     
  20. Anomander

    Anomander New Member

    Messages:
    7
    Likes Received:
    2
    GPU:
    1080ti
    Just to add my 2 cents here as well. Recently I've found out that some apps don't detect my CUDA cores. (GTX 1080ti) and it turns out that it's most probably because I switched to MSI mode. (also OpenCL and PhysX)

    [​IMG]

    I came to this conclusion by personal experience and also by a quick search where I found this (I know it's about Linux, but I guess it kinda affects Windows as well):
    Message Signaled Interrupts? | NVIDIA GeForce Forums
    GPU performances seemed to be ok in games, but for example I couldn't enable the CUDA rendering for Adobe Premiere Pro because of that. So keep that in mind unless you have a suggestion on how to enable it and still have them detected?

    In addition a question. Is the bottom(last) Audio Controller ok to have the same irq as the GTX 1080 ti, because it's the audio from the nvidia drvier or am I in the wrong here? Do you see anything I should (try) change here? Thank you!

    upload_2020-12-16_1-17-9.png
     

Share This Page