wakkawakka Posted April 20, 2015 #1 Posted April 20, 2015 I just discovered that the xpen .nl site is gone - very, very, very upsetting to see that. As a new user and operator of Xpenology (within past 2 months) that site and the TUTORIALS were invaluable to me. I am very displeased to see that the site owner was forced to remove all content due to Synology greed/bullying. That action has completely soured me to Synology and I will not ever purchase their product. /end rant. To the point of my thread. Before the wonderful aforementioned site had to be forcibly removed, I downloaded the .sh script and the win app that were part of the CPU THROTTLE tutorial. I read the tutorial when it was available but did not get a chance to set it up until last night which is when I saw the removal of all content. I immediately checked this forum hoping to find a tutorial and did see a related thread, however, the linked stuff does not work. TL;DR - Does anyone have the CPU THROTTLING TUTORIAL, please?! Quote
brantje Posted April 20, 2015 #2 Posted April 20, 2015 I just discovered that the xpen .nl site is gone - very, very, very upsetting to see that. As a new user and operator of Xpenology (within past 2 months) that site and the TUTORIALS were invaluable to me. I am very displeased to see that the site owner was forced to remove all content due to Synology greed/bullying. That action has completely soured me to Synology and I will not ever purchase their product. /end rant. To the point of my thread. Before the wonderful aforementioned site had to be forcibly removed, I downloaded the .sh script and the win app that were part of the CPU THROTTLE tutorial. I read the tutorial when it was available but did not get a chance to set it up until last night which is when I saw the removal of all content. I immediately checked this forum hoping to find a tutorial and did see a related thread, however, the linked stuff does not work. TL;DR - Does anyone have the CPU THROTTLING TUTORIAL, please?! Who said it was a action of synology? Quote
blackburn Posted April 20, 2015 #3 Posted April 20, 2015 Special thanks Poechi This tutorial describes how to control your CPU frequency when power is not needed and thus resulting in lower power consumption of your NAS. Prerequisites: XPEnoboot 5.1-5022.3 CPU Power Saving script (Scripts section) WinSCP (Tools section) Attention: If you have an Intel based CPU, make sure that the power setting options in your BIOS is set to ‘OS Controlled‘. In case of the HP Gen 8 micro server, save this setting as ‘User default‘ or else the bios reset bug will reset it at reboot. Check power state Before installing the script, let’s check your current CPU power state. 1-Start a SSH session to your NAS and login as ‘root‘. 2-Type the following command: grep "MHz" /proc/cpuinfo and press Enter. 3-Example output of an AMD 2 core processor (HP N54L): cpu MHz : 2196.380 cpu MHz : 2196.380 4-What this shows is that your cores are running at max power and thus using max power consumption. 5-Now that we know this we can use the script to bring power state level down to save power. Once the script is enabled the power states are automatically toggled according to the load of the CPU. Installation: 1-Download the script for AMD or Intel from the DSM software page, under the Scripts section. S99PowersavingAMD.zip http://uloz.to/xXvu2WX2/s99powersavingamd-zip S99PowersavingINTEL.zip http://uloz.to/xbdrT8xC/s99powersavingintel-zip 2-Download and install WinSCP and make a connection to your NAS. Start ‘WinSCP‘ and start a new connection with protocol ‘SCP‘. Enter the ip address or hostname of your NAS and login as ‘root‘. Click on ‘Login‘ and fill in your password. 3-Upload the script to the /usr/local/etc/rc.d/ directory. 4-Right click on the script and choose ‘Properties‘ and give it ‘Execution‘ rights for the owner. Octal : 0744 5-Close WinSCP. 6-There is a possibility that after your disk are woken up from hibernation that the power state is overwritten. To fix this you can make an adjustment in crontab that runs the script say every 15 minutes. 7-Start a SSH session to your NAS and login as ‘root‘. 8-Type the following command: vi /etc/crontab 9-Go to the end of the last line, press ‘Insert‘, press ‘Right arrow‘ and press ‘Enter‘. This will get you on the next line. 10-Type the following command and use ‘Tab‘ for spacing and use the correct script name accordingly: */15 * * * * root /usr/local/etc/rc.d/S99PowersavingAMD.sh 11-Press ‘Esc‘ and type ‘:wq‘. 12-Reboot your NAS. Check power state again 1-After the reboot start a SSH session to your NAS and login as ‘root‘. 2-Type the following command: grep "MHz" /proc/cpuinfo and press Enter. 3-Example output of an AMD 2 core processor (HP N54L) after applying the script: cpu MHz : 800.000 cpu MHz : 800.000 4-This result shows current power state under no load. When CPU load increases, the power states automatically toggle up so that your CPU runs at higher frequencies. When CPU load decreases, the power state is adjusted accordingly down, saving energy. 5-If you want to check if the power state has changed after waking up from hibernation type the following command in SSH: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor If the answer is ‘performance’ that means the governor has been changed. If you check again in a few more minutes (maximum 15) it should revert to ‘conservative‘ due to the crontab schedule. Note This tutorial is based on the following topic at xpenology.com: Quote
wakkawakka Posted April 20, 2015 Author #4 Posted April 20, 2015 @blackburn - THANK YOU x1,000! That is precisely what I was looking for. Good on you. @brantje - I'm fairly certain that it was not McDonald's or Wal-Mart that asked him to take it down, so Synology was the most logical guess. Quote
diegot Posted November 30, 2015 #5 Posted November 30, 2015 Thank you. My Gen8 now idle at 1600Mhz. Can it go lower? Quote
htc2010 Posted January 5, 2016 #6 Posted January 5, 2016 omg, THANK YOU too! I almost gave up on this when I could no longer find the shell scripts. After applying the procedure, my Celeron J based ASROCK board is now at 1.3GHz as opposed to 1.9GHz. That's not quite the savings I was hoping for but is that where it should be? Or Quote
Huberer Posted February 25, 2016 #8 Posted February 25, 2016 Thanks, it works great with my Asrock N3150-ITX (Intel Celeron N3150) Quote
NeoID Posted February 26, 2016 #9 Posted February 26, 2016 I assume this is only for people installing XPenology on a physical device? Anyone tried using a throttle script for ESXi or another hypervisor? Looks like XPenology is using quite a lot of CPU (unnecessarily), but I haven't had the time to take a deeper look at it yet. Quote
Huberer Posted February 26, 2016 #10 Posted February 26, 2016 So I made a test with this script and the result surprised me: Power consumption with script: CPU idle and HDD's run: 22,8-23 watt CPU idle and HDD's spin down: around 15,1 watt Power consumption without script: CPU idle and HDD's run: 22,0 - 22,1 watt CPU idle and HDD's idle: 12,3 - 12,4 watt Test with a Profitec KD 302 to measure the power consumption. My hardware is in my signatur. So I guess that this how-do is out of time and only valid for older XPEnology and DSM-firmware. If your really want to use it just test the power consumption if its good for your hardware or not. In my case I don't use it. Quote
brantje Posted February 26, 2016 #11 Posted February 26, 2016 Shall i post this tutorial on xpenology.us for future reference? Posted via Xpenology.us Quote
Huberer Posted February 26, 2016 #12 Posted February 26, 2016 I guess this script is useless with the latest DSM-firmware. The powermanagement within DSM works better instead of the script. Just my two cents. With older XPEnology and DSM maybe it's a good workaround for powermanagement but not with the latest ones. Just look at the power consumption of my "NAS" I posted one befor yours. Quote
htc2010 Posted February 27, 2016 #13 Posted February 27, 2016 When you run the command to show current CPU frequency after running the script, does it show a lower frequency, or same frequency? So I made a test with this script and the result surprised me: Power consumption with script: CPU idle and HDD's run: 22,8-23 watt CPU idle and HDD's spin down: around 15,1 watt Power consumption without script: CPU idle and HDD's run: 22,0 - 22,1 watt CPU idle and HDD's idle: 12,3 - 12,4 watt Test with a Profitec KD 302 to measure the power consumption. My hardware is in my signatur. So I guess that this how-do is out of time and only valid for older XPEnology and DSM-firmware. If your really want to use it just test the power consumption if its good for your hardware or not. In my case I don't use it. Quote
Huberer Posted February 27, 2016 #14 Posted February 27, 2016 When the script is running with the command "grep "MHz" /proc/cpuinfo" it show 480MHz when the cpu is idling and 1600MHz under load and the steps in between (for all four cores and MHz varies for the single cores when cpu is working). But without script the before mentioned command only shows 1600MHz for all four cores. Even when the cpu is idling. Under GSM GUI it shows when the cpu is idling or working (shows speedstep). I guess that the command doesn't show the real frequency (without script) but DSM is doing it correctly. That means that is better watching DSM GUI instead of watching the grep "MHz" /proc/cpuinfo - command. In another forum a user wrote that this script also had no effect on his N40L. But I don't know which DSM and XPEnology he used. Quote
htc2010 Posted February 27, 2016 #15 Posted February 27, 2016 That is such a good insight. With such a small community working on these Xpenology boxes under varying conditions, it is very difficult to determine what is best practice. It might actually be the case that for most scenarios, relying on the GUI is more accurate than trying to rely on the CLI to understand what is going on "under the hood." I'm going to go look for something I can measure the actual power usage with so I can get a better understanding! Quote
Oliveiras Posted June 8, 2016 #16 Posted June 8, 2016 Hello, Can I use this script with 5.2-5592 ? Thanks Quote
yaroslava Posted July 3, 2016 #17 Posted July 3, 2016 It looks like since 5.2 5644 (Update 8 at least) the cpu governor are available any more. Any idea how to get around it and lower the CPU power consumption? Thanks, Quote
Schmill Posted July 4, 2016 #18 Posted July 4, 2016 5.2 5967 Update 1 here and the CPU throttle script still seems to be working its magic. I have 'upgraded' my way to here though, so perhaps it relied on something that was in earlier versions and now not present? Quote
yaroslava Posted July 5, 2016 #19 Posted July 5, 2016 In my case it was a new install plus I have an Intel CPU. Basically the ...cpu0/cpufreq/scaling_governor files do not exist any more and thus the governor cannot be set. On the same machine I had those entries on xpeno 5.2 5592.2 (boot loader and synology) but now on bootlolader 5644.5 and syno 5664 update 8 the CPU is always running at max speed... Quote
maxime Posted July 21, 2016 #20 Posted July 21, 2016 It doesn't work for me. I don't understand where is the problem... My DSM is 5.2-5967 Update 1 I think I did it right, but simply doesn't work; look the image on the url. Can anybody help me? https://dl.dropboxusercontent.com/u/10545630/Cattura.jpg Quote
komarto Posted July 22, 2016 #21 Posted July 22, 2016 (edited) Hi, please run : cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors this will show you available governors, then select the one you like and edit the script. there are 2 governors because this kernel uses intel_pstate Edited July 27, 2016 by Guest Quote
maxime Posted July 23, 2016 #22 Posted July 23, 2016 Hi, please run : cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors this will show you available governors, the select the one you like and edit the script. there are 2 governors because this kernel uses intel_pstate Done. It says: performance powersave And now? I'm sorry, I'm not so advanced.. Could you please show me what I have to do? Quote
Balrog Posted July 24, 2016 #23 Posted July 24, 2016 Change the script so it matches the available powersave governor. Example: /usr/local/etc/rc.d/S99Powersaving.sh Script-content: #!/bin/sh echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor Make the script executable (look above this thread or "chmod a+x scriptname.sh"). Afterwards run it or reboot. Quote
yaroslava Posted July 24, 2016 #24 Posted July 24, 2016 Any idea how to throttle the CPU if the folder structure for the CPU does not exist? After upgrading to 5664 and the latest 5967 I don't have cpuX/cpufreq/ entries anymore on a GT1610T Celeron CPU: Diskstation> ls -lR /sys/devices/system/cpu/cpu0 /sys/devices/system/cpu/cpu0: drwxr-xr-x 6 root root 0 Jul 25 01:13 cache -r-------- 1 root root 4096 Jul 25 01:15 crash_notes -r-------- 1 root root 4096 Jul 25 01:15 crash_notes_size drwxr-xr-x 2 root root 0 Jul 25 01:15 power lrwxrwxrwx 1 root root 0 Jul 25 01:15 subsystem -> ../../../../bus/cpu drwxr-xr-x 2 root root 0 Jul 25 01:13 topology -rw-r--r-- 1 root root 4096 Jul 25 01:13 uevent Thanks! Quote
rmtang Posted August 1, 2016 #25 Posted August 1, 2016 Change the script so it matches the available powersave governor.Example: /usr/local/etc/rc.d/S99Powersaving.sh Script-content: #!/bin/sh echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor echo powersave > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor Make the script executable (look above this thread or "chmod a+x scriptname.sh"). Afterwards run it or reboot. Thank you for this point. I did some modification on the script. But seems it still doesn't work. DS-B85> grep Hz /proc/cpuinfo model name : Intel® Celeron® CPU G1820T @ 2.40GHz cpu MHz : 2400.187 model name : Intel® Celeron® CPU G1820T @ 2.40GHz cpu MHz : 2400.187 DS-B85> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors performance powersave DS-B85> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave DS-B85> cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors performance powersave DS-B85> cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor powersave DS-B85> cat /usr/local/etc/rc.d/S99PowersavingINTEL.sh #!/bin/sh for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); do if ! grep -q 'powersave' $c/cpufreq/scaling_governor ; then echo powersave >$c/cpufreq/scaling_governor ; fi done Any suggestion? Thanks. G1820T+B85 runs 5.2-5967-2 Quote
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.