neverstopdreaming Posted February 18, 2015 Share #1 Posted February 18, 2015 Hi Sancome, would you add powernow-k8 module and cpufreq-utils or cpupower utilties in the next build? It would be fine to limit CPU power when unused also on AMD cpu. In kernel 3.2 acpi-cpufreq module is not able to handle AMD cpu yet. thanks Neverstopdreaming Quote Link to comment Share on other sites More sharing options...
0 withwolf1987 Posted February 20, 2015 Share #2 Posted February 20, 2015 I also looking forward for a AMD K8 /K10 driver. Quote Link to comment Share on other sites More sharing options...
0 neverstopdreaming Posted March 4, 2015 Author Share #3 Posted March 4, 2015 Hi Sancome, thanks for the new version! XPEnoboot_DS3615xs_5.1-5022.3 works fine for AMD CPU: [ 168.210238] powernow-k8: Found 1 AMD E-350 Processor (2 cpu cores) (version 2.20.00) [ 168.210311] powernow-k8: 0 : pstate 0 (1600 MHz) [ 168.210315] powernow-k8: 1 : pstate 1 (1280 MHz) [ 168.210318] powernow-k8: 2 : pstate 2 (800 MHz) I just needed to load the module and change the governor to ondemand: insmod /lib/modules/powernow-k8.ko echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor grep "MHz" /proc/cpuinfo cpu MHz : 800.000 cpu MHz : 800.000 Can you suggest where should I put them to load on boot? Some /etc/init/rc.* should be fine? thanks Quote Link to comment Share on other sites More sharing options...
0 withwolf1987 Posted March 6, 2015 Share #4 Posted March 6, 2015 Thanks neverstopdreaming . Can you tell how you get the first step? Or better what you do exactly? I really want to have the PowerSaving. withwolf1987 Quote Link to comment Share on other sites More sharing options...
0 sszpila Posted March 6, 2015 Share #5 Posted March 6, 2015 (edited) Maybe "conservative" governor is better for nas? In FreeNAS it's default governor. I have switched from ondemand, cpu now sit with lowest frequencies, occasionally switch to higher ones. With ondemand it jumps from min to max frequency, ommiting middle cpu states. Edited March 6, 2015 by Guest Quote Link to comment Share on other sites More sharing options...
0 neverstopdreaming Posted March 6, 2015 Author Share #6 Posted March 6, 2015 Thanks neverstopdreaming .Can you tell how you get the first step? Or better what you do exactly? Just execute the insmod.. command. Then you can see with "dmesg" command if the module identifies you CPU. the echo commands are necessary to change the CPU governor for each CPU (core) you have. Quote Link to comment Share on other sites More sharing options...
0 neverstopdreaming Posted March 6, 2015 Author Share #7 Posted March 6, 2015 Maybe "conservative" governor is better for nas? In FreeNAS it's default governor. I have switched from ondemand, cpu now sit with lowest frequencies, occasionally switch to higher ones. Witch ondemand it jumps from min to max frequency, ommiting middle cpu states. You're right, it should be better. There is no need to quick spikes. Quote Link to comment Share on other sites More sharing options...
0 sancome Posted March 6, 2015 Share #8 Posted March 6, 2015 u can put the script file into the /usr/local/etc/rc.d/ directory. the filename like this "S99Powersaving.sh" Quote Link to comment Share on other sites More sharing options...
0 neverstopdreaming Posted March 6, 2015 Author Share #9 Posted March 6, 2015 thanks sancome Quote Link to comment Share on other sites More sharing options...
0 R0KH Posted March 6, 2015 Share #10 Posted March 6, 2015 u can put the script file into the /usr/local/etc/rc.d/ directory.the filename like this "S99Powersaving.sh" For the people who don't know exactly how to do this.... The contents of the file should look something like this: #!/bin/sh echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor It can be simply made with a text editor. Above is how I did it and it works, finally I don't have to do it by hand anymore every time the server is rebooted. Quote Link to comment Share on other sites More sharing options...
0 wkweksl Posted March 7, 2015 Share #11 Posted March 7, 2015 I'm running 5022.3 on a C1037U and it seems like it always goes back to performance profile after about an hour. Short of running the script every hour is there another fix? Quote Link to comment Share on other sites More sharing options...
0 sszpila Posted March 7, 2015 Share #12 Posted March 7, 2015 Yes, I made a script to check what governor is set and change it back to conservative. It runs from crontab every ten minute. Tapnięte z lenovo a820 Quote Link to comment Share on other sites More sharing options...
0 wkweksl Posted March 8, 2015 Share #13 Posted March 8, 2015 Yes, I made a script to check what governor is set and change it back to conservative. It runs from crontab every ten minute. sszpila, do you mind sharing your script? Thanks. Quote Link to comment Share on other sites More sharing options...
0 sszpila Posted March 8, 2015 Share #14 Posted March 8, 2015 Sure #!/bin/sh for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); do if ! grep -q 'conservative' $c/cpufreq/scaling_governor ; then echo conservative >$c/cpufreq/scaling_governor ; fi done Script i fired on every ten minutes by cron. Quote Link to comment Share on other sites More sharing options...
0 MarsManden Posted March 8, 2015 Share #15 Posted March 8, 2015 This is simply just great! Now my N54L is almost hybernating... NAS8> grep "MHz" /proc/cpuinfo cpu MHz : 2196.380 cpu MHz : 2196.380 NAS8> insmod /lib/modules/powernow-k8.ko NAS8> dmesg|grep powernow [ 98.393259] powernow-k8: Found 1 AMD Turion(tm) II Neo N54L Dual-Core Processor (2 cpu cores) (version 2.20.00) [ 98.393303] powernow-k8: 0 : pstate 0 (2200 MHz) [ 98.393305] powernow-k8: 1 : pstate 1 (1900 MHz) [ 98.393307] powernow-k8: 2 : pstate 2 (1600 MHz) [ 98.393308] powernow-k8: 3 : pstate 3 (1300 MHz) [ 98.393310] powernow-k8: 4 : pstate 4 (800 MHz) NAS8> echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor NAS8> echo conservative > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor NAS8> grep "MHz" /proc/cpuinfo cpu MHz : 800.000 cpu MHz : 800.000 Thanks sancome! Quote Link to comment Share on other sites More sharing options...
0 Scheppi Posted March 9, 2015 Share #16 Posted March 9, 2015 u can put the script file into the /usr/local/etc/rc.d/ directory.the filename like this "S99Powersaving.sh" For the people who don't know exactly how to do this.... The contents of the file should look something like this: #!/bin/sh echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor It can be simply made with a text editor. Above is how I did it and it works, finally I don't have to do it by hand anymore every time the server is rebooted. What about the "insmod" command? shouldnt it be in the script too? or is there a better place to put that into? (Sorry to ask, iam a linux newbie) Quote Link to comment Share on other sites More sharing options...
0 neverstopdreaming Posted March 9, 2015 Author Share #17 Posted March 9, 2015 I added insmod in the same script and it's running fine Quote Link to comment Share on other sites More sharing options...
0 Scheppi Posted March 9, 2015 Share #18 Posted March 9, 2015 thanks for the info, did the same and it seems to work fine for me now, too thanks for your help Quote Link to comment Share on other sites More sharing options...
0 wkweksl Posted March 10, 2015 Share #19 Posted March 10, 2015 Sure #!/bin/sh for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); do if ! grep -q 'conservative' $c/cpufreq/scaling_governor ; then echo conservative >$c/cpufreq/scaling_governor ; fi done Script i fired on every ten minutes by cron. Thanks sszpila. Hmm, not sure if the cron daemon is finicky cos after some time it still reverts */15 * * * * root /volume1/share/powersaving.sh Quote Link to comment Share on other sites More sharing options...
0 sszpila Posted March 10, 2015 Share #20 Posted March 10, 2015 Tankowiec> cpufreq-info cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to cpufreq@vger.kernel.org, please. analyzing CPU 0: driver: powernow-k8 CPUs which run at the same hardware frequency: 0 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 8.0 us. hardware limits: 800 MHz - 2.20 GHz available frequency steps: 2.20 GHz, 1.90 GHz, 1.60 GHz, 1.30 GHz, 800 MHz available cpufreq governors: conservative, powersave, performance, ondemand, userspace current policy: frequency should be within 800 MHz and 2.20 GHz. The governor "conservative" may decide which speed to use within this range. current CPU frequency is 800 MHz (asserted by call to hardware). cpufreq stats: 2.20 GHz:0.29%, 1.90 GHz:0.59%, 1.60 GHz:1.68%, 1.30 GHz:2.56%, 800 MHz:94.88% (317669) analyzing CPU 1: driver: powernow-k8 CPUs which run at the same hardware frequency: 1 CPUs which need to have their frequency coordinated by software: 1 maximum transition latency: 8.0 us. hardware limits: 800 MHz - 2.20 GHz available frequency steps: 2.20 GHz, 1.90 GHz, 1.60 GHz, 1.30 GHz, 800 MHz available cpufreq governors: conservative, powersave, performance, ondemand, userspace current policy: frequency should be within 800 MHz and 2.20 GHz. The governor "conservative" may decide which speed to use within this range. current CPU frequency is 800 MHz (asserted by call to hardware). cpufreq stats: 2.20 GHz:0.06%, 1.90 GHz:0.07%, 1.60 GHz:0.08%, 1.30 GHz:0.16%, 800 MHz:99.63% (13669) Tankowiec> As you see, my cpus are sitting at lowest frequency for most of time. Even if governors were revert to performance, for max 10 minutes they will back to conservative. I noticed that wake disks from hibernation changes governor to performance. Quote Link to comment Share on other sites More sharing options...
0 simono5 Posted March 10, 2015 Share #21 Posted March 10, 2015 Hi everyone, I just can't get my head around what I need to do to get power saving working on my HP54L. Could someone document a step by step idiots guide please? Thanks for your help. Quote Link to comment Share on other sites More sharing options...
0 tomcarmen Posted March 10, 2015 Share #22 Posted March 10, 2015 Also for my q1900 - j1900 processor thanks Quote Link to comment Share on other sites More sharing options...
0 Balrog Posted March 12, 2015 Share #23 Posted March 12, 2015 Which module I must load for an Intel-Cpu? I have a HP Microserver Gen 8 with a Celeron G1610 CPU and get the error "no or unknown cpufreq driver is active on this CPU" if I run "cpufreq-info". I am also not able to set the cpu governor as the entries under /sys/devices.... don't exists (this makes sense as the driver is not loaded). Maybe someone can point me to the correct module to load. Quote Link to comment Share on other sites More sharing options...
0 Balrog Posted March 20, 2015 Share #24 Posted March 20, 2015 (edited) I have the answer for the HP Microserver Gen8! The trick is to set the power setting in the Bios to "OS controlled" (and don't forget to save this setting as "User-default". Otherwise it will be resetted at the next reboot caused by the "bios reset bug") After the next boot all power-settings are accessible without loading any additional modules. Thanks for the script to set the conservative governor at boot. It works very well! Edited March 21, 2015 by Guest Quote Link to comment Share on other sites More sharing options...
0 R0KH Posted March 20, 2015 Share #25 Posted March 20, 2015 u can put the script file into the /usr/local/etc/rc.d/ directory.the filename like this "S99Powersaving.sh" For the people who don't know exactly how to do this.... The contents of the file should look something like this: #!/bin/sh echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo conservative > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor It can be simply made with a text editor. Above is how I did it and it works, finally I don't have to do it by hand anymore every time the server is rebooted. What about the "insmod" command? shouldnt it be in the script too? or is there a better place to put that into? (Sorry to ask, iam a linux newbie) I have a Intel CPU and the scaling governor works fine already, so I don't need the 'insmod' command. In my case with above script it works perfectly, also after reboot, which was the part I never got to work properly. I always had to change the governor manually by executing a task with the same commands as in the script after a reboot and now I don't need to anymore which is great! Quote Link to comment Share on other sites More sharing options...
0 Poechi Posted March 21, 2015 Share #26 Posted March 21, 2015 (edited) - Edited July 10, 2015 by Guest Quote Link to comment Share on other sites More sharing options...
Question
neverstopdreaming
Hi Sancome,
would you add powernow-k8 module and cpufreq-utils or cpupower utilties in the next build?
It would be fine to limit CPU power when unused also on AMD cpu. In kernel 3.2 acpi-cpufreq module is not able to handle AMD cpu yet.
thanks
Neverstopdreaming
Link to comment
Share on other sites
50 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.