New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

inactive hard drive shut down

Want new functionality in Bubba? Discuss it here.
Locked
green-vette
Posts: 3
Joined: 11 Jun 2007, 17:33
Location: USA
Contact:

inactive hard drive shut down

Post by green-vette »

Sirs:

Why must Bubba's hard drive be always on (spinning)? My loyal Bubba is nearly always up and running, only shut down for severe thunder storms. However, it is actually reading/writeing only a tiny fraction of the time. Would it be possible/practical to spin down Bubba's HD when not in use, as is done on laptops? The energy savings as well as increasing the longevity of the HD would seem to make this a practical idea.

I would be glad to buy a new circuit board for this feature.

Thank You

green-vette
albert
Posts: 69
Joined: 09 Jul 2007, 14:35
Location: The Netherlands

Post by albert »

The idea that a drive will last longer when spinned down when not in use is actually not completely true. In fact spinning a drive up and down regularly will decrease it's life. Considering that bubba is not really a power-hungry device I wouldn't bother. Shutting it down during thunderstorms is one of the exceptions where I would spin it down too.

Another point is that modern operating systems write logs to files on a regular basis (every few minutes) which would make your drive spin up and down every few minutes, that will certainly kill the drive in the end. Also, the swap area is on the disk, that's where stuff is put from memory when not in use or when bubba runs out of physical memory.
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

green-vette,

albert is correct in that spinning down the disk will most likely shorten the lifeaspan of the disk. These disks are have specified how many spin-up/downs they are guaranteed to last. Spinnig up and down actually wears more on the disk than leaving it on.

Because of that you have to make sure that the disk stays spun down long enough for making it possible for us to give the guarantee we do today. And our tests showed that we could not keep the disk spun down long enough for that. If we wanted to have samba enabled we could not get long enough spun down times. This might change in the future and we are looking into it since this is a feature we really want to support. And if you really want to do this its not very hard to do your self. But be warned that the result could be a premature "death" of your harddrive.

(The reason that its more feasable on laptops are that their disks are built to sustain more spin up/downs.)

/Tor
Co-founder OpenProducts and Ex Excito Developer
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Post by Ubi »

I've been looking into this as well, as i noticed the hard drive is actually rather noisy sometimes. However, when Bubba is in full function, doing Samba as well as SMTP and POP, the harddisk is needed so often that spinning down is not feasible.

What I would propose is to use something like a powersave mode (rc4.d for example, it was designed for something like this) where all non-required processes are shut down except for SSH. The machine will then be ultra-efficient and can be quickly restated to full mode by changing runlevel. All I need for this is a runlevel command that can put the drive into spindown mode...
jcw
Posts: 12
Joined: 19 Aug 2007, 14:31

Post by jcw »

... or perhaps a future 2.5" HD based product? Even less power & noise, even without spindown.

I've used something similar based on a NSLU2 box + ext 2.5" usb disk (+ psu) - not as nice as having the HD built in, though.

-jcw
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Post by johannes »

We actually have considered a 2.5" mini-bubba, but we had to put that on ice since the 2.5" disks had so poor life times. It seems like they aren't designed for operating 24/7.

I think it would be a great product though. Perhaps we should re-open that track and see if disks have gotten any better, we'll see.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
msx
Posts: 106
Joined: 13 Jan 2007, 06:03
Location: Venice
Contact:

Post by msx »

and what about flash disks? that would make bubba completely silent.. i don't know the state of art of flash chips, but i think they should be raising in quality and lowering in price..

For example zonbu comes with no HD and 4 GB flash memory. I don't know its performances, but it is said to play back video and have a full X system so the flash memories should be enought fast and reliable.

Maybe it's not possible to reach 750 GB with flash, but perhaps 50 GB is :)
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Post by Ubi »

The problem with flash is the limited number of write cycles (a few 1000). Although this is plenty for storage, mp3s etc, it gets to be a problem when it is used as swap or in /var/
deltroo
Posts: 1
Joined: 27 Aug 2007, 04:09

Post by deltroo »

There is still no answer to the initial question.
Is it possible to automatically shutdown Bubba's HDD after some time of inactivity?

Can it be done from Linux or is it a "BIOS" feature?

Cheers
bjorn
Posts: 88
Joined: 03 Jan 2007, 09:02

Post by bjorn »

it can be done with the application "hdparm", it will spin down the disk after the configured amount of idle.

However the system will keep logging stuff to disk in a quite frequent (unless you tell it not to) and that will spin up the disk as soon as it has stopped...

what one would need to do is locate all apps that is logging and disable that functionality...

for example route all syslogs to /dev/null, turn off apache and mysql logging... if there's any other logging devices they would need to be shut down too.

/Bjorn
jcw
Posts: 12
Joined: 19 Aug 2007, 14:31

Post by jcw »

For someone willing to figure out all the details, you could:
- use hdparm to turn on automatic spindown when idle
- add an usb stick to contain a filesystem mounted as perhaps /var/ (so all periodic log writes go there)
- mount the hard disk with "noatime" so cached read accesses don't cause a write back to the disk (accurate file access times rarely matter)

The result would be silent operation when Bubba is idle. You'll also get spin-up delays, though - probably would be best to use 1 hr or so spindown, then the server will probably only go into low-power mode at night.

(I still think a 2.5" version, possibly dual- or quad-drive w/ RAID, would make a splendid product: 4x 300 Gb = nearly 1 Tb with RAID robustness)

-jcw
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

Hi,

Regarding spin down. if you are interested in this you should look up laptop mode and fx Laptop Mode Tools and maybe this article Kernel Korner - Extending Battery Life with Laptop Mode that talks about some of the problems and how to debug them.

Regarding flashdisks. This should be quite doable as long as one minimize writes to it as Ubi says. So running IO intense applications such as MySQL is probably out of the question. But to do this one should make sure that all logging and status info /var/log/* and /var/run/* is mounted on a ram file system.

/Tor
Co-founder OpenProducts and Ex Excito Developer
Locked