It’s not uncommon to notice one single program or service eating up all the CPU resources and slowing down the overall system performance.
As annoying as it can be, you can easily limit the CPU usage for a single process on your computer.
Let’s go through this article as I have discussed the concise methods to do so.
How to Limit the CPU Usage of a Single Program
To limit the CPU usage for a specific program on Windows PC, press Ctrl+Shift+Esc to open the task manager & click on the Details tab. Right-click on the process you want to set the limit & select Set affinity. Now uncheck the CPU core boxes that you don’t want the process to use.
Unfortunately for Linux folks, it’s not that simple.
Additionally, there are some alternate ways for the Windows platform to limit the processor utilization of a single program. Below I have thoroughly discussed all the precise methods to achieve this goal for both Windows and Linux PC users.
But before we begin, identify which process is eating up all the CPU resources. If you’re wondering how to identify a process that is causing high CPU usage, simply check the usage of the CPU from your PC. It’ll sort the processes according to their CPU usage.
After identifying the CPU hogging process, follow these methods to limit its resource usage.
Limit CPU Usage for a Process on Windows 10/11
Windows 10 or 11 users can control how much a certain program or service can utilize CPU resources. There are two methods to do so, both of which involve using the Task Manager.
Here’s how to limit CPU usage for a specific program in Windows 10/11:
Method 1: Set Affinity
- Right-click on an empty space on the taskbar and select Task Manager.
- Go to the Details tab.
- Scroll down and find the process whose affinity you want to alter.
- Right-click on the process and select Set affinity from the context menu.
- Uncheck the CPU core boxes you don’t want the process to use.
- Click OK.
To learn more about the setting processor affinity on Linux, you can go through the article. Also, there are other methods, and I’ve provided them below.
Method 2: Set Priority
- Press Ctrl+Shift+Esc to launch Task Manager.
- Navigate to the Details tab.
- Right-click on your desired process and select Set priority.
- Choose the Low option.
Keep in mind, the configured affinity and priority for a program/service will reset every time you close or restart the said program/service. You’ll need to re-configure the affinity and priority again by following the same steps.
If it seems inconvenient, you can follow other methods to fix the high CPU usage issue for the whole system rather than for specific programs.
You can also use a third-party program called BES to permanently limit the CPU usage of a program in Windows 11 or Windows 10. But it’s a bit complicated and not everyone will be comfortable with installing a third-party app on their PC. So just stick with the vanilla methods.
Limit CPU Usage of a Process in Linux
Throttling a program on Linux requires a bit more work than on Windows. You need to use the cpulimit utility to limit the processor utilization of a specific program.
If you want to limit a PID 81550 process to use only 49% CPU, input the following command: sudo cpulimit -p 81550 –limit 49
It’ll limit the processor usage of the said process to 49% as long as the cpulimit utility is running. Because what I found from using this utility is that if I close the cpulimit, the CPU utilization of the aforementioned process goes back to normal.
As a workaround, I ran the cpulimit in the background by using the –background or -b flag. But in case the –background doesn’t work for you, use an Ampersand(&) after the command to send it to the background.
So, to properly limit the CPU usage of a process with a supposed PID 81550 on Linux, input the following command: sudo cpulimit -p 81550 –limit 49 &
As you can see, the processor utilization of the said process is now at 48.8%.
Frequently Asked Questions
How to limit CPU usage in Android?
Unfortunately, there is no way to limit CPU usage manually in Android smartphones. But you can try alternate methods, such as turning on the battery saver, which will effectively reduce the overall CPU usage.
Is 100% CPU usage harmful?
100% CPU usage for a prolonged period can potentially overheat your computer if you don’t have proper cooling. Additionally, high processor utilization, even when you’re not doing anything CPU-intensive, calls for caution.
Should I limit CPU Usage for video games?
Video games, especially demanding AAA titles, require all the available hardware resources to run properly. So you shouldn’t limit the CPU usage for any games as it might cause reduced framerate and laggy gameplay.
Wrapping up
It’s really infuriating when your PC starts to lag due to unnecessary high CPU usage by a particular app or service. Fortunately, you can easily limit the processor utilization for such annoying processes by simply following this guide.
If you have any questions on this topic, feel free to ask them in the comments below.
Have a nice day!