[ltp] Duty Cycle program

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Fri, 21 Dec 2007 16:00:07 -0200


On Thu, 20 Dec 2007, Jeffrey Taylor wrote:
> Does anyone know of a program like nice, but sets the duty cycle (e.g. 50% = 1
> time slice on, one time slice off) for a program.  Long running programs,

There is no such a thing for processes, but you *can* to it for the
processor as a whole.  The ACPI "T" states do it, and work for thermal
management (but they don't really conserve energy in the long run.  Things
will just run cooler, and slower).

You can also use governors to run the cpu slower, which is likely to work
much better than ACPI T states.

But you might find out that running the CPU in ondemand mode, letting it go
into C3 as often as possible ends up keeping it coller than lowering the
maximum frequency.  If that happens, there's nothing you can do, short of
writing something that sends the "STOP" signal and "CONT" signal to the
processes you want to control the duty-cycle of.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh