How to configure cpudynd

From ThinkWiki
Jump to: navigation, search
NOTE!
See the Dynamic Frequency Scaling HOWTO on how to avoid using cpu frequency scaling daemons by using the kernel builtin ondemand governor.

If you decide not to use the ACPI throttling functionality (as you certainly will on simple SpeedStep models like all T2x), cpudynd will work by changing the kernels frequency scaling governors: it will load the powersave governor by default and exchange it against the performance governor if the CPU load exceeds a certain level. Therefore, you have to make sure that those two governors can be used by the kernel, i.e. their modules (cpufreq_performance and cpufreq_powersave) are loaded properly.

NOTE!
There is a "bug" in cpudynd 1.0.1: The interval which is passed with the -i parameter is handled as deciseconds instead of seconds, which causes unnecessary wakeups of the cpu. Use the -ms parameter with the value in milliseconds as a workarouond for this.

In Debian, all you have to do is:

# apt-get install cpudyn

In most cases it will work out of the box.

This is the default Debian config, but works well out of the box:

# Cpudyn configure options

################################################
# COMMON OPTIONS
################################################
#
# Internal between idle ratio tests in 1/10 sec increments
#
INTERVAL=1

################################################
# CPUFREQ OPTIONS
################################################
#
# CPU idle work ratio to speed up
#
CPU_UP=0.5

#
# CPU idle work ratio to speed down
#
CPU_DOWN=0.9

#
# when using cputhrottling, what state to switch when speeding down
#
THROTTLING_LOW=7

################################################
# DISK OPTIONS
# (disabled by default)
################################################
#
# Timeout to put the disk in standby mode if there was no
# io during that period (in seconds)
#
#TIMEOUT=120

#
# Specified disks to spindown (comma separated devices)
#
# DISKS=/dev/hda,/dev/hdb

################################################
# EXTRA OPTIONS
################################################

# Available options are
# -acpi disables cpufreq and force the use of acpi
# -asus enables asus_acpi in some laptops
# -nice count also nice CPU usage as load as well
# -minf value Set the minimum CPU frequency in a value between 0.0 and 1.0
#
# EXTRA_OPTIONS=""