Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why does my MacBook lock up while my external USB hard drive spins up? It comes right back after a click or two post spin-up. It's pretty annoying since finder often sniffs the drives but the USB drive is typically asleep since I use it mostly for backups.

Notes:

  • The clicking I refer to post spin-up is just a couple of head seeks. The external drive is new and I have several others that cause the same temporary freeze of the OS.

  • The hard drive works great, it goes to sleep because I have the OS configured to allow it to sleep when unused

  • I'd rather not plug and unplug the drive a few times a day (I use it for mostly but not exclusively backups)

  • I don't want the drive spinning all day.. it's usually idle and should be quietly sleeping awaiting work

The issue is I'm sure as Tom suggests that the OS is doing a synchronous I/O touch on every disk... am I expecting to much of a modern OS ? It's lame that any time I open a Finder window it freezes a ton of things for a few seconds... what happened to multi-tasking?

share|improve this question

migrated from stackoverflow.com Aug 18 '11 at 3:20

This question came from our site for professional and enthusiast programmers.

    
USB ? FireWire? ThunderBolt ? –  Thilo Aug 18 '11 at 1:25
    
It's a USB drive. –  Ram Aug 18 '11 at 1:33

1 Answer 1

up vote 1 down vote accepted

It locks up because it is waiting for a synchronous I/O request to finish, that request takes longer because your hard drive appears to be in not working smoothly, indicated by the clicks you hear.

Three options to remedy the problem:

  • Find a way to keep the drive from spinning down. A scheduled write, perhaps? Or an option?

  • Disconnect the drive and use it only when you need it for a manual back-up.

  • Get yourself a new drive, because it doesn't sound safe to put back-ups on such drive...

share|improve this answer
    
-1. Hard drive is working perfectly. In the question I explained why preventing spinning down is undesirable (noise, power waste). In the question I explained why disconnecting is undesirable. There is nothing wrong with the drive. –  Ram Sep 27 '11 at 19:32
    
@Ram: I don't understand your question anymore, you agreed with me in your last paragraph on the question only to down-vote me now? If you have a new question you should ask a new question, the answer to "Why does my macbook lock up while my external hard drive spins up?" has already been given and agreed upon... –  Tom Wijsman Sep 27 '11 at 20:29
    
I am having a tough time believing that a current OS goes into a synchronous block for a read only disk operation - it's bizarre; it is a reasonable theory and if were talking win 3 I just buy it right away. For a month now I try to believe it but it just hurts my head when I try. The minus one on the answer is because: (1) your conclusion about the drive being sick - I totally disagree, it's new it's fine it works as it should, (2) The other two remedies are counter to problem/solution framed in the original question. No offense, I just want an answer I can believe or a solution that works. –  Ram Sep 27 '11 at 22:00
1  
Yes, if a driver doesn't get an answer back in time it will block your OS; unlike your applications which will always be asynchronous your drivers are doing RAW reads which no layers in between which means that it happens synchronous for them and thus they block if the hard drive doesn't respond at all. While the drive is spinning up, the driver does not get an answer and thus blocks the OS as all the I/O actions do not immediately return as they would when the drive is fully running. This is a fairly reasonable explanation and I have seen this happen across OSes; if not, the drive is sick... –  Tom Wijsman Sep 28 '11 at 1:46
    
You can't really expect your OS or their applications not to freeze if your drive is unavailable for a few seconds, a lot of calls will simply either lock things up or time-out. Applications are mostly protected against for small delays as they are written with threads; however, that doesn't stop Finder from being implemented in such way that if a I/O call doesn't return for some seconds that it should not lose responsiveness. In that case, that's a problem with Finder and not with your OS. I don't see what it else would be, or I would say that it freezes because of dancing unicorns... –  Tom Wijsman Sep 28 '11 at 1:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.