Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question to a developer ?

Hello,


As many people, I try to prevent the (programmed) death of my external hard drives by allowing them to stop spinning when they are not required (in system preferences > Energy saver > put the hard disk(s) to sleep when possible.


This is a nice work around the fragility and crappy components used in today's hardware.


But this also the best way to drive you out of your mind, for example when you are simply browsing in Safari, and all in a sudden, Mac OS decides it absolutely needs to check something that is on one of your idling external disks, and not only you don't understand why it would have anything to do with these drives, but also you get stuck waiting there until your drive finishes to start up again before being able to continue browsing. This doesn't happen only in safari : Mac OS seems to have been designed to "randomly" need to use your external drives even if there is no apparent reason for it to need them. Sometimes the drives even start up one AFTER the other, making the unnecessary waste of time even more enjoyable!


I am sure everyone can agree the decision to have this work this way, was not taken on a very productive meeting in Apple Developement seminaire in the Caribbean.


So I would really enjoy an answer to :

• why would my computer need to access an external hard drive to load a page in a browser (it works fine when my drives are not plugged in you know..)

• why did a developer team think it would be a good idea to simply BLOCK all possible user activity, and just leave him hang there until the drive he never even asked for in the first place finishes spinning back up


Peace 🙂

MBP 20'' AtomicBlast 8,7Ghz X16 | 160Go ram | Dual-solid drive 10 To |, Mac OS X (10.6.3), ATI Graphics Infinite 10 902 (8Go)

Posted on Jun 1, 2011 6:06 AM

Reply
Question marked as Best reply

Posted on Jun 1, 2011 6:47 AM

Since this is a user forum and there aren't any Apple employees, I'll respond, but from the standpoint of being a sometimes Linux kernel hacker...


First, spinning down drives isn't hedge against hardware failure, but an energy-saving feature. Truth is that spinning down drives doesn't impact hardware life. When drives are spun down, there's clearly no mechanical wear, but the act of spinning them up or down produces more wear than leaving them spinning. In the end, the increased wear of spin up/down is offset by the reduced wear of the idle state -- meaning the setting has no net benefit (or detriment) with regard to wear on the drive. Energy-wise, though, the impact can be substantial.


With regard to drive access... UNIX systems in general, and including OS X, use a considerable amount of caching on disk I/O. Writes can queue for a while and may flush when caches fill or when the system idles, and reads will be from cache unless the cache is polluted or an object isn't in a cache. Web browsers in particular do astonishing amounts of I/O - each graphical element is a file, cookies are stored in a database, Javascript can have local storage, Flash can write temporary files, documents are cached, images and links are preloaded, etc.


That said, most of those cache misses will affect the boot-disk. If other drives (like externals) are spinning up, then it may be any number of causes. First, there's periodic tasks that run in the background that defragment files, refresh indexes, etc. If you have security software, it will periodically enumerate disks for scanning (waking everything up), and there are models of external drives (mostly cheap USB models) that require that they be polled periodically or they go to sleep entirely and disconnect.


Disk accesses are generally asynchronous, however, and should not affect the browser. The only reason that it would block is if the browser is making a request for disk enumeration. That would only happen if the page has Flash or Java content that requests it. Normal HTML wouldn't have that issue. Unfortunately, both Flash and Java (not JavaScript) do have features whereby they internally request and accounting of all the attached volumes. When they make that request, they block the browser until the function returns. You could always ask Adobe or Oracle to address that.

4 replies
Question marked as Best reply

Jun 1, 2011 6:47 AM in response to Leberger Jacob

Since this is a user forum and there aren't any Apple employees, I'll respond, but from the standpoint of being a sometimes Linux kernel hacker...


First, spinning down drives isn't hedge against hardware failure, but an energy-saving feature. Truth is that spinning down drives doesn't impact hardware life. When drives are spun down, there's clearly no mechanical wear, but the act of spinning them up or down produces more wear than leaving them spinning. In the end, the increased wear of spin up/down is offset by the reduced wear of the idle state -- meaning the setting has no net benefit (or detriment) with regard to wear on the drive. Energy-wise, though, the impact can be substantial.


With regard to drive access... UNIX systems in general, and including OS X, use a considerable amount of caching on disk I/O. Writes can queue for a while and may flush when caches fill or when the system idles, and reads will be from cache unless the cache is polluted or an object isn't in a cache. Web browsers in particular do astonishing amounts of I/O - each graphical element is a file, cookies are stored in a database, Javascript can have local storage, Flash can write temporary files, documents are cached, images and links are preloaded, etc.


That said, most of those cache misses will affect the boot-disk. If other drives (like externals) are spinning up, then it may be any number of causes. First, there's periodic tasks that run in the background that defragment files, refresh indexes, etc. If you have security software, it will periodically enumerate disks for scanning (waking everything up), and there are models of external drives (mostly cheap USB models) that require that they be polled periodically or they go to sleep entirely and disconnect.


Disk accesses are generally asynchronous, however, and should not affect the browser. The only reason that it would block is if the browser is making a request for disk enumeration. That would only happen if the page has Flash or Java content that requests it. Normal HTML wouldn't have that issue. Unfortunately, both Flash and Java (not JavaScript) do have features whereby they internally request and accounting of all the attached volumes. When they make that request, they block the browser until the function returns. You could always ask Adobe or Oracle to address that.

Jun 1, 2011 7:02 AM in response to J D McIninch

Hey J D


I appreciate your explanations.

Indeed I am aware that browsers need the boot drive a lot to load pages, it just didn't make any sense for the other external drives, until you explained that thing about java and flash needing a drive count.


Since you seem to be quite the geek (in the noble and expert sense of the word), I will follow your advice and forbid my drives from going idle. This should allow me to focuse more on my work and less on refraining of throwing chairs and barbecues in the face of my computer when it decides to take a break.


Again, thanks for your explanations ! The decision for it to work that way still seems to me badly thought though !


Jacob

Jun 12, 2011 4:03 PM in response to Leberger Jacob

Console seems to indicate that Safari is requesting a font for a webpage that didn't show up in FontBook or has some problem with it, and it's polling the harddrives to find it.


This drives me out of my mind...I have a big storage array and a few portables, so whenever it decides to do this I'm waiting a good 60secs for 10 drives to spin up one at a time.


If anyone here knows a convenient way to completely block access to a drive (leaving it plugged in, but mount/dismount quickly from the keyboard or something), or has an app that will keep them spun up at least for an hour or 2 at a time, let me know.


HDD's spinning down after 2min are almost certainly responsible for 20-23% of the world's homicides.

Jun 12, 2011 4:21 PM in response to Leberger Jacob

n/m SpindownHD.app in the Apple Developer CHUD package lets you set spindown times. I wish there was a way to block programs from accessing external data, like a Lil Snitch type program that prevents Safari from asking the OS for some irrelevant font in the first place.

(I'm running Safari 5.1 in OSX 10.7 at the moment, and it's not fixed there either...I'm not sure I even understand the need for more than 3 fonts in Safari anyway...the more stuff I disable—like fonts and Flash and Shockwave and Java—the better my life gets online.)

Question to a developer ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.