Limiting the permissible level of consumption can free up resources for something you truly need. And the "glutton" can make do with what it's allotted, simply performing its tasks a bit slower.
As known, applications on Windows often tend to consume too many PC resources, which isn't always convenient or truly necessary. By limiting the permissible level of consumption, you can free up resources for something you truly need. And the "glutton" can get by with what it's allotted, simply performing its tasks a bit slower.
How to do it
To address this issue, you can use the Process Governor utility, which allows you to limit memory, CPU, or execution time consumption for specific processes via the command line. Task Objects are used to apply these limitations.
To apply limitations, you need to execute one of the supported commands in the command line as an administrator.
![](https://blog.themarfa.name/content/images/2024/04/CleanShot-2024-04-19-at-10.28.45@2x.png)
Examples of commands and their actions
- Setting limits on a process using ProcGov:
Command:procgov32 --maxmem 40M --pid 1234
Action: Sets a limit on memory usage for the process with ID 1234 to 40 megabytes. - Launching a new process with limitations:
Command:procgov32 --maxmem 40M c:\temp\test.exe
Action: Launches a new process test.exe with a memory limit of 40 megabytes. - Setting up ProcGov for automatic startup when a process starts:
Command:procgov64 --install --maxmem 40M test.exe
Action: Sets up ProcGov to always run before the specified process test.exe and limit its memory to 40 megabytes. - Setting limits on multiple processes:
Command:procgov64 --maxmem 100M --pid 1234,1235,1236
Action: Applies the same memory usage limitations to processes with IDs 1234, 1235, and 1236. - Updating already set limitations:
Command:procgov64 --nowait -c 4 -p 1234
Action: Updates already set CPU usage limitations for the process with ID 1234, setting a new limit of 4 cores.
These are just some examples of commands and their actions that can be performed using ProcGov to manage processes in Windows.