All of lore.kernel.org
 help / color / mirror / Atom feed
* linux disk access when idle
@ 2009-08-20 16:35 Matt Garman
  2009-08-20 18:45 ` Richard Scobie
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Matt Garman @ 2009-08-20 16:35 UTC (permalink / raw)
  To: linux-raid


The scope of this question is probably broader than Linux RAID, but
I thought I'd try here before going to the LKML...

I have a fileserver/NAS box that has four Western Digital GreenPower
drives in software RAID-5 (i.e. Linux md).  There was some noise
about these drives not too long ago: when used under Linux, they
tend to have really high (and rapidly increasing) SMART
Load_Cycle_Count values[1].

Basically, in order to save power, these drives park the read/write
heads after so many seconds of inactivity.  According to
SilentPCReview[2], the 1 TB model uses 5.7W when idle and only 3.7W
when the heads are unloaded.  Apparantly, each head parking event
causes teh Load_Cycle_Count value to increase.

Most people seek to disable this head parking behavior to stop that
Load_Cycle_Count value from growing alarmingly high.  I actually
want to use it to it's full potential.

I've got a Kill-A-Watt electricity meter connected to my NAS box.  I
see a difference of 10 watts power usage when the heads park (I can
hear them unload, so I know when it happens).  Allowing for some
power supply inefficiency, I'd say my observation is consistent with
SPCR's numbers.

The problem is, the drives don't stay in this parked state very
long.  I haven't actually timed the state changes, but average power
consumption over a long time (e.g. a week or more) is at the higher
(i.e. +10) level.

So I figure, something is accessing these drives shortly after the
heads park, causing them to un-park (and increasing power
consumption).  But this machine is idle 95% of the time.  And even
then, the overwhelming majority of the accesses are reads, with very
few writes (literally, a handful of writes per week).

So what I'm trying to figure out is, what is causing the disk
access?  It could be any one of:

    - Kernel
    - RAID subsystem (i.e. md)
    - XFS filesystem
    - NFS
    - Samba
    - ???

I'm hoping someone has enough knowledge of these systems to point me
in the right direction for tuning things.  The goal is that when the
machine is idle, it is "truly" idle, meaning, no disk accesses take
place and the heads can stay parked (thus saving energy).

Thank you,
Matt

LINKS:
[1] http://groups.google.com/group/linux.kernel/browse_thread/thread/505ccf760023d132/7e4f4e996f911efd

[2] http://www.silentpcreview.com/article804-page2.html


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

* Re: linux disk access when idle
  2009-08-20 16:35 linux disk access when idle Matt Garman
@ 2009-08-20 18:45 ` Richard Scobie
  2009-08-21 16:59   ` Matt Garman
  2009-08-21  6:42 ` Henry, Andrew
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 23+ messages in thread
From: Richard Scobie @ 2009-08-20 18:45 UTC (permalink / raw)
  To: Matt Garman; +Cc: linux-raid

Matt Garman wrote:

> So what I'm trying to figure out is, what is causing the disk
> access?  It could be any one of:
> 
>     - Kernel
>     - RAID subsystem (i.e. md)
>     - XFS filesystem
>     - NFS
>     - Samba
>     - ???

Are you running smartd? It polls the drives every 30minutes.

Regards,

Richard

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

* RE: linux disk access when idle
  2009-08-20 16:35 linux disk access when idle Matt Garman
  2009-08-20 18:45 ` Richard Scobie
@ 2009-08-21  6:42 ` Henry, Andrew
  2009-08-21  8:17   ` Jon Hardcastle
  2009-08-21 17:22   ` Matt Garman
  2009-08-21 22:00 ` Bill Davidsen
  2009-08-22  5:02 ` Kyle Liddell
  3 siblings, 2 replies; 23+ messages in thread
From: Henry, Andrew @ 2009-08-21  6:42 UTC (permalink / raw)
  To: Matt Garman, linux-raid

I had a similar issue, as I wanted to take full advantage of parking heads but they kept coming alive again.  I was putting them to sleep with hdparm.

I gave up at the end, but thought I had read that it was likely syslog or other internals that were polling the disc too frequently.  Sorry Im a bit vague on the details.

If this was the case (I didn't really investigate) then I thought, stuff it, because I wanted syslog to keep doing it's thing.

--andrew


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

* RE: linux disk access when idle
  2009-08-21  6:42 ` Henry, Andrew
@ 2009-08-21  8:17   ` Jon Hardcastle
  2009-08-21 16:35     ` Foster_Brian
  2009-08-21 17:22   ` Matt Garman
  1 sibling, 1 reply; 23+ messages in thread
From: Jon Hardcastle @ 2009-08-21  8:17 UTC (permalink / raw)
  To: Matt Garman, linux-raid, AndrewHenry




--- On Fri, 21/8/09, Henry, Andrew <andrew.henry@logica.com> wrote:

> From: Henry, Andrew <andrew.henry@logica.com>
> Subject: RE: linux disk access when idle
> To: "Matt Garman" <matthew.garman@gmail.com>, "linux-raid" <linux-raid@vger.kernel.org>
> Date: Friday, 21 August, 2009, 7:42 AM
> I had a similar issue, as I wanted to
> take full advantage of parking heads but they kept coming
> alive again.  I was putting them to sleep with hdparm.
> 
> I gave up at the end, but thought I had read that it was
> likely syslog or other internals that were polling the disc
> too frequently.  Sorry Im a bit vague on the details.
> 
> If this was the case (I didn't really investigate) then I
> thought, stuff it, because I wanted syslog to keep doing
> it's thing.
> 
> --andrew
> 
> --
> 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
> 

I did this with the data drives in my array - never managed it with the system drives though.

You need to tell smartd to not poll if the drives are asleep and also tell syslog not to poll too often. 

There is some for of flag you can apply to see write requests and the application that is doing them.......?

BUT a curious problem I have - and have NEVER really solved is that when a drive is asleep if a scheduled smart check runs - the drive doesn't wake up quickly enough so smart brands the drive as 'incapable of a smart test' and sends me a warning email.... every single time...

-----------------------
N: Jon Hardcastle
E: Jon@eHardcastle.com
'Do not worry about tomorrow, for tomorrow will bring worries of its own.'
-----------------------


      
--
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] 23+ messages in thread

* RE: linux disk access when idle
  2009-08-21  8:17   ` Jon Hardcastle
@ 2009-08-21 16:35     ` Foster_Brian
  2009-08-21 17:31       ` Matt Garman
  0 siblings, 1 reply; 23+ messages in thread
From: Foster_Brian @ 2009-08-21 16:35 UTC (permalink / raw)
  To: Jon, matthew.garman, linux-raid, andrew.henry

> There is some for of flag you can apply to see write requests and the
> application that is doing them.......?
> 

You might find this useful:

echo 1 > /proc/sys/vm/block_dump

Then watch your syslog files...

Brian

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

* Re: linux disk access when idle
  2009-08-20 18:45 ` Richard Scobie
@ 2009-08-21 16:59   ` Matt Garman
  2009-08-21 17:01     ` Ric Wheeler
  2009-08-22  6:33     ` Goswin von Brederlow
  0 siblings, 2 replies; 23+ messages in thread
From: Matt Garman @ 2009-08-21 16:59 UTC (permalink / raw)
  To: linux-raid

On Fri, Aug 21, 2009 at 06:45:45AM +1200, Richard Scobie wrote:
> Matt Garman wrote:
>> So what I'm trying to figure out is, what is causing the disk
>> access?  It could be any one of:
>>
>>     - Kernel
>>     - RAID subsystem (i.e. md)
>>     - XFS filesystem
>>     - NFS
>>     - Samba
>>     - ???
>
> Are you running smartd? It polls the drives every 30minutes.

I was running smartd, until I received your post :)

Unfortunately, this does not help keep the heads parked any longer.

Nonetheless, thank you for the hint.

Matt


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

* Re: linux disk access when idle
  2009-08-21 16:59   ` Matt Garman
@ 2009-08-21 17:01     ` Ric Wheeler
  2009-08-22 21:04       ` Matt Garman
  2009-08-22  6:33     ` Goswin von Brederlow
  1 sibling, 1 reply; 23+ messages in thread
From: Ric Wheeler @ 2009-08-21 17:01 UTC (permalink / raw)
  To: Matt Garman; +Cc: linux-raid

On 08/21/2009 12:59 PM, Matt Garman wrote:
> On Fri, Aug 21, 2009 at 06:45:45AM +1200, Richard Scobie wrote:
>    
>> Matt Garman wrote:
>>      
>>> So what I'm trying to figure out is, what is causing the disk
>>> access?  It could be any one of:
>>>
>>>      - Kernel
>>>      - RAID subsystem (i.e. md)
>>>      - XFS filesystem
>>>      - NFS
>>>      - Samba
>>>      - ???
>>>        
>> Are you running smartd? It polls the drives every 30minutes.
>>      
> I was running smartd, until I received your post :)
>
> Unfortunately, this does not help keep the heads parked any longer.
>
> Nonetheless, thank you for the hint.
>
> Matt
>
>
>    
I think that you can use blktrace to see who is issuing the IO's that 
spin up your drives....

ric



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

* Re: linux disk access when idle
  2009-08-21  6:42 ` Henry, Andrew
  2009-08-21  8:17   ` Jon Hardcastle
@ 2009-08-21 17:22   ` Matt Garman
  1 sibling, 0 replies; 23+ messages in thread
From: Matt Garman @ 2009-08-21 17:22 UTC (permalink / raw)
  To: Henry, Andrew; +Cc: linux-raid

On Fri, Aug 21, 2009 at 08:42:09AM +0200, Henry, Andrew wrote:
> I had a similar issue, as I wanted to take full advantage of
> parking heads but they kept coming alive again.  I was putting
> them to sleep with hdparm.
> 
> I gave up at the end, but thought I had read that it was likely
> syslog or other internals that were polling the disc too
> frequently.  Sorry Im a bit vague on the details.
> 
> If this was the case (I didn't really investigate) then I thought,
> stuff it, because I wanted syslog to keep doing it's thing.

Good to know.  I should have mentioned, however, that my RAID5
drives are just for data storage.  The OS (and therefore syslog and
friends) is actually on a compact flash card (using one of those
compact flash to IDE converters).

Thanks,
Matt


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

* Re: linux disk access when idle
  2009-08-21 16:35     ` Foster_Brian
@ 2009-08-21 17:31       ` Matt Garman
  0 siblings, 0 replies; 23+ messages in thread
From: Matt Garman @ 2009-08-21 17:31 UTC (permalink / raw)
  To: Foster_Brian; +Cc: Jon, linux-raid, andrew.henry

On Fri, Aug 21, 2009 at 12:35:19PM -0400, Foster_Brian@emc.com wrote:
> > There is some for of flag you can apply to see write requests and the
> > application that is doing them.......?
> > 
> 
> You might find this useful:
> 
> echo 1 > /proc/sys/vm/block_dump
> 
> Then watch your syslog files...

Thank you.  That along with Ric Wheeler's suggestion of blktrace
ought to help me get to the bottom of this.

Thanks again!
Matt


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

* Re: linux disk access when idle
  2009-08-20 16:35 linux disk access when idle Matt Garman
  2009-08-20 18:45 ` Richard Scobie
  2009-08-21  6:42 ` Henry, Andrew
@ 2009-08-21 22:00 ` Bill Davidsen
  2009-08-21 23:10   ` Matt Garman
  2009-08-22  5:02 ` Kyle Liddell
  3 siblings, 1 reply; 23+ messages in thread
From: Bill Davidsen @ 2009-08-21 22:00 UTC (permalink / raw)
  To: Matt Garman; +Cc: linux-raid

Matt Garman wrote:
> The scope of this question is probably broader than Linux RAID, but
> I thought I'd try here before going to the LKML...
>
> I have a fileserver/NAS box that has four Western Digital GreenPower
> drives in software RAID-5 (i.e. Linux md).  There was some noise
> about these drives not too long ago: when used under Linux, they
> tend to have really high (and rapidly increasing) SMART
> Load_Cycle_Count values[1].
>
> Basically, in order to save power, these drives park the read/write
> heads after so many seconds of inactivity.  According to
> SilentPCReview[2], the 1 TB model uses 5.7W when idle and only 3.7W
> when the heads are unloaded.  Apparantly, each head parking event
> causes teh Load_Cycle_Count value to increase.
>
> Most people seek to disable this head parking behavior to stop that
> Load_Cycle_Count value from growing alarmingly high.  I actually
> want to use it to it's full potential.
>
> I've got a Kill-A-Watt electricity meter connected to my NAS box.  I
> see a difference of 10 watts power usage when the heads park (I can
> hear them unload, so I know when it happens).  Allowing for some
> power supply inefficiency, I'd say my observation is consistent with
> SPCR's numbers.
>
> The problem is, the drives don't stay in this parked state very
> long.  I haven't actually timed the state changes, but average power
> consumption over a long time (e.g. a week or more) is at the higher
> (i.e. +10) level.
>
> So I figure, something is accessing these drives shortly after the
> heads park, causing them to un-park (and increasing power
> consumption).  But this machine is idle 95% of the time.  And even
> then, the overwhelming majority of the accesses are reads, with very
> few writes (literally, a handful of writes per week).
>
>   
/proc/sys/vm/dirty_expire_centisecs still set to 30 sec?

> So what I'm trying to figure out is, what is causing the disk
> access?  It could be any one of:
>
>     - Kernel
>     - RAID subsystem (i.e. md)
>     - XFS filesystem
>     - NFS
>     - Samba
>     - ???
>
> I'm hoping someone has enough knowledge of these systems to point me
> in the right direction for tuning things.  The goal is that when the
> machine is idle, it is "truly" idle, meaning, no disk accesses take
> place and the heads can stay parked (thus saving energy).
>
> Thank you,
> Matt
>
> LINKS:
> [1] http://groups.google.com/group/linux.kernel/browse_thread/thread/505ccf760023d132/7e4f4e996f911efd
>
> [2] http://www.silentpcreview.com/article804-page2.html
>
> --
> 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
>
>   


-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc

"You are disgraced professional losers. And by the way, give us our money back."
    - Representative Earl Pomeroy,  Democrat of North Dakota
on the A.I.G. executives who were paid bonuses  after a federal bailout.



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

* Re: linux disk access when idle
  2009-08-21 22:00 ` Bill Davidsen
@ 2009-08-21 23:10   ` Matt Garman
  2009-08-21 23:13     ` Carl A. Cook
  2009-08-22  5:04     ` Tapani Tarvainen
  0 siblings, 2 replies; 23+ messages in thread
From: Matt Garman @ 2009-08-21 23:10 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-raid

On Fri, Aug 21, 2009 at 06:00:43PM -0400, Bill Davidsen wrote:
> /proc/sys/vm/dirty_expire_centisecs still set to 30 sec?

$ cat /proc/sys/vm/dirty_expire_centisecs
2999

Yup.  Maybe I don't understand exactly what this does, but if the
drives are idle (i.e. no reads or writes) for say an hour or more,
why would there be any dirty data to flush?

That's why I'm confused---this machine literally goes for hours at a
time without and read or write attemps on these drives.

-Matt


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

* Re: linux disk access when idle
  2009-08-21 23:10   ` Matt Garman
@ 2009-08-21 23:13     ` Carl A. Cook
  2009-08-22  1:41       ` berk walker
  2009-08-22  5:04     ` Tapani Tarvainen
  1 sibling, 1 reply; 23+ messages in thread
From: Carl A. Cook @ 2009-08-21 23:13 UTC (permalink / raw)
  To: linux-raid


I haven't followed this whole thread, but there is some aspect of ext3 journalling which hits that disk with regularity.  Obviously not a write flush, but some sort of check out of insecurity or something.


On Friday 21 August 2009 16:10:39 Matt Garman wrote:
> On Fri, Aug 21, 2009 at 06:00:43PM -0400, Bill Davidsen wrote:
> > /proc/sys/vm/dirty_expire_centisecs still set to 30 sec?
> 
> $ cat /proc/sys/vm/dirty_expire_centisecs
> 2999
> 
> Yup.  Maybe I don't understand exactly what this does, but if the
> drives are idle (i.e. no reads or writes) for say an hour or more,
> why would there be any dirty data to flush?
> 
> That's why I'm confused---this machine literally goes for hours at a
> time without and read or write attemps on these drives.
> 
> -Matt
> 
> --
> 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] 23+ messages in thread

* Re: linux disk access when idle
  2009-08-21 23:13     ` Carl A. Cook
@ 2009-08-22  1:41       ` berk walker
  2009-08-22  2:07         ` John Robinson
  0 siblings, 1 reply; 23+ messages in thread
From: berk walker @ 2009-08-22  1:41 UTC (permalink / raw)
  To: Carl A. Cook; +Cc: linux-raid

I thought it was just a trait of the animal.  My Linux systems have 
always done disk access every few seconds, 24/7. From '92 on.
b-



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

* Re: linux disk access when idle
  2009-08-22  1:41       ` berk walker
@ 2009-08-22  2:07         ` John Robinson
  2009-08-22  4:28           ` Richard Scobie
  0 siblings, 1 reply; 23+ messages in thread
From: John Robinson @ 2009-08-22  2:07 UTC (permalink / raw)
  To: berk walker; +Cc: linux-raid

On 22/08/2009 02:41, berk walker wrote:
> I thought it was just a trait of the animal.  My Linux systems have 
> always done disk access every few seconds, 24/7. From '92 on.

Not necessarily. I don't know what they did to achieve it, but Netgear's 
ReadyNAS devices can be configured to park the drives when they're left 
alone, it works (unless you're using SqueezeCenter), and they're 
Linux-based.

Cheers,

John.


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

* Re: linux disk access when idle
  2009-08-22  2:07         ` John Robinson
@ 2009-08-22  4:28           ` Richard Scobie
  0 siblings, 0 replies; 23+ messages in thread
From: Richard Scobie @ 2009-08-22  4:28 UTC (permalink / raw)
  To: John Robinson; +Cc: berk walker, linux-raid

John Robinson wrote:

> Not necessarily. I don't know what they did to achieve it, but Netgear's 
> ReadyNAS devices can be configured to park the drives when they're left 
> alone, it works (unless you're using SqueezeCenter), and they're 
> Linux-based.

As I understand it, the ReadyNAS uses XFS.

Regards,

Richard

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

* Re: linux disk access when idle
  2009-08-20 16:35 linux disk access when idle Matt Garman
                   ` (2 preceding siblings ...)
  2009-08-21 22:00 ` Bill Davidsen
@ 2009-08-22  5:02 ` Kyle Liddell
  3 siblings, 0 replies; 23+ messages in thread
From: Kyle Liddell @ 2009-08-22  5:02 UTC (permalink / raw)
  To: Matt Garman; +Cc: linux-raid

On Thu, 2009-08-20 at 11:35 -0500, Matt Garman wrote:
> So what I'm trying to figure out is, what is causing the disk
> access?  It could be any one of:
> 
>     - Kernel
>     - RAID subsystem (i.e. md)
>     - XFS filesystem
>     - NFS
>     - Samba
>     - ???

For one, syslogd.  
It's probably worthwhile to look up information for laptop power saving.
In particular, laptop-mode in the kernel, and laptop-mode-tools:
http://samwel.tk/laptop_mode
I use this on my laptop, and I don't think I ever have a "surprise" disk
spinup.  The whole laptop-mode-tools setup is probably much more than
you want, but it's a good place to start.  The FAQ there also mentions
how to get syslog to stop syncing to disk.  
You may also find 'lm-profiler' useful - this will tell you the which
process is causing disk accesses.  Finally, for general power saving,
'powertop' tracks the power state information for your CPU, and will
list the processes that are causing your CPU to come out of any
sleep/idle states.




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

* Re: linux disk access when idle
  2009-08-21 23:10   ` Matt Garman
  2009-08-21 23:13     ` Carl A. Cook
@ 2009-08-22  5:04     ` Tapani Tarvainen
  2009-08-22  6:37       ` Goswin von Brederlow
  2009-08-24 18:07       ` Billy Crook
  1 sibling, 2 replies; 23+ messages in thread
From: Tapani Tarvainen @ 2009-08-22  5:04 UTC (permalink / raw)
  To: linux-raid

Just a data point: I've got a box (Debian Lenny) with five disks,
system disk plus 4-disk RAID5 array, used as a backup server
(rsnapshot), and I power the disks in the raid array down after
running the backup - and they stay powered down, even though I don't
umount the filesystems let alone stop the array. When accessed (like
for restoring something from the backup), they wake up, so I've got an
hourly cron job powering them down again - but most days (when
there're no restores) they are powered up only during the backup run.

So it can be done. It's not filesystem type dependent either, there's
one jfs and one ext3 in the array.

The system disk stays up, though. Some experimenting suggested
that getting it to stay down would require putting /tmp and parts
of /var on a ramdisk (/var/log at least), but I didn't go to
the trouble of tracking down all disk-awakening services.

-- 
Tapani Tarvainen

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

* Re: linux disk access when idle
  2009-08-21 16:59   ` Matt Garman
  2009-08-21 17:01     ` Ric Wheeler
@ 2009-08-22  6:33     ` Goswin von Brederlow
  1 sibling, 0 replies; 23+ messages in thread
From: Goswin von Brederlow @ 2009-08-22  6:33 UTC (permalink / raw)
  To: Matt Garman; +Cc: linux-raid

Matt Garman <matthew.garman@gmail.com> writes:

> On Fri, Aug 21, 2009 at 06:45:45AM +1200, Richard Scobie wrote:
>> Matt Garman wrote:
>>> So what I'm trying to figure out is, what is causing the disk
>>> access?  It could be any one of:
>>>
>>>     - Kernel
>>>     - RAID subsystem (i.e. md)
>>>     - XFS filesystem
>>>     - NFS
>>>     - Samba
>>>     - ???
>>
>> Are you running smartd? It polls the drives every 30minutes.
>
> I was running smartd, until I received your post :)
>
> Unfortunately, this does not help keep the heads parked any longer.
>
> Nonetheless, thank you for the hint.
>
> Matt

Smartd has an option not to wake up disks. If you have smartd scann
less often than the suspend time of the disk then idle disk can spinn
down and stay that way.

MfG
        Goswin

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

* Re: linux disk access when idle
  2009-08-22  5:04     ` Tapani Tarvainen
@ 2009-08-22  6:37       ` Goswin von Brederlow
  2009-08-24 18:07       ` Billy Crook
  1 sibling, 0 replies; 23+ messages in thread
From: Goswin von Brederlow @ 2009-08-22  6:37 UTC (permalink / raw)
  To: linux-raid

Tapani Tarvainen <raid@tapanitarvainen.fi> writes:

> Just a data point: I've got a box (Debian Lenny) with five disks,
> system disk plus 4-disk RAID5 array, used as a backup server
> (rsnapshot), and I power the disks in the raid array down after
> running the backup - and they stay powered down, even though I don't
> umount the filesystems let alone stop the array. When accessed (like
> for restoring something from the backup), they wake up, so I've got an
> hourly cron job powering them down again - but most days (when
> there're no restores) they are powered up only during the backup run.
>
> So it can be done. It's not filesystem type dependent either, there's
> one jfs and one ext3 in the array.
>
> The system disk stays up, though. Some experimenting suggested
> that getting it to stay down would require putting /tmp and parts
> of /var on a ramdisk (/var/log at least), but I didn't go to
> the trouble of tracking down all disk-awakening services.

Same here. I have a raid1 for the system on 2 drives and a raid5 over
6 drives for data. The raid5 is ext3 powers down after 15 minutes
without access. The raid1 stays up all the time due to /var/log/syslog
being written to too often. /tmp is tmpfs though.

MfG
        Goswin

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

* Re: linux disk access when idle
  2009-08-21 17:01     ` Ric Wheeler
@ 2009-08-22 21:04       ` Matt Garman
  2009-08-23 18:23         ` Bill Davidsen
  2009-08-26 19:45         ` Matt Garman
  0 siblings, 2 replies; 23+ messages in thread
From: Matt Garman @ 2009-08-22 21:04 UTC (permalink / raw)
  To: Ric Wheeler; +Cc: linux-raid

On Fri, Aug 21, 2009 at 01:01:48PM -0400, Ric Wheeler wrote:
> On 08/21/2009 12:59 PM, Matt Garman wrote:
>>>> So what I'm trying to figure out is, what is causing the disk
>>>> access?  It could be any one of:
>>>>
>>>>      - Kernel
>>>>      - RAID subsystem (i.e. md)
>>>>      - XFS filesystem
>>>>      - NFS
>>>>      - Samba
>>>>      - ???
>>>>        
>>> Are you running smartd? It polls the drives every 30minutes.
>>    
> I think that you can use blktrace to see who is issuing the IO's
> that  spin up your drives....

For five hours today, I ran blktrace on md1 as well as the drives
that make up md1 (sd[a-d]).  I also enabled block dump via

    echo 1 > /proc/sys/vm/block_dump

Nothing.  Neither block_dump nor blktrace recorded anything on md1
or sd[abcd].  I caught one instance where the heads parked (I both
heard them park as well as saw the power meter show the 10 watt
drop).  They only stayed parked for about five minutes.  Yet neither
blktrace nor block_dump caught anything.

I'm going to try lm-profiler now (from the laptop-mode-tools
package), but I have low expectations.

I'm beginning to think that it's not even direct access to the
drives that cause the heads to unpark, e.g. perhaps even activity on
my system drive (a compact flash card connected to the PATA port)
prevents the data drives from parking their heads.


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

* Re: linux disk access when idle
  2009-08-22 21:04       ` Matt Garman
@ 2009-08-23 18:23         ` Bill Davidsen
  2009-08-26 19:45         ` Matt Garman
  1 sibling, 0 replies; 23+ messages in thread
From: Bill Davidsen @ 2009-08-23 18:23 UTC (permalink / raw)
  To: Matt Garman; +Cc: Ric Wheeler, linux-raid

Matt Garman wrote:
> On Fri, Aug 21, 2009 at 01:01:48PM -0400, Ric Wheeler wrote:
>   
>> On 08/21/2009 12:59 PM, Matt Garman wrote:
>>     
>>>>> So what I'm trying to figure out is, what is causing the disk
>>>>> access?  It could be any one of:
>>>>>
>>>>>      - Kernel
>>>>>      - RAID subsystem (i.e. md)
>>>>>      - XFS filesystem
>>>>>      - NFS
>>>>>      - Samba
>>>>>      - ???
>>>>>        
>>>>>           
>>>> Are you running smartd? It polls the drives every 30minutes.
>>>>         
>>>    
>>>       
>> I think that you can use blktrace to see who is issuing the IO's
>> that  spin up your drives....
>>     
>
> For five hours today, I ran blktrace on md1 as well as the drives
> that make up md1 (sd[a-d]).  I also enabled block dump via
>
>     echo 1 > /proc/sys/vm/block_dump
>
> Nothing.  Neither block_dump nor blktrace recorded anything on md1
> or sd[abcd].  I caught one instance where the heads parked (I both
> heard them park as well as saw the power meter show the 10 watt
> drop).  They only stayed parked for about five minutes.  Yet neither
> blktrace nor block_dump caught anything.
>
> I'm going to try lm-profiler now (from the laptop-mode-tools
> package), but I have low expectations.
>
> I'm beginning to think that it's not even direct access to the
> drives that cause the heads to unpark, e.g. perhaps even activity on
> my system drive (a compact flash card connected to the PATA port)
> prevents the data drives from parking their heads.
>   

Are you doing regular self test? I'm not sure if non-io connections 
would show using those tools, I just haven't tried them at that level.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc

"Now we have another quarterback besides Kurt Warner telling us during postgame
interviews that he owes every great thing that happens to him on a football
field to his faith in Jesus. I knew there had to be a reason why the Almighty
included a mute button on my remote."
			-- Arthur Troyer on Tim Tebow (Sports Illustrated)


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

* Re: linux disk access when idle
  2009-08-22  5:04     ` Tapani Tarvainen
  2009-08-22  6:37       ` Goswin von Brederlow
@ 2009-08-24 18:07       ` Billy Crook
  1 sibling, 0 replies; 23+ messages in thread
From: Billy Crook @ 2009-08-24 18:07 UTC (permalink / raw)
  To: Tapani Tarvainen; +Cc: linux-raid

On Sat, Aug 22, 2009 at 00:04, Tapani Tarvainen<raid@tapanitarvainen.fi> wrote:
> so I've got an
> hourly cron job powering them down again

What's in your cronjob?

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

* Re: linux disk access when idle
  2009-08-22 21:04       ` Matt Garman
  2009-08-23 18:23         ` Bill Davidsen
@ 2009-08-26 19:45         ` Matt Garman
  1 sibling, 0 replies; 23+ messages in thread
From: Matt Garman @ 2009-08-26 19:45 UTC (permalink / raw)
  Cc: linux-raid

On Sat, Aug 22, 2009 at 04:04:43PM -0500, Matt Garman wrote:
> I'm beginning to think that it's not even direct access to the
> drives that cause the heads to unpark, e.g. perhaps even activity
> on my system drive (a compact flash card connected to the PATA
> port) prevents the data drives from parking their heads.

This is correct.  One thing I noticed yesterday, when I was running
blktrace and having block_dump enabled: the heads *never* parked
during this time.  Even though I had zero accesses on the data
drives, the system drive was getting hit pretty heavily (because I
deliberately had syslog write the block_dump stuff).  When I finally
stopped all the heavy logging, I ran "sync" and noticed that a few
seconds later, the heads parked.

Almost exactly five minutes later, the heads un-parked.

I repeated: I ran the "sync" command, the heads unloaded, five
minutes later, they re-loaded.  I repeated this exactly several
times.

So I re-enabled block_dump (i.e. "echo 1 > /proc/sys/vm/block_dump"), 
but disabled syslog (so the system drive wouldn't be thrashed).  I
ran the "sync, then wait five minutes test": pdflush and kjournald
apparently caused the wakeup after five minutes.

I set my system drive to ext2 (instead of ext3) in /etc/fstab and
rebooted.  I was under the impression that using ext2 instead of
ext3 would eliminate the need for kjournald, but this doesn't appear
to be the case.

So, based on what I've seen so far, there's some "five minute thing"
going on that involves pdflush and/or kjournald.

-Matt


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

end of thread, other threads:[~2009-08-26 19:45 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 16:35 linux disk access when idle Matt Garman
2009-08-20 18:45 ` Richard Scobie
2009-08-21 16:59   ` Matt Garman
2009-08-21 17:01     ` Ric Wheeler
2009-08-22 21:04       ` Matt Garman
2009-08-23 18:23         ` Bill Davidsen
2009-08-26 19:45         ` Matt Garman
2009-08-22  6:33     ` Goswin von Brederlow
2009-08-21  6:42 ` Henry, Andrew
2009-08-21  8:17   ` Jon Hardcastle
2009-08-21 16:35     ` Foster_Brian
2009-08-21 17:31       ` Matt Garman
2009-08-21 17:22   ` Matt Garman
2009-08-21 22:00 ` Bill Davidsen
2009-08-21 23:10   ` Matt Garman
2009-08-21 23:13     ` Carl A. Cook
2009-08-22  1:41       ` berk walker
2009-08-22  2:07         ` John Robinson
2009-08-22  4:28           ` Richard Scobie
2009-08-22  5:04     ` Tapani Tarvainen
2009-08-22  6:37       ` Goswin von Brederlow
2009-08-24 18:07       ` Billy Crook
2009-08-22  5:02 ` Kyle Liddell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.