Interrupt affinity policies, latency spikes and weird behaviour

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by klunka, Oct 16, 2020.

  1. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb
    yo, hello

    I've been playing around with interrupt affinity policies, looking for what's the ideal configuration for my setup. (I'm into competetive fps so I want low latency)

    I noticed some strage things going on and thought I share my observations, maybe someone smart can help me understand...

    Ok, so I tried different interrupt policies for my GPU(1080ti, will post all my specs at the end) and then checked with latencymon to confirm DCPs are generated on the cores specified by the policy.

    Results:
    1) If I chose "MachineDefault", "AllCloseProcessors", "AllProcessorsInMachine", "SpeadMessagesAcrossAllProcessors", or no policy at all(default), all DCPs are on core0. Even on full load there is no spreading of DCPs to multiple cores.

    2) If I choose "SpecificProcessors" policy and select a single core, that core will handle all the DCPs -as it should. If I choose multiple cores, all the DPCs will still go to a single core.

    I have been told that, even on default/no policy, the DPCs should spread at least to 2 cores. What could be the problem here?

    The next thing I noticed is even weirder.
    Default policy I get spikes in latencymon when moving the mouse. USBPORT.SYS spikes to above 30us in ISR routine execution time. If I switch my GPU policy to specified processor and choose one or more specific cores(but not all cores) these spikes disappear and I have rock solid ISR routine execution time of below 5us no mater how much I move the mouse.
    If I choose all cores or any policy other then "specific" I get the spikes back. Tested and retested this a lot of times.

    So to sum up, my interrupt affinity policies don't change where the interrupts are made for the most part but at the same time very much affecting the latency spikes of my USB.

    No idea how to troubleshoot, any suggestions are very welcome!

    Here's the rest of my specs:
    gtx 1080ti
    Xeon E3-1230 v3 (4 cores)
    gigabyte H87-HD3
    16gb ddr3
    USB 2.0/ehci
    windows 10, 1909


    Note: Both my gpu and usb controller would share IRQ port 16, but I'm using MSI mode for my graphics card, maybe that's still important detail, idk. I tested originally with 441.66 driver and now with latest, same result.

    Have a good day!
     
    Last edited: Oct 16, 2020
  2. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,839
    Likes Received:
    6,777
    GPU:
    GF RTX 2070 Super
    Have you tried to set GPU into MSI mode?
     
  3. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb
    Yes, have been using msi for a while. Must admit I didn't do this test on line based to see if that's the issue.
     
  4. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb

  5. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,839
    Likes Received:
    6,777
    GPU:
    GF RTX 2070 Super
    If you write that GPU shares IRQ with USB then both work in legacy mode. So that ^ your sentence contradicts to what is written in OP.

    Also I would advise to not offer affinity policy tool because to use it people have to understand the whole picture of OS, devices and interrupts.
     
    Last edited: Oct 16, 2020
  6. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb
    Yes sorry, my bad. When in line mode, both are using IRQ 16, but I use MSI mode for my gpu. Will edit OP...

    Edit: A detail I forgot and ties in with this: In line mode, I could not put GPU on one core, while having USB controller on another. In msi mode, no problem.
     
  7. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,839
    Likes Received:
    6,777
    GPU:
    GF RTX 2070 Super
    Also having 30 microseconds ISR instead of 5 microseconds ISR does not mean that you have issues because of that.
     
  8. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb
    Agreed, I'm just curious...
    My games are running fine for the most part, especially considering my setup is dated. Still latency spikes from USB drivers might make aiming worse, same with gpu interrupts only using one core.
     
  9. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,839
    Likes Received:
    6,777
    GPU:
    GF RTX 2070 Super
    Aiming starts at tens of milliseconds, not microseconds though...
     
    Smough and AsiJu like this.
  10. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb
    Who knows, it's not the point of the thread anyway...
     

  11. hemla

    hemla Member Guru

    Messages:
    184
    Likes Received:
    10
    GPU:
    nvidia
    So you are able to choose which core to use for interrupts? Also, did you test does it make any difference to have it on different core?
     
  12. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,839
    Likes Received:
    6,777
    GPU:
    GF RTX 2070 Super
    fluidz likes this.
  13. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb
    Yes you can choose any core, with the "SpecificProcessors" policy.
    There are 2 ways I tested this. One was with latencymon, just to see if the policy is even applied in the first place -see OP. The other was ingame, and solely based on my feel. If you ask me it can make a noticable difference, but I wouldn't dare to elaborate here, because people like to call bullshit/placebo on forums a lot.

    If you're competetive fps player I suggest try it yourself with different policies and cores...the best for my setup was leaving GPU at default(no mask) and putting USB controler on core0(core0 has lowest latency; GPU should be using core0 already, but USB by default is using core1 while 3d applications are running).
    If you are not into fps multiplayer games, I wouldn't bother too much about interrupt affinities....

    If you gonna try it some quick notes: All the program does is make tweaks in the registry. I suggest making a restore point before, so you can easily reset everything if you want to. Also the program will throw and error message here and there saying "Registry value for affinity mask has unexpected type", changing affinities will still work though.
     
  14. klunka

    klunka Member

    Messages:
    25
    Likes Received:
    5
    GPU:
    1080ti / 11gb
    @mbk1969
    Thanks, I'll check it out!
     
  15. hemla

    hemla Member Guru

    Messages:
    184
    Likes Received:
    10
    GPU:
    nvidia
    So if core0 has lowest latency overall, is it possible to move USB controller and GPU on core0 while moving app(game) away from it?
     

  16. EdKiefer

    EdKiefer Ancient Guru

    Messages:
    2,556
    Likes Received:
    247
    GPU:
    MSI 970 Gaming 4G
    There are also hidden interrupt steering setting is power plans that may help with the MS interrupt tool.
    The settings options are.
    1) Default
    2) Any processor - Route interrupts to any processor
    3) Any unparked processor with time delay - Route interrupts to any unparked processor with time delay
    4) Any unparked processor - Route interrupts to any unparked processor
    5) Lock Interrupt Routing
    6) Processor 0 - Route interrupts to Processor 0
    7) Processor 1 - Route interrupts to Processor 1

    You can use mbk1969 PowerSettingExplorer.exe to alter or just check out the settings.

    https://forums.guru3d.com/threads/windows-power-plan-settings-explorer-utility.416058/
     
    bluedevil likes this.
  17. bluedevil

    bluedevil Master Guru

    Messages:
    350
    Likes Received:
    5
    GPU:
    Kfa2 RTX 2060 6gb
    You could try spreading them set gpu core 4 or the furthest from first core since windows tends to bunch them to the first cores then USB on core 3 network core 2 and sound core 1. The cores may be listed from 0 instead of 1 so core 0 would be the first...
    Fr33thy has a guide on YouTube on how to do this.Look for his latency guides.
     
  18. bluedevil

    bluedevil Master Guru

    Messages:
    350
    Likes Received:
    5
    GPU:
    Kfa2 RTX 2060 6gb
    What would be the optimal setting ?
    Number 4 seems the best one but i don't understand the use of number 3, the time delay part would make it slower but there is probably a reason for it.
     
  19. EdKiefer

    EdKiefer Ancient Guru

    Messages:
    2,556
    Likes Received:
    247
    GPU:
    MSI 970 Gaming 4G
    The one time I tried it, I think I ran the option 4, and interrupts were spread out among all cores (I only have 4core i5-3570k).
    To answer your question with 3rd options, if you look at the interrupt section of the power plan there is a timer delay option.
    Here I'll copy-paste it.

    Unparked time trigger
    Description
    Time a processor must remain unparked before interrupts are moved onto it
    Range, Units
    0 .. 100000 Milliseconds

    All power plans have 100ms value.

    PS: I have it all back to stock, except I have the vid card in MSI mode as I didn't have any problems I could tell.
     
  20. hemla

    hemla Member Guru

    Messages:
    184
    Likes Received:
    10
    GPU:
    nvidia
    If I have an old DX11 game that is predominately using first core (and DX11 by it's nature is also forcing more stuff on first core) then would moving mouse and GPU to second core help? I do have HT enabled as well.
     

Share This Page