Author Topic: Hard Drive Spin Down... How to set??  (Read 6271 times)

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Hard Drive Spin Down... How to set??
« on: August 23, 2011, 06:39:34 pm »
I was wondering if anyone knows how to properly set the spin down time for an Ubuntu software raid.  In my case I have 7 X 2TD seagate SATA drives running in a raid6.  The raid is mounted under /mnt and is used just for storing media files. 

I would like to know how to make the raid array spin down after lets say 15 minutes of idle time.  I tried using the setting in webmin which allows you to set spin down time, but it is not working.


In general I wish there was a little more drive management under zentyal dashboard.

Sam Graf

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #1 on: August 23, 2011, 07:02:29 pm »
That's an interesting idea for storage that isn't mission critical, and I've never looked at it like that before. But my hunch (for what it's worth) is that most business users of Zentyal will not want server drives spinning down. If nothing else, the general trend is to keep fewer machines busier.

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: Hard Drive Spin Down... How to set??
« Reply #2 on: August 23, 2011, 07:15:49 pm »
I was thinking of that as well.  However I just read an article about tiered storage which divides how storage is setup up depending on how mission critical it is and IOPS.  The bottom tier which is just long term storage or backup storage it was talking about how price and energy efficiency along with capacity play a factor.  For those drives you would want them to spin down when not being used which equals energy savings. ---- on the top tier you would wants something like SSD or some 15k SAS drives.

A small business has similar requirements.... a lot of businesses only have heavy work load between 8 - 5, but after that the work load probably drops off a lot.... especially once its gets really late.  I would think that those businesses would be concerned with how much they are paying in electricity and about how long the physical components inside the server will last.  Having a drive spin down lets say an hour after being idle would not only cut down on electricity costs, but also increase the longevity of the drive.  It is not like you need access to your /Home directory instantly every minute of every day.... if for some reason you do come in in the middle of the night you can wait 10 seconds for that drive or array to spin up.  During the day however the drives will probably never be idle long enough for them to spin down.....

Any thoughts on this??

christian

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #3 on: August 23, 2011, 07:27:49 pm »
What's about "hdparm"?
Be cautious while using it to set values  ;)

robb

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #4 on: August 23, 2011, 07:43:09 pm »
HDPARM is the default way to spindown drives yes.

On a dutch techsite I always lurk around, there is a nice thread about linux and energie savings: http://gathering.tweakers.net/forum/list_messages/1439595/0

Also a thread about low energie servers and low energie ESXi servers:
http://gathering.tweakers.net/forum/list_messages/1207455/
http://gathering.tweakers.net/forum/list_messages/1455241

Although it is in dutch, with google translate you should be able to get some info from those threads.

Sam Graf

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #5 on: August 23, 2011, 08:00:57 pm »
If we're talking about saving power during off hours (rather than off minutes), my own casual thinking has been on the benefits of scheduled shutdowns and restarts of the whole server. But it seems to me it's not always a straightforward decision even as a business matter. Or maybe I'm just too lazy to grapple with it.

Consider that VDI is changing--or will change--the rules even for small businesses (Kaviza VDI-in-a-box markets a positive ROI starting at just 25 workstations). More and more people will have the freedom to work from home, and, to a degree, at their convenience. The shift to the cloud means less local storage, and if true, small business servers will shift to performing infrastructure tasks (I think before it's all done, I'll be able to include virtualization as an infrastructure task, and most of the productivity applications will run on some sort of private cloud). The business landscape is changing quarterly even for SMBs, it seems to me.

But as a practical matter, if my doable goal was to conserve consumables during off hours and work toward greener operations (servers tend to outlive their usefulness already, so extending hardware life isn't high on my priority list, even if shutting down has that effect rather than the reverse) in an SMB context, I would look at what it took to shut down and restart servers, not just drives.

That said, I'm not helping at all with the original question, so I better duck out ...

christian

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #6 on: August 23, 2011, 08:39:40 pm »
Interesting debate nevertheless Sam  ;)
It's funny to see around SMBs debates that are rather oriented toward large to very large organizations.
HSM (Hierarchical Storage Management) is one of these.

I'm totally convinced that starting/stopping servers will shorter server durability.
Then does it make sense to change, by script, drive spin speed? To be compared with low "green" drives? You have now drives up to 2Tb costing very few (look at Samsung green model f.i). As you have more data for less spindle, it's very efficient from energy saving standpoint. Drawback is that no one will take the risk to store that amount of data on one single drive. so it consumes at least twice the minimum  ;D ;D

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Hard Drive Spin Down... How to set??
« Reply #7 on: August 24, 2011, 03:15:28 pm »
sceduled  shutdowns take down the whole server... as   sceduled  spindowns only  cost you  access time...

you can still access data from a spin(ned?) down disk, even if it may take some time   ... drive spin up + access time + readtime...     but thats on off-hours...  where speed is less important... 

what if your employees want to work at home finishing that assignement   - you'l never know then the kids have showerd and brought to bed...  so you wont know when the server needs to be online...    disk spindown after x minutes  ... from  x hour to  y hour  would be a  good  in-between...   compared to   24h full load..
All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: Hard Drive Spin Down... How to set??
« Reply #8 on: August 24, 2011, 03:35:11 pm »
Have any of you actually set disk spin down time on your Zentyal Servers?? 

I have googled the code to perform the operation, but I remember about six month ago I tried implementing drive spin down and was getting odd behavior..... the disk would try to spin down, but then would right away spin up again... it was very strange

christian

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #9 on: August 24, 2011, 03:35:42 pm »
Is there anyone able to provide any figure quantifying savings based on number of drive (I know it will be different depending on disk brand and model)?
I'm just curious because something that could be significant on large datacentre might be almost invisible for SMB with few disks.
Remember that we discuss mechanical speed here: disk power consumption is made of mechanical consumption and electronic consumption. Reducing spin speed only affect mechanical part, assuming you keep it low enough to balance the overhead due to reactivation to normal speed.

On large data centres, after complete shut down, it's often advised not to start all disk cabinets at the same time because such big storage cabinets are consuming much more (many times more) at start up time than when idle.

I'm not saying that trying to make some saving is useless but only try to put thinks in the right perspective, reason why some study would be welcome before starting with plan like "schedule spin down"  8)

Once you've got the "magic" study, look at figures with new "green" drives... or hybrid drives with SSD inside  ;)

Sam Graf

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #10 on: August 24, 2011, 03:59:51 pm »
sceduled  shutdowns take down the whole server... as   sceduled  spindowns only  cost you  access time...

Well, and that's what I said. But if we're talking appreciable energy savings, letting SMB server drives spin down doesn't seem to me a robust approach. If we're operationally efficient, the drives will sleep relatively little during the day, and we won't have all that many drives on line in the first place.

And I question the idea that spinning down drives "only" costs access time, especially in a virtual environment (do I really want my XenServer routinely waiting for its storage pool to wake up?). In the case of Zentyal and services like Squid, do I want the drives to have to spin up on access? Write operations in RAID 1 already represent objectionable overhead to some; do I want to add drive spin-up to that overhead?

I still find the idea of some sort of mechanism for putting secondary storage to sleep interesting, I get that. But just in terms of my own humble opinion, Zentyal's value isn't appreciably enhanced by including tools to set up a sleep time for its drives. If we're talking about significant power savings, we want to talk about stuff like thin clients and efficient servers and fewer of them, somehow, and ways Zentyal does or can contribute to those types of scenarios. Again, just IMHO.

Have any of you actually set disk spin down time on your Zentyal Servers?? 

I have googled the code to perform the operation, but I remember about six month ago I tried implementing drive spin down and was getting odd behavior..... the disk would try to spin down, but then would right away spin up again... it was very strange
Maybe software RAID and/or journaling file systems use slow I/O opportunities ... ? But no, I haven't given that a try on a Zentyal server so I have no real world experience.

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Hard Drive Spin Down... How to set??
« Reply #11 on: August 24, 2011, 08:02:46 pm »
lets say that you own a office  with 200 users.  and 2 storage-servers (redundant setup).. 
with both  a 10 drive rai6 array... for thair data  (boot disk not included)..     spinning down the disk   coud save you  20 disks in total ... 

im not talking about  spinning them down whil having coffee brakes  but after  5 pm till  8am  you coul perfectly  spin down your disk  and  reduce power on your cpu    it may not save you  thousands of dollars,  but   there are actually guidelines in some countries   that can give you a tax-benefit if your buissness is co2-netrall...  saving energy might than be a precious thin.. 
All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

christian

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #12 on: August 24, 2011, 09:17:50 pm »
ichat,

I'm not saying that nothing can be done. For sure anything to reduce energy consumption is good.
However, in your example, take in account that you will "only" reduce (and not to zero  :() energy due to mechanical part. Your disks will still consume same energy due to electronic.

10 drives for 200 users is already a huge amount of storage unless disk size is on the low side. Then replacing your Gb disks with Tb disks will bring more benefit in term of energy consumption because of less spindle. Of course there is an impact in term of performance  :'(
Another track is to move from 3.5" disks to 2.5". Because of smaller plates, energy saving on the mechanical part is significant, especially at start-up time.

Sam Graf

  • Guest
Re: Hard Drive Spin Down... How to set??
« Reply #13 on: August 24, 2011, 09:21:56 pm »
Save energy. Absolutely.

if anything, my point is just that Zentyal isn't necessarily missing a significant feature here. I suspect the actual amount of energy reduction is too little relative to other, similar approaches (e.g., putting whole servers on standby or even shutting down anything not needed for nighttime operations). Just because powering down servers might be a bad idea from an operations point of view (which I admitted at the start) doesn't automatically mean that Zentyal should offer tools for spinning down drives as part of a genuine carbon-neutral solution, IMHO. To me, that would be like saying keeping the amount of installed RAM as low as possible is a responsible approach an energy-conscious SMB should take, so Zentyal should provide RAM usage tweaking tools.

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: Hard Drive Spin Down... How to set??
« Reply #14 on: August 24, 2011, 10:07:06 pm »
I like reading this thread .... even though it never actually answered my question 100% hahaha

I do like how it turned into a feature and server setup discussion !!!!

In my case my test server is just at home and it idles probably 85% of the time..... this is why I was thinking of drive spin down for just my storage array (not my OS drives or mail or squid or even /Home directory drive)...... my storage pool is for long term storage that only gets accessed maybe an hour a day and  is not the kind of storage that gets accessed all the time. 

It is setup of large disks and because its software raid could migrate to a different small server using very different hardware.... so my storage array could outlive my server hardware.

Perhaps in a true work environment it would make sense for your storage pull to not spin down, but than again I think it depends on the business and what that storage pull is used for.  These days it is pretty easy and for relatively low cost stuff enough drives into a server to have your own small multi-teared storage setup.  With the use of SSD disks for high speed intensive IOPS tasks; 10K drives for /Home directory; and slow 7200 or 5400 drives for long term archive storage.  Most businesses have to meet regulations and have to store data for a significant amount of time.  However this data store only gets accessed once in a while and the delay associated with disk spin up time does not matter.

anyway those are my thoughts..... perhaps there is not enough of a savings in either money or time between disk failures for a small business or even a home user to be concerned with drive spin down.