linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Save to use spindown?
@ 2006-01-21 17:46 Gerd Knops
  2006-01-21 20:21 ` Gordon Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Knops @ 2006-01-21 17:46 UTC (permalink / raw)
  To: linux-raid

Hi,

I have a RAID5 setup with 3 250GB SATA disks. Often the RAID is not  
accessed for days, so I wonder if I can extend the life of the disks  
by spinning them down, eg by setting the spindown timeout for the  
drives with hdparm -S nn.

The hdparm man page says "[after spindown] the drive may take as long  
as 30 seconds to respond to a subsequent disk access". Could that  
cause a timeout when accessing the disks, resulting in one or more  
disks being marked bad?

Thanks

Gerd


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Save to use spindown?
  2006-01-21 17:46 Save to use spindown? Gerd Knops
@ 2006-01-21 20:21 ` Gordon Henderson
  2006-01-21 21:32   ` Mark Hahn
  0 siblings, 1 reply; 6+ messages in thread
From: Gordon Henderson @ 2006-01-21 20:21 UTC (permalink / raw)
  To: Gerd Knops; +Cc: linux-raid

On Sat, 21 Jan 2006, Gerd Knops wrote:

> Hi,
>
> I have a RAID5 setup with 3 250GB SATA disks. Often the RAID is not
> accessed for days, so I wonder if I can extend the life of the disks
> by spinning them down, eg by setting the spindown timeout for the
> drives with hdparm -S nn.
>
> The hdparm man page says "[after spindown] the drive may take as long
> as 30 seconds to respond to a subsequent disk access". Could that
> cause a timeout when accessing the disks, resulting in one or more
> disks being marked bad?

Hi,

AIUI, It's generally safe to use spin-down. I used it for several years on
a RAID-1 set with good results.

However...

You have N disks in a RAID-X set, and you do a sequential read, it could
then takes N times the spin-up time before you can start to stream data
)-:

Or maybe, you get a little bit of data then a pause as the next disk spins
up, then more data, then a pause, and so on.

This may or may not be an issue for you though, but at between 10-20
seconds per disk could be come annoying quite quickly!

The other major issue is making sure they stay spun-down once you turn
them off. Using hdparm, while sounding like a good thing isn't actually
that good. Too many things running on your server will keep them going -
eg. ext3 likes to peek at the drives every 5 seconds (and it's probable
that other journaling FS's to some extent or other). Then there's
log-files - you'll need to go through syslog.conf and "-" every file to
suppress the fflush. And then the kernel just wants to flush its buffers
from time to time because it's in a good mood.

What I used was something called noflushd. It takes care of the kernel
buffer flush, by keeping it all in memory until theres no more memory.
This it worked well for me with ext2 and kernel 2.4.X. The down-side of
keeping all writes in memory is that if you have a power failure then
things can go quite wrong quite quickly... (I UPSd that particular box)

Get noflushd from: http://noflushd.sourceforge.net/

I retired that particular server after 3 years of use in a home office
environment and the new one has ext3 and doesn't spin down the disks
(yet!)

Gordon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Save to use spindown?
  2006-01-21 20:21 ` Gordon Henderson
@ 2006-01-21 21:32   ` Mark Hahn
  2006-01-22  2:10     ` John Hendrikx
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Hahn @ 2006-01-21 21:32 UTC (permalink / raw)
  To: linux-raid

> > accessed for days, so I wonder if I can extend the life of the disks
> > by spinning them down, eg by setting the spindown timeout for the

you seem to be assuming that the drives have a lifespan measured 
in hours-spinning.  that's not at all clear.  for instance, drives
are typically rated 40-50K start-stop cycles, which is ~40/day
over a 3-year service life.

you clearly do not want to auto-spindown unless you are sure that 
they'll spun-down for a fairly long time.  even ignoring delay in 
spinup...


> that good. Too many things running on your server will keep them going -
> eg. ext3 likes to peek at the drives every 5 seconds (and it's probable
> that other journaling FS's to some extent or other).

I don't believe ext3 will generate journal forces unless you do something
that generates data or journal IO.  for instance, atime updates are often
overlooked here.  I generally turn atime stuff off anyway.

> Then there's
> log-files - you'll need to go through syslog.conf and "-" every file to
> suppress the fflush.

often a good idea anyway, especially if your server generates lots of logs.
or how about logging to some other machine (which has additional advantages...)

> And then the kernel just wants to flush its buffers
> from time to time because it's in a good mood.

for some reason I don't tend to anthropomorphize the kernel ;)
but really, I can't think of any random, spontaneous flushes.
things like dirty pagecache stuff will get pdflushed on a clear 
schedule (/proc/sys/vm/*centiseconds).


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Save to use spindown?
  2006-01-21 21:32   ` Mark Hahn
@ 2006-01-22  2:10     ` John Hendrikx
  2006-01-22  6:12       ` Mark Hahn
  0 siblings, 1 reply; 6+ messages in thread
From: John Hendrikx @ 2006-01-22  2:10 UTC (permalink / raw)
  To: linux-raid

Mark Hahn wrote:
> you seem to be assuming that the drives have a lifespan measured in 
> hours-spinning.  that's not at all clear.  for instance, drives
> are typically rated 40-50K start-stop cycles, which is ~40/day
> over a 3-year service life.
>
> you clearly do not want to auto-spindown unless you are sure that 
> they'll spun-down for a fairly long time.  even ignoring delay in 
> spinup...
>   
Hm, 40-50k start-stop cycles?  That's far more than I would have 
thought.  I always figured that my hard drives would live longer if I 
kept them spinning instead of spinning them down even once a day.  Most 
of my drives at the moment are below 10 start-stop cycles, even though 
the array is only used very lightly for a few hours every day.

It sounds to me it might not be a bad idea for me to spin the drives 
down in my case.

>> that good. Too many things running on your server will keep them going -
>> eg. ext3 likes to peek at the drives every 5 seconds (and it's probable
>> that other journaling FS's to some extent or other).
>>     
>
> I don't believe ext3 will generate journal forces unless you do something
> that generates data or journal IO.  for instance, atime updates are often
> overlooked here.  I generally turn atime stuff off anyway.
>   
But accessing the drive will spin it up anyway, so why would it be 
prudent to turn atime off (apart from the fact that it is often not 
needed anyway)?

--John


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Save to use spindown?
  2006-01-22  2:10     ` John Hendrikx
@ 2006-01-22  6:12       ` Mark Hahn
  2006-01-22  7:11         ` Guy
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Hahn @ 2006-01-22  6:12 UTC (permalink / raw)
  To: John Hendrikx; +Cc: linux-raid

> of my drives at the moment are below 10 start-stop cycles, even though 
> the array is only used very lightly for a few hours every day.

but my point was that "very lightly" doesn't tell you how many start/stop
cycles.  if the spindown timeout is less than ~10 minutes, you _could_
hit 50K cycles over 3 years, even assuming only 8 hrs/day.  I'd feel 
uncomfortable coming within a factor of 2 of the start/stop rating...

> > I don't believe ext3 will generate journal forces unless you do something
> > that generates data or journal IO.  for instance, atime updates are often
> > overlooked here.  I generally turn atime stuff off anyway.
> >   
> But accessing the drive will spin it up anyway, so why would it be 
> prudent to turn atime off (apart from the fact that it is often not 
> needed anyway)?

but reading a cached file will update its atime.  with fileservers commonly
in the multi-GB range, many files are cached...

regards, mark hahn.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Save to use spindown?
  2006-01-22  6:12       ` Mark Hahn
@ 2006-01-22  7:11         ` Guy
  0 siblings, 0 replies; 6+ messages in thread
From: Guy @ 2006-01-22  7:11 UTC (permalink / raw)
  To: 'Mark Hahn', 'John Hendrikx'; +Cc: linux-raid

During a start and stop the disk's heads touch the surface.
At speed the heads glide on a cushion of air, and don't touch the surface.
AFAIK, the heads and surface don't wear while in use.

Also, if disks are anything like light bulbs, they will fail during start.
I have never seen a light bulb fail while on, only during on/off cycles.

I have seen disks go bad while in use.  But more often I see disks that were
fine, until the power is cycled.

Guy

} -----Original Message-----
} From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
} owner@vger.kernel.org] On Behalf Of Mark Hahn
} Sent: Sunday, January 22, 2006 1:12 AM
} To: John Hendrikx
} Cc: linux-raid@vger.kernel.org
} Subject: Re: Save to use spindown?
} 
} > of my drives at the moment are below 10 start-stop cycles, even though
} > the array is only used very lightly for a few hours every day.
} 
} but my point was that "very lightly" doesn't tell you how many start/stop
} cycles.  if the spindown timeout is less than ~10 minutes, you _could_
} hit 50K cycles over 3 years, even assuming only 8 hrs/day.  I'd feel
} uncomfortable coming within a factor of 2 of the start/stop rating...
} 
} > > I don't believe ext3 will generate journal forces unless you do
} something
} > > that generates data or journal IO.  for instance, atime updates are
} often
} > > overlooked here.  I generally turn atime stuff off anyway.
} > >
} > But accessing the drive will spin it up anyway, so why would it be
} > prudent to turn atime off (apart from the fact that it is often not
} > needed anyway)?
} 
} but reading a cached file will update its atime.  with fileservers
} commonly
} in the multi-GB range, many files are cached...
} 
} regards, mark hahn.
} 
} -
} To unsubscribe from this list: send the line "unsubscribe linux-raid" in
} the body of a message to majordomo@vger.kernel.org
} More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-22  7:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-21 17:46 Save to use spindown? Gerd Knops
2006-01-21 20:21 ` Gordon Henderson
2006-01-21 21:32   ` Mark Hahn
2006-01-22  2:10     ` John Hendrikx
2006-01-22  6:12       ` Mark Hahn
2006-01-22  7:11         ` Guy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).