Green computing?

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Sat Dec 04, 2010 11:15 am

Not really. If there's an ACPI option, activate it, should be enough. If there is a wakeup time set in BIOS, make sure it is cleared. Set APM to off to be sure there's no conflict.

If you can send your machine to S3 ("Standy" in Windows), you should be all set.

You can do one additional test: After echo `date ..... run this one to check if the alarm time is set correctly:

Code: Select all

cat /proc/driver/rtc


or, for the second method:

Code: Select all

cat /sys/class/rtc/rtc0/wakealarm
/jayrock

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Green computing?

Postby bigfoot65 » Sat Dec 04, 2010 11:21 am

Hey...the first option worked....it turned on :D

Awesome job. No wonder if it works for all machines.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Sat Dec 04, 2010 11:39 am

OK, good!

Here's my current idea on minimum features:

- Have a list of client MAC addresses
- Have a list of scheduled wake periods
- Both lists are XML so that it's easily accessible, ie, others can write to it.
- The system powers off if none of the clients responds to a pinged and the system is out of any wake period
- Clients wake the server using standard WOL

And features for future development:
- Tiny Windows client for WOL (have it already ;-) )
- Configurable idle timers
- Move to full blown ACPI
- GUI for fiddling with the scheduled wake periods list
- ....???

What do you think?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Green computing?

Postby bigfoot65 » Sat Dec 04, 2010 11:50 am

Sounds great. Consider documenting all this in the wiki. Good place for sharing and tracking progress.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

hfl
Posts: 18
Joined: Sun Oct 31, 2010 3:53 pm

Appreciate your help to make this work (spin down idle HDD)

Postby hfl » Mon Jan 03, 2011 2:24 pm

Configuration:
SAMSUNG HD154UI /dev/sda ;boot disk and some shares
WDC WD10EADS-00L5B1 /dev/sdb ;more shares - not yet set up
Both disks are SATA in case it matters.

First, I like to start by spinning down any idle disk - for "saving" power but also to reduce unecessary temperature/noise (disk and case fan). I also assume that mass-consumer disks last longer if not run 24/7?

To spin down idle disks I tried "hdparm -S 240 /dev/sda" (and sdb) but this does not work. Questions:
1) or would the command (for SATA) be "sdparm --set=STANDBY"?
2) the HDD LED goes on every so often - could it mean regular log activity from applications?
3) For persistance does the command need to be added into /etc/rc.local ?

Googling gives ideas here and there but if I prefer avoiding try & error and a lot of time on this. What is your advice to silence those disks when not used? Any help greatly appreciated ...

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Mon Jan 03, 2011 2:58 pm

Attached is the script I personally use. Just copy as root to /etc/init.d and chmod +x it

The value of 240 looks a bit high to me, what standby time to you want to set? I use 12 which means 1 minute.

Cheers, jayrock

EDIT (***SUPERSEDED BY EDIT2)

Sorry I was a bit brief in the installation instructions. Here's more details. As root, run:

- Unzip to some folder
- Make sure to edit the script to point to your disks, I have sda, sdb and sdc, you may have more or less disks, or different names
- "cp hdd-pm.sh /etc/init.d/hdd-pm"
- "chmod +x /etc/init.d/hdd-pm"
- "chkconfig -add hdd-pm"

To test, you can also run "service hdd-pm start". All has to be done as root.

EDIT2: Attached an updated script. After I got some more experience I set the idle time to two minutes. Also the script now scans for drives automatically, ie no need to edit the script as in step 23 above

Installations instructions:

- Unzip to some folder
- "cp hdd-pm.sh /etc/init.d/hdd-pm"
- "chmod +x /etc/init.d/hdd-pm"
- "chkconfig -add hdd-pm"

To test, you can also run "service hdd-pm start". All has to be done as root.
Attachments
hdd-pm.sh.gz
(471 Bytes) Downloaded 217 times
Last edited by jayrock on Sun Feb 20, 2011 5:49 am, edited 3 times in total.

hfl
Posts: 18
Joined: Sun Oct 31, 2010 3:53 pm

Re: Green computing?

Postby hfl » Mon Jan 03, 2011 3:33 pm

Thank you very much. I will try it (again with hdparm). Is 1 minute not very short, i.e. does the hdd not start and stop all the time?

Assuming the unit is "5 seconds" then S240 equals to 20 minutes ...

For my information: What mechanism invokes this script, and who inputs the parameter?

About /dev/sda/ (the system disk) I wonder if it can spin down / suspend by normal means if some applications keep bothering it (for unecessary log file writes)? Would I have to trace the culprit(s) and then how? Would I have to give up and get a small SDD just for the system?

fl

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Mon Jan 03, 2011 3:39 pm

One minute is fine for me, because either the disk is used or not. I'm streaming music and video.

The relation between the value and the time is non-linear, it's described somewhere in the man pages. I think 240 is even more than 20 minutes.

Regarding
For my information: What mechanism invokes this script, and who inputs the parameter?
just copy the file as I said, and make modifications to the value as you whish. Or maybe I don't understand your question.

/jayrock

hfl
Posts: 18
Joined: Sun Oct 31, 2010 3:53 pm

Closing thoughts ...

Postby hfl » Sat Jan 08, 2011 3:50 am

I tried your's and various other potential cures but this disk does not spin down. However, continuing troubleshooting under in this "suggestions" forum is the wrong place so I stop here ...

Coming back to my initial suggestion, now I think it is even more valid. For some reason the system accesses the disk every 5-10 seconds so it cannot go idle. The ability for going green needs to be "designed in", and surpasses a lamda user like me to retrofit on.

Thank you very much in advance for giving it consideration.

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Green computing?

Postby jayrock » Sat Jan 08, 2011 3:59 am

Ok, so where else to continue? It works for me, my disks spin down, I can hear it and see it on a power meter. So I guess we need to find out what's different with your system. For instance, does disk spin down work under Windows?

/jayrock

Who is online

Users browsing this forum: No registered users and 13 guests