Windows' Built-In Process Limiter

Some processes in Windows can hog your CPU, whereas you want them to run in the background. I.e. C++ linker (cl.exe) or MS Teams (which is known to be particularly bad on all the resources).

I used to use specialised software like Process Tamer (which is awesome) to downgrade CPU priority for those until I found a hidden registry key in Windows to limit that. The corresponding .reg file to say limit Teams.exe process is:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Teams.exe]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Teams.exe\PerfOptions]
"CpuPriorityClass"=dword:00000001
"IoPriority"=dword:00000000

I can’t find any documentation on this feature, other than it being mentioned in Windows Internals book but it works.

CPU Priority is a value 1-6:

Value Priority
1 Idle
2 Normal
3 High
4 Realtime
5 Below Normal
6 Above Normal

IO Priority:

Value Priority
0 Very Low
1 Low
2 Normal
3 High
4 Critical

There are two other options - PagePriority and WorkingSetLimitInKB which I don’t know what they do yet.

Have a question⁉ Contact me.