9

Since updating to OSX Lion on my late 2009 iMac, I have noticed some strange behaviour while using my computer. Every hour or so (I'm not actually sure about this pattern), the application that I am using will suddenly freeze. I will then hear my external hard drive spin up, and eventually, the application will begin to work again.

As an example, simply right-clicking on something in Chrome or half-way through watching a video in Plex will cause the entire application to freeze until the disk is spinning again. I can't think how these applications could possibly rely on this external disk, as all I use it for is my Time Machine back-up.

I have disabled the "put hard disks to sleep when possible" option, but this doesn't appear to have fixed anything. One possible explanation could be that this external disk is being used as part of virtual memory; it would explain the OS's reliance on the disk, but I can't imagine why it would do that when I have plenty of disk space remaining on my system drive.

This isn't entirely fatal, it's more annoying than anything else, but I am concerned that this could indicate that something is wrong with my operating system or hardware. I would be grateful for any ideas.

2
  • 1
    I'm curious: What happens if you perform a behavior that causes the symptom while the external hard drive is not connected? (Or turned off?)
    – tcv
    Oct 3, 2011 at 13:26
  • 2
    When this happens again, open Console.app, select "All Messages" and look for messages that happened the same time you experienced the problem. Attach this messages to the post (review them before, to exclude possible private data).
    – Kentzo
    Oct 6, 2011 at 8:34

5 Answers 5

4
+25

It might be the Spotlight indexing. Do you see mdworker active in Activity Monitor when this happens? If you have not done this yet, you might try excluding the drive in the Spotlight Privacy settings in System Preferences and see if that helps.

1
  • Excellent idea. I will keep Activity Monitor open and check for this the next time that a slow-down happens. The Spotlight Privacy settings are completely blank, so I have a good feeling about this. Oct 4, 2011 at 15:18
1

Sounds like it's Time Machine doing it's scheduled backup, it would slow down your current process as it checks your home folder for changes.

1
  • I'm afraid it's not, but a good idea because I am using Time Machine for backups. The little clock icon does not begin spinning after the disk spins up. Oct 2, 2011 at 23:32
1

I would say that the external drive has it's own internal power management that is causing the disk to spin down. With some effort you could write a script that writes a file to the external drive, deletes it and then repeats every minute.

If you have any apps on the external drive, and especially an app that once registered a service, then I suspect your external drive is spinning up on a right click in order to help build the services menu. Or it could simply be that Plex itself is choosing to scan the external drive.

I'd research your external drive a bit and see if it spins down the disk on its own and then how to prevent it from happening.

This script

 #!/bin/bash
 # Used to not let a volume named MYBOOK sleep

 volpresent=$(mount | grep MYBOOK | wc -c)

 if [ $volpresent -gt 0 ]
 then
    touch /Volumes/MYBOOK/.hiddenfile
 fi

Comes from this hint http://hints.macworld.com/article.php?story=20090316190817357

2
  • Good thought, but I am only using my external disk as a Time Machine backup, there is nothing else on there at all. All my applications are stored on my iMac's internal hard drive. It is possible that Plex could be the culprit, but surely it shouldn't be scanning something that I didn't tell it to. Oct 3, 2011 at 16:10
  • I feel that keeping the disk on all the time should be a last resort, because I don't feel that it should be being used at all. If something needs to access the disk, that shouldn't block the entire system, it should block the thread that uses it. Time Machine should be blocked, not Chrome. Oct 3, 2011 at 16:13
1

Focus on one action that seems to both (a) cause a disk to spin up and (b) not complete until after spin up is complete. Assuming that a right-click in Google Chrome is one such action … 

In Terminal, running the following command before a right-click in Google Chrome will show things relating to file activity:

sudo fs_usage cmd Google\ Chrome

Amongst the activity, something related to Services. Run the following command to get an idea of just some of the services available to your system:

defaults read ~/Library/Preferences/com.apple.ServicesMenu.Services

Might one of those applications, those services cause both (a) and (b)?

If not a right-click in Google Chrome, think of ways in which the main question might be more focused.

0

I have a hard drive that does this too. I suspect that the drive spins down if it's not needed for a while. However, when the OS tries to read from or write to the drive, it blocks the process while the drive spins up. And in Lion, this happens sometimes when I use Spotlight, Finder, or click on a stack in the Dock. I've resigned myself to the fact that this behavior is just part of how Lion operates.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .