Posts Tagged ‘hard disk’

For about 2 months, off and on, my Mac Pro goes crazy reading or writing to the hard drive.   This makes my Mac Pro feel like an old computer, even with 4 cores under the hood!

Most of my Googling, referred to a spinning wheel related to Safari.  No solution until now!

1. Open Applications\Utilities\Terminal to type some commands.

2. To find out which applications are taking up your CPU time, type:

top -o cpu

3. At the top of the list, should be the application taking your CPU time.  In my case it was mds.

4. To kill the process, type:

sudo killall mds

<type your password>

After that, my disk drive stop making all that noise!  What a relief!

While you’re at it, you might consider disabling Spotlight.  I don’t understand why it make my hard drive go crazy if it has had so much time to create an index for each hard drive.

To disable Spotlight, type:

sudo mdutil -a -i off

What Failed, sometimes Me

Wrong Top Sort

Along the way I tried finding the process that used the CPU the most.  I had accidentally set top to sort by process id (pid) so it never gave me the correct answer.  Looking at the man page, the above top command with -o cpu always sorts by CPU usage.

Iotop Error

After searching online, I found out that Linux uses iotop to find the process using the hard drive most of the time.  Fortunately, under the Mac OS X, it also exists.   But when I ran

sudo iotop

for a while, it would insert an error and prevent the proper culprit to show up in the list.

dtrace: error on enabled probe ID 5 (ID 19321: io:mach_kernel:buf_strategy:start): illegal operation in action #3 at DIF offset 0

Read Full Post »