views:

58

answers:

3

Hi, I was wondering if it would be possible to run app not at 100% of the cpu but at a specific amount of the cpus. I see different usage of this ,

  • we can better balance concurrent application ( we may want to have balance app 50% to have fair apps/agent/... )
  • i was also wondering if the power consumption would not be better if the cpus doesnt run at full throttle but at some lower level( say 80% )

What are your thoughts Thx examples are welcomed :)

+1  A: 

You can readily do this. Go to your BIOS and lower the frequency to the desired percent and while you are there, you may be able to lower the Vcore voltage of your CPU as well.
Core Parking* seems to be already there in Windows 7 and Windows Server 2008 R2. To quote:

"Core parking is a new feature that dynamically selects a set of processors that should stay idle and not run any threads based on the current power policy and their recent utilization. The scheduler will attempt to honor this selection when it decides on which processors to run threads, allowing the parked cores to enter deep idle states where they consume very little power."

(If, one wants a scheduler that achieves lower peak temperatures for processing cores, it has been done as well, for Linux. )

*It seems like there is a patent as well: Power-aware thread scheduling and dynamic use of processors

andras
+1  A: 

The power consumption can be made worse by not running the CPUs at full throttle, if they otherwise already throttle themselves. Many CPUs nowadays support downclocking based on load, to the point that they use almost no power if they're allowed to sleep. The best strategy for getting to sleep quickly is to get whatever work is necessary done as quickly as possible. If you artificially throttle to 80%, then your CPU is awake longer, which will eat the power savings you get from running at a lower clock speed. On the other hand, if you know the CPU will be busy all the time no matter what, then it'll never get put to sleep anyway.

Joseph Garvin
+1  A: 

This job belongs to the operating system, not the application.

Some operating systems support segmentation or control groups, or zones or containers. Whatever they call them, they allow placing limits on an application's use of resources.

Zan Lynx