You are not logged in.

#1 2007-05-05 23:27:40

jeffmikels
Member
Registered: 2007-04-19
Posts: 36

How do I automatically spin down the hard drive to save power?

I have searched for this in the wiki and the forums, so if I've missed something, please point it out to me, but is there a way to have Arch automatically spin down hard drives and/or suspend the machine to ram to save power? I'm not really interested in the full suspend to disk because I don't think my BIOS will do a wake on lan, and I'm trying to run a home server here.

Anyway, I'm just looking for ways to save on my electricity usage. Any ideas?


...using Arch as a home server since 2006.

Offline

#2 2007-05-06 03:49:45

raymano
Member
Registered: 2006-10-13
Posts: 357
Website

Re: How do I automatically spin down the hard drive to save power?

Install the laptop-mode-tools package from extra and add laptop-mode in the list of DAEMONS in /etc/rc.conf. This will automatically do all the energy saving stuff when running on battery.


FaunOS: Live USB/DVD Linux Distro: http://www.faunos.com

Offline

#3 2007-05-06 03:52:45

jeffmikels
Member
Registered: 2007-04-19
Posts: 36

Re: How do I automatically spin down the hard drive to save power?

Oops. Perhaps I wasn't clear. I'm running a home server and want to enable power saving features on it. This is not a laptop. There is no battery. I just want to do my part to protect the environment!


...using Arch as a home server since 2006.

Offline

#4 2007-05-06 05:45:04

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How do I automatically spin down the hard drive to save power?

My way is to run Larch from flash boot and boot into ram...no HDD, no CD, no floppy, just flash on USB.

If I need a HDD or CD/DVD, run them on usb/IDE adapter..  I have mobo with many USB ports in use but no PCI cards, hdd's, nor cd/dvd.

The mobo runs 65 watts and the LCD 50 max...shut it(lcd) off when not using the computer.

Have 2GB of ram with pentiumD processor, use flash for swap if needed.

Just my way to reduce the cost of my energy use....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2007-05-06 07:26:14

mcover
Member
From: Germany
Registered: 2007-01-25
Posts: 134

Re: How do I automatically spin down the hard drive to save power?

If the HD is just used for storage, hdparm is your friend. with hdparm -S you can set the timeout until the disk spins down.

If its a system disk hdparm will work too, but the HD will spin up after 2 secs (or less, depending on your HD) again because of the OS accessing the disk (logs, journal etc). Laptop-mode-tools works very well on laptops because it automatically sets the journal-rewrite time, file-write-cache size and the time when new data gets written to the disk. If you are not reading anything or anything thats not in the cache, it works very well - but thats on laptops. I tried using laptop-mode-tools on my desktop, but without luck (yes, it detected that i wasnt using a laptop).

You could try using cpudyn with the cpu-idling stuff disabled (option  -i 0). I know it has a feature that spins down a specific HD after a certain amount of time. But i don't know for sure if cpudyn automatically remounts the HD, so that it caches all the write activity (like laptop-mode-tools).

Good luck.

Offline

#6 2007-05-06 07:35:57

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: How do I automatically spin down the hard drive to save power?

Yoy REALLY shouldn't spindown _Desktop_ harddrives!

spindown every 10 mins harddrive dies in 1-2 years, while laptop harddrive takes the same abuse for 6 years...

Offline

#7 2007-05-06 08:40:56

Lontronics
Member
Registered: 2006-08-28
Posts: 121

Re: How do I automatically spin down the hard drive to save power?

Offline

#8 2007-05-06 09:07:48

mcover
Member
From: Germany
Registered: 2007-01-25
Posts: 134

Re: How do I automatically spin down the hard drive to save power?

Mikko777 wrote:

Yoy REALLY shouldn't spindown _Desktop_ harddrives!

spindown every 10 mins harddrive dies in 1-2 years, while laptop harddrive takes the same abuse for 6 years...

He said it was a server, therefore it might be a good idea to spin down the HD. Not for 10mins but maybe for 12+ hrs. Depending on what kind of server it is. If its a file-server with frequent access to it - dont spin down. If its a router - yes, spin the HD down.

Offline

#9 2007-05-06 09:57:06

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: How do I automatically spin down the hard drive to save power?

mcover wrote:
Mikko777 wrote:

Yoy REALLY shouldn't spindown _Desktop_ harddrives!

spindown every 10 mins harddrive dies in 1-2 years, while laptop harddrive takes the same abuse for 6 years...

He said it was a server, therefore it might be a good idea to spin down the HD. Not for 10mins but maybe for 12+ hrs. Depending on what kind of server it is. If its a file-server with frequent access to it - dont spin down. If its a router - yes, spin the HD down.

Even for a router, he'd have to make sure cron and various logging systems are turned off, or the hdd will periodically spin up anyway.

Given that it's a desktop hdd, you're probably better off leaving it running the whole time.

James

Offline

#10 2007-05-06 12:33:50

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: How do I automatically spin down the hard drive to save power?

you could suspend to ram:

 echo "mem" >/sys/power/state

Offline

#11 2007-05-06 15:10:12

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: How do I automatically spin down the hard drive to save power?

Offline

#12 2007-05-07 19:26:11

jeffmikels
Member
Registered: 2007-04-19
Posts: 36

Re: How do I automatically spin down the hard drive to save power?

Thanks for all your input. It sounds to me that the consensus is for not spinning down the drives unless they won't be used for a long time. Is there some guideline on how long of an interval is optimal?

I guess the question would be, how much life is taken off a drive in one spindown/spinup cycle?


...using Arch as a home server since 2006.

Offline

Board footer

Powered by FluxBB