AMD CPU Underclocking Question
Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee
AMD CPU Underclocking Question
Hi,
I am planning on building a standard definition HTPC / web server / home automation server. Because it is going to be on 24*7, idle power consumption is really important to me.
I have been reading various articles (including on here) about undervolting / underclocking AMD CPUs to really cut idle power draw.
On some of these articles, they talk about "steps", with different core voltages and I am getting slightly confused about it. Can you set the CPU to run at different core voltages / clock speeds depending on load? For instance, if the CPU was only at 10% load, run it dead low to keep the power down, but if it is doing a large encoding job and the CPU load goes up, increase the clock speed and core voltage?
If you can do the above, do you need some kind of Windows utility, or can it be done in the BIOS (I am intending to run Linux).
Thanks!
I am planning on building a standard definition HTPC / web server / home automation server. Because it is going to be on 24*7, idle power consumption is really important to me.
I have been reading various articles (including on here) about undervolting / underclocking AMD CPUs to really cut idle power draw.
On some of these articles, they talk about "steps", with different core voltages and I am getting slightly confused about it. Can you set the CPU to run at different core voltages / clock speeds depending on load? For instance, if the CPU was only at 10% load, run it dead low to keep the power down, but if it is doing a large encoding job and the CPU load goes up, increase the clock speed and core voltage?
If you can do the above, do you need some kind of Windows utility, or can it be done in the BIOS (I am intending to run Linux).
Thanks!
Re: AMD CPU Underclocking Question
AMD has a mechanism called Cool'n'Quiet. They have their own software called a "driver" and it normally sets up three states [email protected], some other speed, advertized speed at 1.3V (or whatever default voltage).chrisps wrote:On some of these articles, they talk about "steps", with different core voltages and I am getting slightly confused about it. Can you set the CPU to run at different core voltages / clock speeds depending on load? For instance, if the CPU was only at 10% load, run it dead low to keep the power down, but if it is doing a large encoding job and the CPU load goes up, increase the clock speed and core voltage?
If you can do the above, do you need some kind of Windows utility, or can it be done in the BIOS (I am intending to run Linux).
There are a few programs that can use the same C'n'Q mechanism to setup your own choice of processor states. I use CrystalCPUID. It also just lets you try settings immediately. Run a CPU stress program like Orthos (Prime95) to see if the current settings are stable.
There are no such program for Linux I'm afraid, kernel recompile is the only solution as far as I know. There's a thread here somewhere where this is discussed.
(edit: found it - viewtopic.php?t=43757)
Normal CnQ works fine under Linux though.
Under Windows I prefer RMClock over CrystalCPUID.
(edit: found it - viewtopic.php?t=43757)
Normal CnQ works fine under Linux though.
Under Windows I prefer RMClock over CrystalCPUID.
A daemon that allows software undervolting of AMD cpus under Linux:
http://sourceforge.net/projects/cpupowerd/
http://sourceforge.net/projects/cpupowerd/
An AMD 4050e dual core 2.1 GHz only draws 7 watts at idle. how much lower do you need to go? Mine idles at 25 C (ambient room temp is about 23 C) using a XIGMATEK HDT-S1283 CPU Heatsink with no fan attached (although it is not far from a very slow running top case fan on Mini P180).
I also have the 500 GB WD Caviar Green hard drive that also keeps the watts and temps down (Also available in 640 GB and 1 TB size).
I also have the 500 GB WD Caviar Green hard drive that also keeps the watts and temps down (Also available in 640 GB and 1 TB size).
Thanks for the link
As for how low do I want to go... I was reading an article last night on a German forum (linked from another topic on this forum) where someone managed to get their AMD X2 based system down to 21W total system idle power draw. Really I want the idle power as low as I can and absolutely no higher than 30W.
Those figures from the German site are just as good as the slower Asus EeeBox idle power figures and I can buy the components for roughly the same price
As for how low do I want to go... I was reading an article last night on a German forum (linked from another topic on this forum) where someone managed to get their AMD X2 based system down to 21W total system idle power draw. Really I want the idle power as low as I can and absolutely no higher than 30W.
Those figures from the German site are just as good as the slower Asus EeeBox idle power figures and I can buy the components for roughly the same price
Here are the links:smax3 wrote:Hello, my first post, on the second I will add the links.
General: http://translate.google.com/translate?h ... c-systeme/
Low-Power-PCs: http://translate.google.com/translate?h ... mspar-pcs/
My Low-Power-PC (Idle under 20W ):
Windows: http://translate.google.com/translate?h ... glich.html
Linux: http://translate.google.com/translate?h ... -18-w.html
Stable undervolting tool for Linux -> cpupowerd:
http://translate.google.com/translate?h ... linux.html
http://sourceforge.net/projects/cpupowerd
Last edited by smax3 on Tue Aug 26, 2008 11:24 am, edited 1 time in total.
I use Slackware (Linux) 12.1. CPU voltage and frequency regulation is controlled by kernel modules. Depending upon the distro you use, you might or might not have to recompile the kernel to support those modules.
There are four basic modules that you can test directly from the command line:
Powersave policy, stick frequency to the slower state.
/sbin/modprobe cpufreq_powersave
Performance policy, stick frequency to the faster state.
/sbin/modprobe cpufreq_performance
Set the frequency on demand. What you want is what you get
/sbin/modprobe cpufreq_ondemand
Same of On demand policy, but for slow switching CPUs (AMD64 e.g)
/sbin/modprobe cpufreq_conservative
If you receive no errors then perform an lsmod to verify the modules loaded. Otherwise you have to recompile the kernel.
Once the preferred module is loaded, check the status of the regulator:
cat /sys/devices/system/cpu/*/cpufreq/scaling_governor
where * is each CPU core. An example of changing the status:
echo ondemand > /sys/devices/system/cpu/*/cpufreq/scaling_governor
I use the ondemand regulator. During idle or low demand my BE-2400 2.3 GHz AM2 dual core CPU runs at 1 GHz and 0.99 - 1.01 Vcore. Maximum demand is 2.3 Ghz and about 1.25 Vcore.
There is a tool called cpufrequtils that makes setting the upper and lower frequency easier. The limits can be set directly from the command line too if you are so inclined.
The ondemand regulator is the best for most people and works great for me. When playing a DVD my CPU remains at 1 GHz and 0.99 - 1.01 Vcore. When demand increases, such as running a virtual machine or compiling software, the CPU automatically ramps upward and when I am finished, resumes the idle state. This is a computer box, not an HTPC, however, therefore I don't know what high definition might do to CPU. If your graphics card does the decompressing, then I'm guessing the CPU will remain mostly in idle state.
I summarized a lot of this in my online journal:
Green Computing
You'll have some work on your part if your distro does not come fully featured, but you should find the basics in the essay.
There are four basic modules that you can test directly from the command line:
Powersave policy, stick frequency to the slower state.
/sbin/modprobe cpufreq_powersave
Performance policy, stick frequency to the faster state.
/sbin/modprobe cpufreq_performance
Set the frequency on demand. What you want is what you get
/sbin/modprobe cpufreq_ondemand
Same of On demand policy, but for slow switching CPUs (AMD64 e.g)
/sbin/modprobe cpufreq_conservative
If you receive no errors then perform an lsmod to verify the modules loaded. Otherwise you have to recompile the kernel.
Once the preferred module is loaded, check the status of the regulator:
cat /sys/devices/system/cpu/*/cpufreq/scaling_governor
where * is each CPU core. An example of changing the status:
echo ondemand > /sys/devices/system/cpu/*/cpufreq/scaling_governor
I use the ondemand regulator. During idle or low demand my BE-2400 2.3 GHz AM2 dual core CPU runs at 1 GHz and 0.99 - 1.01 Vcore. Maximum demand is 2.3 Ghz and about 1.25 Vcore.
There is a tool called cpufrequtils that makes setting the upper and lower frequency easier. The limits can be set directly from the command line too if you are so inclined.
The ondemand regulator is the best for most people and works great for me. When playing a DVD my CPU remains at 1 GHz and 0.99 - 1.01 Vcore. When demand increases, such as running a virtual machine or compiling software, the CPU automatically ramps upward and when I am finished, resumes the idle state. This is a computer box, not an HTPC, however, therefore I don't know what high definition might do to CPU. If your graphics card does the decompressing, then I'm guessing the CPU will remain mostly in idle state.
I summarized a lot of this in my online journal:
Green Computing
You'll have some work on your part if your distro does not come fully featured, but you should find the basics in the essay.
Thats true, but undervolting can't be done with original kernel modules ("only" the Cool'nQuiet voltages).woodsman wrote:CPU voltage and frequency regulation is controlled by kernel modules.
My AMD X2 3800 EE SFF (TDP 35W) runs at 1 GHz with 0.8V (original 1.0V) and at 2 GHz with 1.0V (original 1.1V). On Idle I save 2-3W, on maximum 5-6W.woodsman wrote:During idle or low demand my BE-2400 2.3 GHz AM2 dual core CPU runs at 1 GHz and 0.99 - 1.01 Vcore. Maximum demand is 2.3 Ghz and about 1.25 Vcore.
Thanks for the extra info guys - Really useful!
Also, for the people asking for the links.... the specific forum I was refering to was this:
http://translate.google.com/translate?h ... p?t=436832
The 22W idle system spec is here:
http://66.102.9.104/translate_c?hl=en&s ... oK31dAhCvg
Also, for the people asking for the links.... the specific forum I was refering to was this:
http://translate.google.com/translate?h ... p?t=436832
The 22W idle system spec is here:
http://66.102.9.104/translate_c?hl=en&s ... oK31dAhCvg
Thanks very much for the great information in this thread, particularly the pointer to cpupowerd. I downloaded it from sourceforge, and followed the excellent README that is included. It really worked like a dream from that point, and I had no problems undervolting it successfully.
The BE2350 in my Ubuntu based server/torrent/TV recording PC is now idling at 0.85 V @ 1 GHz, rather than 1.1 V, and 1.1 V @ 2.1 GHz, rather than 1.3 V. I will hopefully get the chance to do some power consumption tests soon. As this machine is on 24/7 and mostly runs at 1 GHz when controlled by c'n'q, this is the frequency I spent most time optimising.
Now that I have got this working from the command line, I would like to have cpupowerd start automatically when the machine is powered on, but there seems to be a lack of infomation on how this is done. Does anyone else have some suggestions?
The BE2350 in my Ubuntu based server/torrent/TV recording PC is now idling at 0.85 V @ 1 GHz, rather than 1.1 V, and 1.1 V @ 2.1 GHz, rather than 1.3 V. I will hopefully get the chance to do some power consumption tests soon. As this machine is on 24/7 and mostly runs at 1 GHz when controlled by c'n'q, this is the frequency I spent most time optimising.
Now that I have got this working from the command line, I would like to have cpupowerd start automatically when the machine is powered on, but there seems to be a lack of infomation on how this is done. Does anyone else have some suggestions?
On a server without a desktop environment (e.g. Gnome) you can do this:arckuk wrote:Now that I have got this working from the command line, I would like to have cpupowerd start automatically when the machine is powered on, but there seems to be a lack of infomation on how this is done. Does anyone else have some suggestions?
Add all needed moduls in /etc/moduls .
Create file cpupowerd in /etc/init.d with the following content:
Code: Select all
#! /bin/sh
case "$1" in
start)
cpupowerd -d -c /etc/cpupowerd.conf
;;
stop)
killall cpupowerd
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
exit 3
;;
esac
With a desktop environment, it gives troubles with some processes (e.g. Gnome: gnome-power-manager, hald-addon-cpufreq), because they changes the cpu frequency and cpupowerd are in a wrong status. A security exit is executed as a result.
Thanks very much smax3 for that, it's very much appreciated. I had sort of guessed that putting the modules in /etc/modules would be necessary, it was the init script that I needed. I haven't got time to try it out now, but will try tomorrow.
I'll also hopefully have time to test out the power consumption of the rest of my server. Specs are:
Antec Sonata II
Seasonic 330W PSU
Asus M2A-VM HDMI
AMD BE2350
2 x 1GB OCZ 6400 RAM (needs 1.9 V)
1TB Samsung F1 (suspended)
Compro DVB-T200 TV tuner card
2 x Yate-Loon D12SL-12 fans, controlled by zalman fanmate ii
Ubuntu 8.04 desktop.
This machine has slowly been taking over most of my desktop usage roles over the past year or so, to the point that I now hardly ever turn on my Windows machine - it's more powerful, but Windows just seems far too inelegant after the order of a Linux install. I have just got to spend some time sorting out the equivalent functionality to iTunes for syncing my music with my iPod.... Two young children don't leave much time for tinkering with technology!
I'll also hopefully have time to test out the power consumption of the rest of my server. Specs are:
Antec Sonata II
Seasonic 330W PSU
Asus M2A-VM HDMI
AMD BE2350
2 x 1GB OCZ 6400 RAM (needs 1.9 V)
1TB Samsung F1 (suspended)
Compro DVB-T200 TV tuner card
2 x Yate-Loon D12SL-12 fans, controlled by zalman fanmate ii
Ubuntu 8.04 desktop.
This machine has slowly been taking over most of my desktop usage roles over the past year or so, to the point that I now hardly ever turn on my Windows machine - it's more powerful, but Windows just seems far too inelegant after the order of a Linux install. I have just got to spend some time sorting out the equivalent functionality to iTunes for syncing my music with my iPod.... Two young children don't leave much time for tinkering with technology!
You have a Ubuntu desktop environment (Gnome).arckuk wrote:Ubuntu 8.04 desktop.
Please read this thread:
http://translate.google.com/translate?h ... buntu-l/4/
smax3. Thanks for your help with this, and for a fantastic tool for undervolting!
Just as a help to anyone else using Ubuntu desktop who wants to autostart cpupowerd, I did the following:
Download and configure cpupowerd according to the README file, including saving the optimal voltages in cpupowerd.conf
Copy cpupowerd.conf to /etc/cpupowerd.conf:
sudo cp cpupowerd.conf /etc/cpupowerd.conf
Load the msr module at startup by inserting a line with 'msr' in it into /etc/modules:
sudo gedit /etc/modules
Create an init script, /etc/init.d/cpupowerd as follows:
sudo gedit /etc/init.d/cpupowerd
Note that this script didn't work without the 20 second sleep at the beginning that smax3 mentioned in the link he pointed out above.
set execute permissions to the init script:
sudo chmod +x /etc/init.d/cpupowerd
Add a symbolic link to automatically start the init script at run level 2:
cd /etc/rc2.d
sudo ln -s ../init.d/cpupowerd S99z_cpupowerd
Add a symbolic link to kill cpupowerd at run level 6 (shutdown)
cd /etc/rc6.d
sudo ln -s ../init.d/cpupowerd K60cpupowerd
As far as power savings go, the system uses about 3.5 watts less with with the undervolted CPU - not a huge gain, but better to have than not! My power meter averages around 54.7 watts at 0.85 V @ 1000 MHz with the spec in my earlier post + a spun down seagate 7200.10 500GB that I failed to mention. At 1.1 V (stock), the system draws 58.2 watts.
[Edit - smax3 pointed out below the need to kill cpupowerd at run level 6.]
Just as a help to anyone else using Ubuntu desktop who wants to autostart cpupowerd, I did the following:
Download and configure cpupowerd according to the README file, including saving the optimal voltages in cpupowerd.conf
Copy cpupowerd.conf to /etc/cpupowerd.conf:
sudo cp cpupowerd.conf /etc/cpupowerd.conf
Load the msr module at startup by inserting a line with 'msr' in it into /etc/modules:
sudo gedit /etc/modules
Create an init script, /etc/init.d/cpupowerd as follows:
sudo gedit /etc/init.d/cpupowerd
Code: Select all
#! /bin/sh
case "$1" in
start)
sleep 20
killall gnome-power-manager
killall hald-addon-cpufreq
cpupowerd -d -c /etc/cpupowerd.conf
;;
stop)
killall cpupowerd
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
exit 3
;;
esac
set execute permissions to the init script:
sudo chmod +x /etc/init.d/cpupowerd
Add a symbolic link to automatically start the init script at run level 2:
cd /etc/rc2.d
sudo ln -s ../init.d/cpupowerd S99z_cpupowerd
Add a symbolic link to kill cpupowerd at run level 6 (shutdown)
cd /etc/rc6.d
sudo ln -s ../init.d/cpupowerd K60cpupowerd
As far as power savings go, the system uses about 3.5 watts less with with the undervolted CPU - not a huge gain, but better to have than not! My power meter averages around 54.7 watts at 0.85 V @ 1000 MHz with the spec in my earlier post + a spun down seagate 7200.10 500GB that I failed to mention. At 1.1 V (stock), the system draws 58.2 watts.
[Edit - smax3 pointed out below the need to kill cpupowerd at run level 6.]
Last edited by arckuk on Thu Aug 28, 2008 11:36 pm, edited 1 time in total.