site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jul 21, 2009, at 19:00, Andre-John Mas wrote: -- Soren Spies CoreOS::IOTeam _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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. This email sent to site_archiver@lists.apple.com