DPC Latency Guide - Possible Solutions

Discussion in 'PC' started by zero-frag, Apr 23, 2020.

  1. zero-frag

    zero-frag Producer

    Joined:
    Feb 2, 2014
    Messages:
    348
    Likes Received:
    109
    Hello everyone,

    A few years ago, I discovered the topic of DPC latency (which as some of you may know, is quite important with machines dedicated to music). Back then, I checked on my old rig (i7 4770K Win 7) and I had no issue so I never thought about it again.

    Recently I stumbled upon it again and checked on my fairly recent system (about 1.5 years old). I was surprised to find that I had consistent 700-1000 DPC latency.

    This explains why, despite the power of my new rig, I could never use lower buffer settings. Any time the CPU was above 50% I’d start getting crackles. I always attributed it to the Threadripper not being the greatest at low buffer settings (which is true but it is now vastly improved). I was even getting crackles when watching youtube etc.

    I’ve searched the web and found a lot of information of possible fixes and it was quite a bit of work to find out all the information and figure out what works and what doesn’t for me.

    All the information is out there but it is spread out over the interwebs in various obscure forums.

    So, I will summarize below each step that I took to reduce my latency down from 700-1000 to a consistent 20-30 with an occasional spike at 200 so that it may help others trying to resolve their latency issues. It was such a pain in the ass to gather this info, I figured I’d centralize it somewhere, even just for me as a reminder if I need to reinstall my pc.

    Keep in mind, these DPC issues can be very much hardware specific, so what worked for me may not necessarily work for you. Still there should be enough here to find some partial solutions at least.

    My specs:

    AMD Threadripper 2950x 3.50Ghz

    Geforce 2070 RTX SUPER

    128 Gb RAM DDR4 2933Mhz

    MSI X399 MEG Creation

    Steps:

    1. BIOS:


    - Disable C states



    - Disable AMD Cool n quiet: there is an intel equivalent. This underclocks your CPU when you’re IDLE. That means when you send a midi note and your CPU needs to compute a bunch of instructions in 3ms, it isn’t able to use its full processing power.


    - Anything power savings related: anything in the bios related to power savings, which saves on energy and underclocks/undervolts will do so at the expense of latency. Disable


    - AHCI Mode for your drives apparently helps (it was already the case for me)

    - Disable unused peripherals: for me I disabled the network card and the onboard audio interface which I do not use.

    My CPU now runs overclocked at all times without any fluctuations. It is much hotter than before but I have more than enough fans to compensate. The flipside has been a tremendous performance increase in audio performance

    2. Windows:


    - Power settings: by default, windows offers you only “optimal performance” mode. There is a “hidden” ultimate performance mode. See:

    https://www.howtogeek.com/368781/how-to-enable-ultimate-performance-power-plan-in-windows-10/

    Use that.


    - Disable background applications : 99.9% if not 100% of these should be disabled. Search « background app » in windows search bar.


    - Device Management : go into device properties of all the USB hubs, and under « power management » make sure you uncheck the power saving option. You can do this for other devices as well.


    - Clean uninstall/reinstall of Nvidia drivers : do a clean complete uninstall of Nvidia drivers using DDU.

    Then reinstall the latest drivers and make sure you only install drivers and physX. No Geforce experience, no HD audio.


    - Disable bluetooth receiver : I enable it when i need it.


    For the two steps below, I recommend doing a system recovery point.


    - Disable HPET : this helped quite a bit. Apparently it can cause some very specific applications to no longer work but 99.99% is fine. I personally had no issues with it.

    https://www.ghacks.net/2013/04/18/try-changing-hpet-settings-to-improve-your-pcs-performance/


    - Change devices to MSI mode : this is way too complicated for me to explain so feel free to google it. All devices which can be turned to MSI mode should be turned to MSI mode, particularly Nvidia Graphics Card.

    Note that Nvidia will revert every time you install a new driver.

    https://forum.rme-audio.de/viewtopic.php?id=25778

    To facilitate the process, a small tool called MSI utility can be used. Make sure to run it as administrator.


    - Change the windows system timer resolution :

    https://vvvv.org/contribution/windows-system-timer-tool

    Use the tool and change it to 1ms. Again this is way too complicated to explain, I don’t get it myself but it works wonders and has no negative effects. I had managed to get my latency down but I was still getting regular spikes. This is what sealed the deal.


    By using all of the little tips and tricks above, I finally managed to get my latency down to a normal level. If some of you have other tips and tricks to improve DPC latency, please add them below !

    I can definitely see the difference. I couldn’t play most Kontakt libraries in an empty project at 128 samples. Now most instruments will play fine at 64 samples (on their own). Also the random crackles in windows, youtube etc. disappeared.

    I hope this helps someone.

    Cheers !
     
    • Like Like x 3
    • Winner Winner x 1
    • List
  2.  
  3. Xupito

    Xupito Audiosexual

    Joined:
    Jan 21, 2012
    Messages:
    6,986
    Likes Received:
    3,860
    Location:
    Europe
    Great work. Your guide looks a lot like an OClocker's.
    But I didn't know about some points, the second part mostly.
     
Loading...
Similar Threads - Latency Guide Possible Forum Date
Steinberg Built-In ASIO Driver VS Generic Lower Latency ASIO Driver Software Mar 16, 2024
Manage latency on big projects Live Mar 15, 2024
Need advice about new audio interface to lower midi latency Soundgear Feb 25, 2024
Strange amount of latency FL Studio Edison Software Feb 13, 2024
ableton live auto mode latency Live Nov 11, 2023
Loading...