Available speed governors for Athlon64

  • Thread starter Thread starter General Schvantzkoph
  • Start date Start date
G

General Schvantzkoph

I have an Athlon 64 3800+/Nforce 3-250Ultra system running Fedora Core 3
with a custom 2.6.9 kernel. In the kernel configuration the performance,
userspace, powersave and ondemand performance governors have all been
selected however the
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
file lists only performance and userspace. I've tried to add powersave and
ondemand to the file but it reverts to just userspace performance. How do
I get the kernel to support powersave and ondemand. Ondemand seems like a
particularly useful power governor.
 
General said:
I have an Athlon 64 3800+/Nforce 3-250Ultra system running Fedora Core 3
with a custom 2.6.9 kernel. In the kernel configuration the performance,
userspace, powersave and ondemand performance governors have all been
selected however the
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
file lists only performance and userspace. I've tried to add powersave and
ondemand to the file but it reverts to just userspace performance. How do
I get the kernel to support powersave and ondemand. Ondemand seems like a
particularly useful power governor.

Did you build those governors as modules? The module names are
cpufreq_ondemand, cpufreq_powersave, cpufreq_userspace. Load the ones that
you're interested in and then try setting governor.

Luca
 
I have an Athlon 64 3800+/Nforce 3-250Ultra system running Fedora Core 3
with a custom 2.6.9 kernel. In the kernel configuration the performance,
userspace, powersave and ondemand performance governors have all been
selected however the
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors file
lists only performance and userspace. I've tried to add powersave and
ondemand to the file but it reverts to just userspace performance. How do
I get the kernel to support powersave and ondemand. Ondemand seems like a
particularly useful power governor.

userspace is all you need. it allows scaling from the lowest speed to the
highest. Performance is just the highest speed, and powersave is just the
lowest speed. There's really no need for them. If you use cpufreqd it uses
userspace. If you don't want to use atomatic scaling with cpufreqd, then
what I've done is create scripts for the different speeds.
[wes@wes2 wes]$ cd /usr/local/bin
[wes@wes2 bin]$ ls
cpuh* cpul* cpum* initpn*
[wes@wes2 bin]$ cat initpn
echo "userspace"> /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
[wes@wes2 bin]$ cat cpul
echo "800000"> /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
[wes@wes2 bin]$ cat cpum
echo "1800000"> /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
[wes@wes2 bin]$ cat cpuh
echo "2000000"> /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
[wes@wes2 bin]$

BTW, I don't know what ondemand is. It's not a valid governor here, but
I'm running a 2.6.8 kernel. maybe it's a new one. But powersave is
probably a module that needs to beloaded. It is here. Perhaps ondemand is
also. I don't know what ondemand would give you that userspace doesn't
unless it lets you set speeds and/or voltages other than the default. That
would be nice.
 
BTW, I don't know what ondemand is. It's not a valid governor here, but
I'm running a 2.6.8 kernel. maybe it's a new one. But powersave is
probably a module that needs to beloaded. It is here. Perhaps ondemand is
also. I don't know what ondemand would give you that userspace doesn't
unless it lets you set speeds and/or voltages other than the default. That
would be nice.

ondemand is in the 2.6.9 kernel, might be new there. Here is it's
definition from the kernel,

'ondemand' - This driver adds a dynamic cpufreq policy governor. The
governor does a periodic polling and changes frequency based on the CPU
utilization. The support for this governor depends on CPU capability to do
fast frequency switching (i.e, very low latency frequency transitions).

Assume that it's reliable this is the governor that you would want to use.
It allows the CPU to run cooler when it's not under load while still
delivering the maximum performance when it's needed.
 
ondemand is in the 2.6.9 kernel, might be new there. Here is it's
definition from the kernel,

'ondemand' - This driver adds a dynamic cpufreq policy governor. The
governor does a periodic polling and changes frequency based on the CPU
utilization. The support for this governor depends on CPU capability to do
fast frequency switching (i.e, very low latency frequency transitions).

Assume that it's reliable this is the governor that you would want to use.
It allows the CPU to run cooler when it's not under load while still
delivering the maximum performance when it's needed.

It appears to me that his is exactly what cpufreqd and userspace does now.
Maybe I'm missing something. Right now between 0-3% cpu usage the cpu runs
at 1.3v and 800MHz, between 3-80%, 1.4v and 1800MHz, and between 80-100%,
1.5v and 2000MHz (max speed). All this is configurable, and even allows
exceptions. For instance if I'm running a certain game that maxes out the
cpu, I've set it to only run at low speed. Oh well I'll upgrade kernels
one of these days and see.
 
O
It appears to me that his is exactly what cpufreqd and userspace does now.
Maybe I'm missing something. Right now between 0-3% cpu usage the cpu runs
at 1.3v and 800MHz, between 3-80%, 1.4v and 1800MHz, and between 80-100%,
1.5v and 2000MHz (max speed). All this is configurable, and even allows
exceptions. For instance if I'm running a certain game that maxes out the
cpu, I've set it to only run at low speed. Oh well I'll upgrade kernels
one of these days and see.

I thought userspace just allowed you to explicitly set the frequency by
writing the frequency into the scale_setspeed file.
 
This should get you going. Make sure you have the two modules at the
top of the file.

**** Start of the file **** Place this file in your startup sequence.

#! /bin/sh
#

modprobe cpufreq-ondemand
modprobe powernow-k8

NAME=cpufreq-ondemand
DESC="ondemand governor"
GOVERNOR_PATH="/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

SCRIPTNAME=/etc/init.d/$NAME

case "$1" in
start)
echo -n "Starting $DESC: $NAME... "
echo ondemand > $GOVERNOR_PATH
if [ "ondemand" != `cat $GOVERNOR_PATH` ]; then
echo "Failed"
else
echo "Done."
fi
;;
stop)
echo -n "Stopping $DESC: $NAME"
echo performance > $GOVERNOR_PATH
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME... "
echo ondemand > $GOVERNOR_PATH
if [ "ondemand" != `cat $GOVERNOR_PATH` ]; then
echo "Failed"
else
echo "Done."
fi
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0
 
I thought userspace just allowed you to explicitly set the frequency by
writing the frequency into the scale_setspeed file.

Well, that's all userspace does, but running cpufreqd does it fro you
automatically depending on cpu load and other configuarabke factors in
cpufreqd.conf. Here's mine as an example.

[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
pm_type=acpi #(acpi, apm or pmu)
# Uncomment the following line to enable ACPI workaround (see cpufreqd.conf(5))
# acpi_workaround=1
verbosity=4 #(if you want a minimal logging set to 5)

[Profile]
name=hi_boost
minfreq=2000000
maxfreq=2000000
policy=userspace

[Profile]
name=medium_boost
minfreq=1800000
maxfreq=1800000
policy=userspace

[Profile]
name=lo_boost
minfreq=800000
maxfreq=800000
policy=userspace

[Rule]
name=cpulow
cpu_interval=0-3
profile=lo_boost

[Rule]
name=cpumedium
cpu_interval=3-80
profile=medium_boost

[Rule]
name=cpuhigh
cpu_interval=80-100
profile=hi_boost

[Rule]
name=crackattack
programs=crack-attack
cpu_interval=90-100
profile=lo_boost

# full power when watching DVDs :
[Rule]
name=dvd_watching
programs=xine,mplayer,avidemux,totem
cpu_interval=0-100
profile=medium_boost
 
Well, that's all userspace does, but running cpufreqd does it fro you
automatically depending on cpu load and other configuarabke factors in
cpufreqd.conf. Here's mine as an example.

Thanks for the info on cpufreqd. I'm using the ondemand mode and it seems
to work very well. It jumps up to the fastest speed as soon as you start
to do something that's compute intensive like a compile and then backs off
gradually when it's done. On my machine, which has a 3800+, it goes from
2.4GHz, to 2.2, to 2.0, to 1.8 to 1.0GHz at intervals that appear to be
about 12 seconds apart.
 
General said:
I have an Athlon 64 3800+/Nforce 3-250Ultra system running Fedora Core 3
with a custom 2.6.9 kernel. In the kernel configuration the performance,
userspace, powersave and ondemand performance governors have all been
selected however the
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
file lists only performance and userspace. I've tried to add powersave and
ondemand to the file but it reverts to just userspace performance. How do
I get the kernel to support powersave and ondemand. Ondemand seems like a
particularly useful power governor.
cpudyn is a good alternative for a desktop system, as it jumps straight
from low to high or vice-versa with nofrills. As you use your cpu in
mostly small bursts i would notice the lagtime on-demand or cpufreqd
took to finally get the cpu to full power. I did not take time to tweak
them though.
 
Back
Top