Tracking down a performance problem

KenDRhyD

Registered
I have an issue with my 24" Intel iMac, now running Mac OS 10.5.5 -- from time to time the system becomes extremely unresponsive. Even normal booting and regular usage on this system seems a bit slower than others seem to report, but from time to time it simply fails to respond -- often without even the spinning beach ball!

On the iMac I have 2 external firewire drives, both FireWire 800, always on and connected. One (LaCie Big Disk Extreme+; 1TB) is used for Time Machine and full backups (Super Duper!) and the other ( WD External HDD Button & Lights; 500GB) contains my Parallels virtual machines. Both of these drives are excluded from Spotlight indexing (listed in the Privacy section).

Frequently disk or even network activity will hang waiting for one or the other of these drives to spin up and become ready. For some reason that most often seems to the LaCie drive. This is annoying, but I have learned to live with it.

Other times the system behaves as if something is consuming all of the cycles, but when I am able to launch Activity Monitor, nothing seems to be consuming much CPU, or at least not enough to cause the almost complete lack of response. It is almost as if the system is in a resource wait state, or even a deadlock over some resource or another.

Most times the problem seems to resolve itself after some period of time, from seconds to minutes in duration. Occasionally I have to force quit one or more applications, but even then it takes some time before the system starts responding 'normally'. Rarely I have to reboot the entire system.

I have a few questions:

1. Is there something I can do to stop the system from waiting for the external drive(s) to spin up all of the time?

2. Aside from running Activity Monitor, which is not always possible when the system is not responding well, is there anything else I can do to attempt to identify the cause of these periods of lack of response from the system?

3. I a fresh re-install of Mac OS 10.5 likely to resolve or aid in the process?
 
1. Identify what is happening in the system (with console).
Also test when these drives are not connected - is the problem totally gone?
What applications do you typically use when this problem is present?

2. Console. It's in Applications/Utilities.
Viewing 'all messages', console.log, system.log on the periods of unresponsiveness you can see exactly what happens.
Maybe something is constantly accessing these drive (such as mdfind, md- anything, ie spotlight processes)

3. Without finding the cause, not much use. Look at Console first.
 
One thing I do notice in the "All Messages" log is this line being repeated constantly every 4-5 seconds. From the information displayed i have no idea where to look for this problem.
Code:
29/10/08 4:12:04 PM 29-Oct-2008 mds[36] (Error) Import: importer:0x84b600 Importer start failed for -2 (kr:268435459 (ipc/send) invalid destination port)
 
mds = spotlight.
It fails to import or index your data, and I would bet this is from the external drives.

I recommend turning off spotlight indexing for that volume / volumes.

From System Preferences > Spotlight > privacy, drag the volumes to hwere to not index. And if that will not work then http://www.macintouch.com/tiger12.html

If you want to consider totally disabling Spotlight, at least for a test, use OnyX (it's free) http://www.titanium.free.fr/pgs/english.html and pick the version for your Mac OS X. You could disable it with Terminal too, but with OnyX it's easier - and you can switch it back on very easily too.

This may also be useful read for you http://www.macfixit.com/article.php?story=20061109235901299
 
I recommend turning off spotlight indexing for that volume / volumes.

From System Preferences > Spotlight > privacy, drag the volumes to hwere to not index. And if that will not work then http://www.macintouch.com/tiger12.html

First, I had already dragged the drives to the Privacy list, and the names were there. Despite that, the system still seems to be indexing.

From your two references I took the following steps:

1) Using the mdutil command-line utility in Terminal, turn off indexing for each of your drives. Example:

sudo mdutil -i off /Volumes/Parallels
sudo mdutil -i off /Volumes/History
I did this for both volumes, as noted, and it reported that indexing and searching was disabled.
2) Then use mdutil to remove the indexes from each drive

sudo mdutil -E /Volumes/your_hard_drive_name_1
sudo mdutil -E /Volumes/your_hard_drive_name_2
I did this and it also reported that the indexing and searching were disabled.
3) Physically remove the .Spotlight directories from the root of each drive.

cd /Volumes/Parallels
sudo rm -fr .Spotlight-V100
cd /Volumes/History
sudo rm -fr .Spotlight-V100
I also entered these.

After this I noticed that the drive was busy, and it was re-indexing!

I tried killing the mdimport process, but as fast as I tried to kill it, it is being relaunched. I believe that the error line (which is still being repeatedly reported) in the Console log may be the process dying on launch and being repeatedly relaunched.

I repeated the steps above and this time the volumes were not re-indexed, but the entry in the console log is continuing to be reported.
 
I tried killing the mdimport process, but as fast as I tried to kill it, it is being relaunched. I believe that the error line (which is still being repeatedly reported) in the Console log may be the process dying on launch and being repeatedly relaunched.

I repeated the steps above and this time the volumes were not re-indexed, but the entry in the console log is continuing to be reported.

Oops. It seems that it is the "mds" process that is reporting these errors. I killed it and it was relaunched, but had lost the privacy settings. It is currently still indexing the larger drive, and there is not "mdimport" running.

I am waiting until the indexing is complete before I attempt to disable it on that drive -- I already set the privacy and repeated the removal on the first drive.

Is there any specific reason that Spotlight (mds) is not remembering the privacy settings when it is killed and relaunched?
 
OK, I killed the "mdworker" and was then able to execute the command to disable and remove the Spotlight files on the two volumes. I shall keep an eye on this and see if the problem returns or persists.

Still do not understand why privacy/no-index settings are being lost so frequently.
 
Back
Top