REGISTRY TWEAKS

REGISTRY TWEAKS

Inspired by Gaming Tweaks article made by Philip from speedguide.net 


Everybody should know this article by now, you should read it if you haven't. I would like to expand on that a bit & maybe fill a few gaps.


 Many people question if this section even works because they don't see any difference. Microsoft said it leaves them for future use, so many don't respond. I see it as a potential improvement, not mandatory tweaks. That driver is not used all the time. It should help when streaming or watching a video while downloading something. In general Audio & Video streaming.


In order these tweaks to work Multimedia Class Scheduler" service (MMCSS) has to be enabled & running. It automatically turns on/off based on Audio detection.

This is what Microsoft has to say on the topic, but it's not much:
There are more tweaks we can do here & potentially room for improvement. 

Here SystemResponsiveness means how many % are not used (saved) for low-priority/background tasks. It's 20% by Default. The values which can't be divided by 10 are rounded up to the nearest multiple of 10. A value of 0 is treated as 10, 1 is also 10 etc. That could change in the future. Bitsum has a Multimedia Scheduler Configuration tool that has all the %, including below 10 so I guess they also expect that, or they know something that's not included in the sources. NetworkThrottlingIndex determines how much % of the connection stays "in reserve" in certain media-related scenarios.

I've seen these in old Win7 or 8 versions. I use NoLazyMode along with NetworkThrottling & SystemResponsiveness of course.  I think this is a power-saving feature & hoping to override the driver but this is just an assumption..

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile]
"AlwaysOn"=dword:00000001
"NetworkThrottlingIndex"=dword:ffffffff
"SystemResponsiveness"=dword:00000000
"NoLazyMode"=dword:00000001


One more here which I don't use -IdleDetectionCycles , another power-saving feature. AlwaysOn will override the auto-detection & be enabled all the time.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks]


In Audio everything is default except "Affinity"=dword:00000007 which is set to use 2 cores instead 4 (4 core CPU). In theory, this should free some CPU resources. 0 & ffffffff doesnt change Affinity.


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Audio]
"Affinity"=dword:00000007
"Background Only"="True"
"Clock Rate"=dword:00002710
"GPU Priority"=dword:00000008
"Priority"=dword:00000006
"Scheduling Category"="Medium"
"SFIO Priority"="Normal"


There is one undocumented setting here. In early versions of Windows 10 (and in Win 8 too if I'm not mistaken) this Key was called "Low Latency" not "DisplayPostProcessing" & there was a String called "Latency Sensitive" in it. This key is related to picture processing. 

I set IO Priority to High. I use this in Games as well (adding Latency Sensitive is completely my own doing, its not in any Windows version or document), in case Windows still recognizes this string, since both keys need reduced latency. In this example I've raised the priority a bit (the highest is 30), just keep the same distance b/w the Priorities. Might help with responsiveness.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\DisplayPostProcessing]
"Affinity"=dword:00000000
"Background Only"="True"
"BackgroundPriority"=dword:00000018
"Clock Rate"=dword:00002710
"GPU Priority"=dword:00000012
"Priority"=dword:00000008
"Scheduling Category"="High"
"SFIO Priority"="High"
"Latency Sensitive"="True"


There is not much I can add here. DisplayPostProcessing & Games have to have the highest priority but DisplayPostProcessing should be slightly higher or the same. When Scheduling Category is High, CPU Priority is treated as 2 no matter what value you set. At least that was the case in Windows Server 2016 (or it was 2013). There is almost no information for Windows 10 on the topic & it could not have this limitation any more but that's just an assumption. 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games]
"Affinity"=dword:00000000
"Background Only"="False"
"Clock Rate"=dword:00002710
"GPU Priority"=dword:00000012
"Priority"=dword:00000006
"Scheduling Category"="High"
"SFIO Priority"="High"
"Latency Sensitive"="True"

****************************************************************************************************

 Nagle's Algorithm Tweak


First of all I dont think this works any more. I see people recommend this tweak but don't even mention MSMQ\Parameters, or the other way around. This tweak was very popular when Windows 8 came out. But it helps in only a few games. Most FPS shooters use UDP protocol, not TCP so it's irrelevant. It helps with World Of Warcraft for example where it uses TCP as a primary protocol to transfer data. That's what Leatrix Latency Fix does btw. I see so many players use this and swear it helps them in BF4 or CS:GO. This is placebo effect.

If you still want to use it use TCP Optimizer or these commands, you don't need to search for your NIC in the Registry.

Reg.exe add "HKLM\SOFTWARE\Microsoft\MSMQ\Parameters" /v "TCPNoDelay" /t REG_DWORD /d "1" /f
for /f %%i in ('wmic path win32_networkadapter get GUID ^| findstr "{"') do REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%i" /v TcpAckFrequency /t REG_DWORD /d 0000001 /f
for /f %%i in ('wmic path win32_networkadapter get GUID ^| findstr "{"') do REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%i" /v TcpDelAckTicks /t REG_DWORD /d 0000000 /f
for /f %%i in ('wmic path win32_networkadapter get GUID ^| findstr "{"') do REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%i" /v TCPNoDelay /t REG_DWORD /d 0000001 /f


It will look like this in the Registry:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{Your NIC's GUID}]
"TcpAckFrequency"=dword:00000001
"TcpDelAckTicks"=dword:00000000
"TCPNoDelay"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters]
"TCPNoDelay"=dword:00000001

****************************************************************************************************
TCPIP


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"EnableICMPRedirect"=dword:00000001
"EnablePMTUDiscovery"=dword:00000001
"Tcp1323Opts"=dword:00000000
"GlobalMaxTcpWindowSize"=dword:000016d0
"TcpWindowSize"=dword:000016d0
"MaxConnectionsPerServer"=dword:00000000
"MaxUserPort"=dword:0000fffe
"TcpTimedWaitDelay"=dword:00000020
"EnablePMTUBHDetect"=dword:00000000
"DisableTaskOffload"=dword:00000000
"DefaultTTL"=dword:00000040
"SackOpts"=dword:00000000
"TcpMaxDupAcks"=dword:00000002

TcpWindowSize is autotuning on Windows 8+, that's handled by the driver automatically.

Optional:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Winsock]
"UseDelayedAcceptance"=dword:00000000
"MaxSockAddrLength"=dword:00000010
"MinSockAddrLength"=dword:00000010

****************************************************************************************************

IRQL Priority
This is more for information that anything else.It can be useful in old Win7 & Win8

First I want to clarify that this is my understanding of how this shit works and I could be wrong about something. If someone has more knowledge than me Im happy to be corrected.
So whats that thing IRQL Priority and how to set it manually. IRQ = Requests = Interupts. IRQL - Interrupt Request Level. This is a way of Windows to prioritizes the CPU Requests. The faster these interupts the lower the latency. 

The interrupt controller (which as my understanding is medium between the drivers & the CPU in this case although its much more than that. It handles all hardware interrupts as well) sends IRQs to the CPU with certain priority. That priority can be manually increased or lowered, depending what you want. 

Type msinfo32.exe in RUN or Search (or sys in search) and System Information tool will start. You can find IRQs on Hardware Resources>IRQs. IRQ8 is always the same System CMOS/real time clock or on newer platforms is IRQ0 (SystemTimer), it doesn't chages. The other IRQs change so you have to find the drivers IRQ number you want to increase (or decrease). Driver has the be IRQ lane-based, not MSI which is a newer and faster way of communication between the drivers and the CPU. If you set an MSI based driver with IRQL priority it will be overridden by the driver. You can use MSI mode Utility to set these drivers but know that it will work only if the driver is supporting it & dont change the setting on its own. Drivers have priority over Registry.




You will see the IRQs numbers change when you set a driver in MSI Utility. So they are related to each-other. This method could be obsolete with modern systems & Windows versions but I decided to share it anyway. Its useful in older systems (and Win7 & Win8 & respective devices) where you can increase the priority to your drivers but don't use it on GPU or Internet Adapter, only if they are really old. Modern GPUs & NICs use MSI or preferably MSI-mode. Nvidia start enabling MSI-X Mode in RTX3000, before that you have to enable it manually with MSI tool or registry which I wont show here today.

Here is a registry example for IRQ lane-based:

****************************************************************************************************
Example:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\PriorityControl]
"Win32PrioritySeparation"=dword:00000026
"IRQ4294967286Priority"=dword:00000002
"IRQ4294967287Priority"=dword:00000003
"IRQ8Priority"=dword:00000001
or
"IRQ0Priority"=dword:00000001

https://forums.guru3d.com/threads/windows-line-based-vs-message-signaled-based-interrupts.378044/


****************************************************************************************************

I never get to test with them properly. My assumption when briefly played with the registry on Desktop was if someone spends enough time tweaking, it could have the potential to help Controller & Mouse in a game because on certain settings the cursor gravitated or locked on the closest object, like icon, explorer window or program. Most likely is just settings to help laptop users on a trackpad & wont work in games. These are the default settings. Feel free to test.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Input\Settings\ControllerProcessor\CursorMagnetism]
"AttractionRectInsetInDIPS"=dword:00000005
"DistanceThresholdInDIPS"=dword:00000028
"MagnetismDelayInMilliseconds"=dword:00000032
"MagnetismUpdateIntervalInMilliseconds"=dword:00000010
"VelocityInDIPSPerSecond"=dword:00000168

Next to it there is another Key with 3 settings but I left only the most usable. Its a tiny difference anyway. One of those that goes into placebo territory but it works. How useful its for you ... well. I set it to 1 so my cursor refreshes faster.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Input\Settings\ControllerProcessor\CursorSpeed]
"CursorUpdateInterval"=dword:00000001

IoPageLockLimit. This limits the use of RAM for certain tasks (in I/O situations-input/output). It can help with big programs start times and general disk work. It can speed up everything that includes transferring larger files, including over the internet (if u have your own network for ex.). The values has to be up to your RAM capacity (slightly less than that for x86. For 512mb & larger is -64mb to be exact). Setting it to 0 will force the system to check on every boot how much RAM is installed and set it accordingly. The problem is that its Microsoft & can set too low values. The values are in bytes btw (in Decimal). There is a formula for this.  

(Your RAM in GB x 1024) Then multiply it to 1024 again. Then multiply to 128

08000000 is for 8Gb RAM. 10000000 is 16Gb (Hex)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"IoPageLockLimit"=dword:08000000



to be continued............




If You Learned Something & Want to Support My Work Please Consider Donating Or Becoming a Patreon.