Are there solutions that can limit the CPU usage of a process?

74

30

I am using an old laptop and doing heavy processing that needs high CPU usage for a long time (~30mins - 2hours). When the process puts heavy load on CPU for a long time, CPU overheats and computer shuts down. I don't want to use a cooler/stand because I am carrying this laptop around and working outside home.

Is there a way/application that I can limit CPU usage of a process in Windows?

Note: Setting the priority of the process from task manager does not work.

Note 2: Fans are clean.

nimcap

Posted 2010-11-24T12:35:06.813

Reputation: 1 366

6Is renting out 3 hours of CPU time on EC2 not feasible? I would imagine that would work a lot better for most cases. – digitxp – 2010-11-24T12:55:52.263

can you specify which Windows version, and which old laptop? If there's a dual core inside, you can just specify the application to run on only one core, which keeps it at 50% and hence cooler temps. – Joris Meys – 2010-11-24T13:07:32.260

4@digitxp: I am PhD student at the moment, if it was for business purposes, I would have bought a new laptop or used a powerful desktop machine anyway :) – nimcap – 2010-11-24T13:28:03.503

Answers

67

A search over the net brings some programs that may help. They are all freeware.

BES - Battle Encoder Shirase

BES is a small tool which limits the CPU usage for a specified process: for instance, you can limit the CPU usage of a process which would use CPU 100%, down to 50% (or any percentage you like). With this, you can use other programs comfortably while doing something CPU-intensive in the background. By limiting the CPU load, you can also cool down your CPU immediately when it happens to get too hot. Of course the processing speed will slow down proportionally if you limit the CPU usage, but it should be much better than crashing because of heat or (in the worst scenario) having your computer broken with a burned CPU.

Process Tamer

Process Tamer is a tiny (140k) and super efficient utility for Microsoft Windows XP/2K/NT/Vista/Win7 that runs in your system tray and constantly monitors the cpu usage of other processes. When it sees a process that is overloading your cpu, it reduces the priority of that process temporarily, until its cpu usage returns to a reasonable level.

Process Lasso

Process Lasso is a unique new technology that will improve your PC's responsiveness and stability during periods of high CPU load. Windows, by design, allows programs to monopolize your CPU without restraint -- leading to freezes, hangs, and micro-lags. Process Lasso's ProBalance (Process Balance) technology intelligently adjusts the priorities of running programs so that badly behaved processes won't negatively impact the responsiveness of your PC.

Mehper C. Palavuzlar

Posted 2010-11-24T12:35:06.813

Reputation: 51 093

From BES web page: "yes, BES is a tool that periodically makes the target sleep for a very short time". – mtone – 2015-04-28T23:55:54.777

a tiny (140k) o_O 140K is tiny?! – Ruslan – 2016-01-13T10:32:34.683

@Ruslan: It's 140 kilobytes. – Mehper C. Palavuzlar – 2016-01-16T12:09:10.857

@MehperC.Palavuzlar yeah, and in my mind 140 kilobytes is really large for an executable. 8 kilobytes is tiny, not 140. – Ruslan – 2016-01-16T12:10:48.367

@Ruslan: Am I missing something here? I have downloaded thousands of applications so far and I have never seen an app of 8KB size. They are mostly at least in MBs. Compared to lots of other applications, a 140 KB app (not just an executable; the entire program) is quite small. Do you agree? – Mehper C. Palavuzlar – 2016-01-18T15:17:19.153

Does BES work by suspending and resuming a process temporarily? Years ago, I used a tool called process.exe by Beyond Logic that let you suspend/resume a process. BES seems like it does something similar but in an automated and configurable way... http://retired.beyondlogic.org/solutions/processutil/processutil.htm

– Sun – 2017-09-18T15:53:37.247

The problem with using suspend/resume cycles is that it is a very unnatural operation and may cause unintended effects. Further, the same amount of code has to be executed, whether now or later. – dyasta – 2018-05-03T22:05:05.967

10of the three BES looks like the best bet. the other two use priority values which didn't work according to the question – RobotHumans – 2010-11-24T13:16:32.690

4BES is my choice. It is lightweight and does what it us supposed to do. – nimcap – 2010-11-24T14:15:50.917

1BES is unable to limit Windows Live Mesh (MOE.exe); it continues to use 95% regardless of any settings. The others can't possibly help because it's already set to Idle priority. Makes the whole OS very slow anyway. – RomanSt – 2012-07-07T12:58:05.790

Right. The BES is the unique performing a % cpu limiter. Why is on the 3rd position?? :( – m3nda – 2013-11-21T08:05:21.787

16

The easiest solution I found is to limit Processor power.

  1. Go to Control Panel.
  2. Hardware and sound
  3. Power options
  4. Edit plan settings
  5. Change advanced power settings
  6. Processor power management
  7. Maximum processor state and lower it to 80% or whatever you want. Using software that measure CPU temperatures like 'Speed fan' you will see that temperatures drop.

Zeppi Ta Leli II

Posted 2010-11-24T12:35:06.813

Reputation: 161

1You can also adjust cooling policy there passive mode may help – CrandellWS – 2016-03-23T00:12:22.893

I don't have those options, in "Power Options">"Advanced settings" I have: Desktop background settings; Sleep; Power buttons and lid; Display; Battery. Neither inside those categories I have something to manage the CPU usage. – polkduran – 2019-11-08T15:19:03.207

13

Sure this is an old question but I'm surprised nobody has suggested this yet:

Reduce your CPU speed.

Practically all laptops and Windows itself have built in mechanisms for dynamically adjusting processor speed to match load. You can override this behaviour - for example in Control Panel => Power Options => Advanced, you can set a maximum processor speed that's below 100%. Your processor will then be limited to a lower speed, and thus generate less heat, nomatter what you're doing.

This requires no additional software and more importantly, reducing your CPU speed makes your processor more efficient, so is a better solution than limiting your CPU usage in Windows. Using 50% of a processor at 2.0Ghz will use considerably more power than 100% of a processor at 1.0Ghz. Less power = less heat.

qasdfdsaq

Posted 2010-11-24T12:35:06.813

Reputation: 5 762

5

I wanted to add the application that i've used in the past to successfully limit the CPU utilization. I've used threadmaster several times in the past.

http://threadmaster.tripod.com/

John

Posted 2010-11-24T12:35:06.813

Reputation: 151

5

In Windows 10, 8 and 7:

  1. Go to Task Manager.
  2. Right-click the process for which CPU usage is to be limited. Click Go to details.
  3. Now, the detail tab will appear. Right-click the particular process, choose set affinity, and choose the cores which you will allow the particular process to use.

sebine francis

Posted 2010-11-24T12:35:06.813

Reputation: 59

1In Windows 7, right-clicking a process in task manager brings up a context menu and one of the options is "Set affinity" which works as you describe. – David Richerby – 2015-08-06T10:44:04.533

The process I want to limit CPU usage is grayed out. The Go to details is grayed out. – Santosh Kumar – 2018-03-08T13:13:07.330

3

Another very convenient way to set the affinity of a certain executable when it launches is to use the start command.

e.g. "start /affinity F iexplore.exe". If there is a single application that you want to start thus throttled, you could create a shortcut with this command. Note that the affinity is set by a hexadecimal value, which may require some trial and error. Check the process in task manager to view the actual affinity outcome!

See more here: http://blogs.msdn.com/b/santhoshonline/archive/2011/11/24/how-to-launch-a-process-with-cpu-affinity-set.aspx

HPHP

Posted 2010-11-24T12:35:06.813

Reputation: 31

3

Instead of downloading a program to do that, if you go to task manager and go to details you will see a list of the processes you are running. If you right click and use the "set affinity" option instead of "set priority" you can select how many cores are being used by an individual program hence limiting the amount a CPU usage by the program.

GimmeMyGold

Posted 2010-11-24T12:35:06.813

Reputation: 31

1Most programs are single-threaded, so setting the affinity to 1 core won't help you at all. (Single-threaded programs can only use a single cpu core, and weren't using more than one core in the first place.) – CausingUnderflowsEverywhere – 2017-05-10T18:17:27.793

2

These days, the best solution is to limit per-process CPU use by limiting the CPU affinity (cores the process has access to). You have less precision (can only limit to certain percentages), but this is a more natural operation than trying to periodically suspend and resume process threads. Process Lasso does a fine job with default (persistent) CPU affinities. However, it also has 'hard' BES style limitation, though that's not recommended since it's such an unnatural act.

dyasta

Posted 2010-11-24T12:35:06.813

Reputation: 288

1

Underclocking the CPU will let you achieve slower CPU speeds, lowering the heat produced. You may need advanced experience if your motherboard or CPU does not have a means of modifying clock speed using a downloadable program. (Search for overclock utilities for your CPU or motherboard (from your CPU and motherboard manufacturer only), just note you will be interested in underclocking.)

In the case there are no utilities avaialble, you will have you enter your computer's BIOS and modify the clock speed of your processor. The easiest way is by setting the multiplier to a lower number. Please don't touch voltages because this can damage your CPU if it's too high, or cause errors when it's too low. Frequencies shouldn't be modified either, just the multiplier. To return to default settings, read your BIOS manual to determine the key to press to restore default settings. (Or just inspect the BIOS screen carefully, especially the exit screen.)

CausingUnderflowsEverywhere

Posted 2010-11-24T12:35:06.813

Reputation: 283