Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Is there a way to force a specific program to use less than 100% processor time even when the CPU would be idle otherwise?

Using process priority, we can adjust how much resources a given program consumes in relation to other programs.
If the process priority of a program is set to 'below normal', the program will consume less CPU time while other programs require those resources.

However when the the processor is otherwise idle, a program may utilize the CPU at 100% regardless of its process priority; thus increasing power consumption and heat.

I would like to reduce the cpu use of certain programs under these circumstances, depending on whether these programs currently have focus.

For example I would like to force Firefox to use at most 1% of the CPU whenever it has lost focus for more than 1 minute.

Is there any way to do that?

(There may be specific solutions to find and unload resource intensive tabs in Firefox, but I am mainly looking for a general solution that works for all programs)

share|improve this question

marked as duplicate by Dave, Ƭᴇcʜιᴇ007, Tog, Kevin Panko, Jeff F. Mar 3 '14 at 16:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I suspect this would often increase the energy consumption. Most CPUs save some power by shutting down idle parts of the chip, but not nearly proportionally. It's more efficient to utilise all available ticks and underclock the processor instead. Modern CPUs already do that. I'd like to support this theory with some real-world data though, so if anyone has an answer, I would be very interested. – Marcks Thomas Feb 24 '14 at 14:20
@and31415 Thanks! Some good hints there, though unfortunately the only suggestion that in the end seems applicable to my own problem appears to be Battle Encoder Shirase, which as Malt already said does not support limiting based on focus. – HugoRune Feb 24 '14 at 15:26
@MarcksThomas If the program is using the CPU to reach some end result, the overall power consumption will probably not decrease if I force it to work slower. However if the program is doing an endless chore like graphical animations or some sort sort of busy wait loop, more processor time will not cause the program to finish quicker, so forcefully reducing its cpu usage will have a big additional gain in addition to underclocking the cpu. – HugoRune Feb 24 '14 at 15:30

This application can limit the cpu usage of specific processes. Although it limits the CPU consumption constantly, regardless of whether the application has focus.

Alternatively, you can try setting firefox's affinity in the task manager. This way you can make it use only specific cores of the cpu. If you have eight cores, limiting it to a single core will cap the usage at 12.5%.

share|improve this answer
What is this? Can you please edit your question and give an explanation of what the link is doing/about.. You may also want to state it's for Windows 2000 / XP – Dave Feb 24 '14 at 14:41
Thanks, I tried Battle Encoder Shirase. Unfortunately it does not appear to work: I limited Firefox to 1% CPU, then started the sunspider benchmark. With limiting enabled, CPU usage rose to ~20%; without limiting to 25% (one full core). So BES had only some very slight effect. I did all tests on 32bit XP. – HugoRune Feb 24 '14 at 17:05
Strange, I remember using it a while back and it worked just fine. Try setting a more realistic cpu limit, say 10%-15%? Also, how are you measuring the cpu usage? – Malt Feb 24 '14 at 18:36
It may be some incompatibility with my system. I tried again with Prime95 as the target, and I was not able to reduce its cpu usage below 80%, no matter which percentage I selected. I am measuring cpu usage with Sysinternal process explorer as well as the windows task manager. – HugoRune Feb 25 '14 at 14:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.