LinHES Forums
http://forums.linhes.org/

Auto CPU Frequency scaling (Powersaved)
http://forums.linhes.org/viewtopic.php?f=3&t=18340
Page 2 of 3

Author:  hartsu [ Sat Jul 19, 2008 7:51 am ]
Post subject: 

knappster wrote:
Any more progress with cpufrequtils hartsu?


Not yet . Most often its working very well , but firefox is little slow if i open several new tabs or windows which contain flash .

Author:  neutron68 [ Tue May 26, 2009 11:24 pm ]
Post subject:  R5.5 and Powersaved

Anyone get the powersaved to work in R5.5?

I just tried to set powersaved to dynamic speed mode and got errors. It looks like something is missing? HAL?

Code:
root@mythtv:~# powersave -A
liblazy (liblazy_dbus_send_method_call:97): Received error reply: Method "SetCPUFreqGovernor" with signature "s" on interface "org.freedesktop.Hal.Device.CPUFreq" doesn't exist

liblazy (liblazy_dbus_send_method_call:97): Received error reply: Method "SetCPUFreqGovernor" with signature "s" on interface "org.freedesktop.Hal.Device.CPUFreq" doesn't exist

Could not set CPUFreq policy to dynamic.
root@mythtv:~#

Author:  knappster [ Tue May 26, 2009 11:29 pm ]
Post subject: 

It's been a while since I did it, but I ended up using something else. I got most of the information here:

http://technowizah.com/2007/01/debian-h ... ement.html

I can't say I've noticed any problems as a result, and since my box is in a cabinet now, the lower heat production is a definite plus. If you have any questions setting it up, let me know and I will try to fill in the gaps.

Author:  tophee [ Wed May 27, 2009 5:41 am ]
Post subject: 

Hi knappster,
Reading through the post you linked to, using the cpu power management feature seemed very easy. Did you just follow the provided instructions?
Any info would be great.
Thanks
Chris

Author:  knappster [ Wed May 27, 2009 8:15 am ]
Post subject: 

I followed the instructions to get everything running manually with one caveat. On most (or maybe all) dual core processors, you need both cpu's using the same governing.

So to use ondemand, the example says to type:
Code:
echo ondemand | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


but you will also need to type
Code:
echo ondemand | sudo tee /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor


And similarly, to make that governor the permanent choice in the /etc/sysfs.conf file:
Code:
devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand
devices/system/cpu/cpu1/cpufreq/scaling_governor = ondemand


I did it on both my desktop computer and my KM box which both used the powernow_k8 driver. I can't remember if the tools were already installed on the KM box or if I had to manually install them. If you want me to post any examples of the entries in my /etc/modules or /etc/sysfs.conf files, I can post that info when I get home tonight.

Author:  neutron68 [ Wed May 27, 2009 10:43 am ]
Post subject:  seems to work

It seems to work.

By SSH, I just set my Mythbox CPU speed down to 1000 MHz from the 2.20 GHz setting it has been running at.

Code:
root@mythtv:~# cpufreq-info
cpufrequtils 005: cpufreq-info (C) Dominik Brodowski 2004-2006 Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 1000 MHz and 2.20 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
analyzing CPU 1:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 1000 MHz and 2.20 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
root@mythtv:~#

Author:  knappster [ Wed May 27, 2009 11:16 am ]
Post subject: 

Looks good. When I first set mine up I checked it while watching HD and I think it used more CPU that way and then when doing commercial flagging it basically maxed out. I haven't noticed any stuttering since doing it. I think you should be in good shape.

Author:  tophee [ Wed May 27, 2009 12:12 pm ]
Post subject: 

Thanks for the update. Will have a go tomorrow.

Author:  neutron68 [ Wed May 27, 2009 12:30 pm ]
Post subject:  no response to these commands

When I was following down through the procedure, I didn't get any response from these commands. Did any of you?
Code:
root@mythtv:~# modprobe powernow_k8
root@mythtv:~# modprobe cpufreq_ondemand

Author:  knappster [ Wed May 27, 2009 2:08 pm ]
Post subject: 

I believe modprobe is silent unless there is an error. Even if you're loading a module that has already been loaded it will remain silent. I wouldn't worry about that.

Author:  neutron68 [ Wed May 27, 2009 9:59 pm ]
Post subject:  apt-get - should I worry?

I started to do this cpu speed update to my friend's Knoppmyth box (version R5F1) and got an apt-get removal warning I'm not sure about:
Code:
root@mythtv:~# apt-get install cpufrequtils sysfsutils
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  binutils libc6 libc6-dev libcpufreq0 libncurses5 libncurses5-dev libselinux1
  libslang2 libslang2-dev linux-libc-dev tzdata util-linux
Suggested packages:
  binutils-doc locales glibc-doc libc6-i686 manpages-dev util-linux-locales
Recommended packages:
  libgpm2

The following packages will be REMOVED:
  linux-kernel-headers-knoppix

The following NEW packages will be installed:
  cpufrequtils libcpufreq0 linux-libc-dev sysfsutils
The following packages will be upgraded:
  binutils libc6 libc6-dev libncurses5 libncurses5-dev libselinux1 libslang2
  libslang2-dev tzdata util-linux
10 upgraded, 4 newly installed, 1 to remove and 769 not upgraded.
Need to get 15.5MB of archives.
After unpacking 6083kB of additional disk space will be used.
Do you want to continue [Y/n]?

I don't know if I should continue. Would it be dangerous to remove linux-kernel-headers-knoppix ?
I don't want to break his Knoppmyth box. It's been running fine for several years.

His sources.list file are set to stable sources:
Code:
#Debian repos
deb http://ftp.debian.org stable main contrib non-free
deb-src http://ftp.debian.org stable main contrib non-free

Author:  knappster [ Wed May 27, 2009 10:55 pm ]
Post subject:  Re: apt-get - should I worry?

neutron68 wrote:
I started to do this cpu speed update to my friend's Knoppmyth box (version R5F1) and got an apt-get removal warning I'm not sure about:
Code:
root@mythtv:~# apt-get install cpufrequtils sysfsutils
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  binutils libc6 libc6-dev libcpufreq0 libncurses5 libncurses5-dev libselinux1
  libslang2 libslang2-dev linux-libc-dev tzdata util-linux
Suggested packages:
  binutils-doc locales glibc-doc libc6-i686 manpages-dev util-linux-locales
Recommended packages:
  libgpm2

The following packages will be REMOVED:
  linux-kernel-headers-knoppix

The following NEW packages will be installed:
  cpufrequtils libcpufreq0 linux-libc-dev sysfsutils
The following packages will be upgraded:
  binutils libc6 libc6-dev libncurses5 libncurses5-dev libselinux1 libslang2
  libslang2-dev tzdata util-linux
10 upgraded, 4 newly installed, 1 to remove and 769 not upgraded.
Need to get 15.5MB of archives.
After unpacking 6083kB of additional disk space will be used.
Do you want to continue [Y/n]?

I don't know if I should continue. Would it be dangerous to remove linux-kernel-headers-knoppix ?
I don't want to break his Knoppmyth box. It's been running fine for several years.

His sources.list file are set to stable sources:
Code:
#Debian repos
deb http://ftp.debian.org stable main contrib non-free
deb-src http://ftp.debian.org stable main contrib non-free

I don't think I would do it. Have you tried powersaved from my first post in this thread? That is what I used on R5F27.

Author:  neutron68 [ Thu May 28, 2009 9:13 pm ]
Post subject:  less power

This adaptable clock speed is going to save $!

I have a Kill-a-Watt meter and just plugged only the Knoppmyth box (box details in the signature line of this post) into it. Here are the stats:

65W used with the CPU at 1000 MHz speed and Mythtv sitting idle

81W used with the CPU at 2200 MHz speed and Mythtv sitting idle

If I had know that CPU clock throttling was possible a year ago, I could have saved 16W times 8760 hours = 140.16 kWh.
In Minnesota a kWh costs about $0.08, so the throttleback would have saved about $11.21 in electricity.

Author:  marc.aronson [ Sun May 31, 2009 5:44 pm ]
Post subject: 

I installed this on two systems:

1. No chg in power consumption for my production box running a core 2 duo E8400 processor. Still idles at 60 watts with 2 tuners and 2 disk drives.

2. 20 watt power savings in my older test system -- P4 2.8ghz system w/ HT enabled.

Interestingly, on the production box where I did not see any power savings, I could not successfully execute a modprobe speedstep_centrino and had to fall back to using the generic driver, "acpi_cpufreq".

Thoughts?

Author:  marc.aronson [ Sun May 31, 2009 6:15 pm ]
Post subject: 

marc.aronson wrote:
2. 20 watt power savings in my older test system -- P4 2.8ghz system w/ HT enabled.

I just ran a more controlled experiment on that older P4-2.8ghz system. At idle there is no difference in power consumption with "ondemand" vs. "performance". I then created a scenario where the CPU needed to run at 700mhz (The allowable range is 325 to 2800) and saw the following readings:

1. ondemand -- 89 watts

2. performance -- 95 watts.

So the savings was 6 watts. I would be interested in knowing what other's are seeing.

Page 2 of 3 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/