Although elegant, this software is actually obsolete. One can achieve the same effect with the
cpufreq-ondemand kernel module and adjusting the ondemand governor's threshold. See CPU Frequency Scaling for more information.
- One, simple heuristic to determine CPU load: "user + sys" time.
- Ignore "niced" programs (setiathome, itself, etc). In my mind this is consistent with what is meant when someone 'nice's a program to begin with. (configurable in v0.85+)
- Designed for CPU's that support more then two speed states, but works well with anything.
- Very fast, low overhead /proc/stat gathering (method stolen from procps).
- Supports SMP
- Will automatically switch to 'userspace' governor.
- Care taken to make the code non-root exploitable (but please audit for yourself first!)
- Frequency step size is configurable (default to 100MHz/step)
- 4 different behavioral modes to choose from (SINE, AGGRESSIVE, PASSIVE, LEAPS), which determine the behavior when the load changes. Configurable from the command line.
- Written in C for speed and simplicity.
- Logging to stdout or syslog
- Configurable Polling frequency in milliseconds (defaults to 1s)
- Configurable highwater/lowwater marks for CPU usage. (defaults 80/20%)
In order for frequency scaling to work properly, you will need to load the appropriate frequency driver for your processor as well as the cpufreq-userspace governor. See CPU Frequency Scaling.
Installation of Powernowd
This package is available in the AUR: AUR_User_Guidelines at your leisure as there are a wealth of great software there for you, and building the package on your machine is trivial. Install 'powernowd', then start the daemon:AUR. If you haven't used the AUR before, you may want to check out
# /etc/rc.d/powernowd start
To have it automatically load at startup, add powernowd to your
DAEMONS array in
DAEMONS=( ... powernowd ... )
The only configuration you need is to set the highwater/lowwater marks for CPU usage. Basically this means when the CPU usage is >=highwater mark, then powernowd will use your highest CPU multiplier (i.e. full power); when the CPU usage <=lowwater mark, then powernowd will use your lowest CPU multiplier. The defaults are 80/20% but I find that adjusting them down gives me a more responsive system. I use 15/5% for example. To do so edit your
/etc/conf.d/powernowd inserting the following line:
OPTIONS="-q -u 15 -l 5"
Restart the daemon and enjoy
# /etc/rc.d/powernowd restart
There are other options you can set such as modes of operation (sine, passive, aggressive, leaps), polling frequency, number of threads per core, etc. To see what is available, invoke powernowd with the -h switch
$ powernowd -h PowerNow Daemon v1.00, (c) 2003-2008 John Clemens Daemon to control the speed and voltage of cpus. This is a simple client to the CPUFreq driver, and uses linux kernel v2.5+ sysfs interface. You need a supported cpu, and a kernel that supports sysfs to run this daemon. Available Options: -h Print this help message -d Don't detach from terminal (default is to detach and run in the background) -v Increase output verbosity, can be used more than once. -q Quiet mode, only emergency output. -n Include 'nice'd processes in calculations -m # Modes of operation, can be 0, 1, 2, or 3: 0 = SINE, 1 = AGGRESSIVE (default), 2 = PASSIVE, 3 = LEAPS -s # Frequency step in kHz (default = 100000) -p # Polling frequency in msecs (default = 1000) -c # Specify number of threads per power-managed core -u # CPU usage upper limit percentage [0 .. 100, default 80] -l # CPU usage lower limit percentage [0 .. 100, default 20]