Re: Algorithm for deciding when to wake a drive?
Re: Algorithm for deciding when to wake a drive?
- Subject: Re: Algorithm for deciding when to wake a drive?
- From: Soren Spies <email@hidden>
- Date: Tue, 21 Jul 2009 19:19:39 -0700
On Jul 21, 2009, at 19:00, Andre-John Mas wrote:
I have a user complaining that one of his hard-disks is spinning up
when he is not expecting it. What algorithm does Darwin/MacOS X use
to decide when to wake a drive? For example is it when the file
system is accessed or a specific volume, or does it vary based on
certain conditions?
Basically, any I/O to the drive that is not in the cache will cause it
to spin up. Unfortunately, much code (including in Apple's
frameworks) likes to call statfs() on each and every filesystem any
time an Open/Save dialog comes up, an application launches, etc. I
can't remember for sure, but in my experience this often seems to spin
drives up.
sudo fs_usage -w -f filesys
will show which filesystem calls are occurring and the elapsed time in
the third to last column might allow your user to figure out which
system call had to wait for the disk to spin up. It may then be
possible to use dtrace to figure out the stack trace leading to the I/
O and thus roughly where to assign blame / how to reproduce the problem.
Feel free to report a bug to Apple; it's always good for us to hear
how users are impacted by the behaviors of our systems.
--
Soren Spies
CoreOS::IOTeam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden