• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Algorithm for deciding when to wake a drive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Algorithm for deciding when to wake a drive?


  • Subject: Re: Algorithm for deciding when to wake a drive?
  • From: David Elliott <email@hidden>
  • Date: Wed, 22 Jul 2009 18:26:02 -0400

Hi,

On Jul 21, 2009, at 10:19 PM, Soren Spies wrote:


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.

One other notable thing to check are the "Places" within the finder. If you have any folder references stashed in there then you might need to remove them.


A potential workaround is to make a folder called Links or something like that in your home directory and put that in Places. Inside of that put normal aliases to your oft-used folders located on other drives.

This was causing me all kinds of problems when I had a folder from an NFS-mapped drive in there. The eventual workaround was to use the server's FQDN and make sure it would not resolve outside of my home network. But even then I found I had little delays doing just about anything in Finder so I finally took the link out of my Places and things are a lot better now.

I believe one of the Finder enhancements with Leopard was that it is now "multithreaded" in the sense that it at least won't hang the UI when trying to get at network drives or spun-down drives. Instead it will show the spinner inside the window while it waits. But it still apparently WILL hang the UI if any folders on these drives are referenced in the Places section. That code path seems to still be waiting on results before updating the UI.

-Dave

_______________________________________________
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


References: 
 >Algorithm for deciding when to wake a drive? (From: Andre-John Mas <email@hidden>)
 >Re: Algorithm for deciding when to wake a drive? (From: Soren Spies <email@hidden>)

  • Prev by Date: Re: Algorithm for deciding when to wake a drive?
  • Next by Date: Sending SCSI commands in Mac OS X
  • Previous by thread: Re: Algorithm for deciding when to wake a drive?
  • Next by thread: Sending SCSI commands in Mac OS X
  • Index(es):
    • Date
    • Thread