Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

On my 4-month old mid-2012 MacBook Pro I observe that Spotlight seems to want to ALWAYS re-index. I frequently notice that the performance will get unbearably slow and I can hear the hard drive clicking away. Then I go and click the Spotlight icon and sure enough, "Please stand by while we index your hard drive." A few minutes later, it finishes and things return to normal.

Please be aware, I'm NOT talking about the first indexing that can take several hours (or all night). "Just let it finish" is not the answer. This is an issue that has plagued my computer for months. The re-indexing jobs pop up every few minutes and finish a few minutes later.

Something like this

I found an article where somebody is apparently having the same issue, and tried his suggestions to no avail.

I'm at my wit's end! Spotlight is constantly saturating my I/O with its indexing and making my shiny new Mac unbearably slow.

I am grateful for any additional ideas, including more open-ended suggestions about how to go about trouble-shooting such problems in general. Perhaps a command/tool or particular log files which could help me pin down the root cause.

share|improve this question
    
It's so bad that my wife actually complains that our NEW mac is slower than our OLD one! –  Avian00 Apr 22 '13 at 21:07
    
Have you considered just letting it finish overnight? –  Thorbjørn Ravn Andersen Apr 22 '13 at 21:11
    
I've let it finish hundreds of times. This is not the "initial" index. This is some kind of subsequent indexing that keeps occurring. It indexes for a few minutes, sleeps for few minutes, indexes for few minutes, sleeps again for a few minutes, and on and on... –  Avian00 Apr 22 '13 at 21:23
    
by disabling one by one, you can find out what makes it index –  Buscar웃 Apr 22 '13 at 21:32
1  
apple.stackexchange.com/questions/21817/… might offer some ideas as well –  patrix Apr 23 '13 at 14:22

5 Answers 5

Close all applications and stop Spotlight

sudo mdutil -i off /
sudo mdutil -E /
sudo rm -Rf /var/folders/* 
sudo rm -rf /.Spotlight-V100/*

then reboot and turn Spotlight back on

sudo mdutil -i on / 

These commands turn Spotlight indexing off, erase the existing index files and turn spotlight indexing back on.


UPDATE:

According to your latest information the above does not help in long term.

Lets try finding what makes it index.

Disable all areas that you "normally" do no search.

enter image description here

Add Folders like System to the do not search.

enter image description here

share|improve this answer
    
I've done those exact steps several times. Things seem OK for a couple days and then back to the same old behavior. –  Avian00 Apr 22 '13 at 21:43
1  
An answer should be more than an growing list of things to try. Giving several options for further investigation is ok but please try to edit the question in a way which keeps it useful also for people with the same problem looking at it in a few months. –  patrix Apr 23 '13 at 12:13
    
@patrix an answer can be only as precise as the question is. If the question/information keeps changing the answer changes. –  Buscar웃 Apr 23 '13 at 12:27
1  
Agreed. But if the question is not clear, use comments to ask for details, not an ever growing answer which is only understandable for someone closely following the discussion. The first part of your answer is perfectly valid (just the formatting could be improved), just wait with additional options until you know whether the disabling of index areas changes anything and how this helps in solving the problem. –  patrix Apr 23 '13 at 12:30
    
Admittedly, this is a very "open-ended" problem. I've tried to make the question as precise as possible, but the symptoms lend themselves to be a difficult-to-diagnose problem. I would add that the 1st half of this answer was brought up in the question itself in the form of a link to a suggestion that I tried... without success. Why not delete the 1st half & keep the 2nd? Also, I would gladly accept more open-ended suggestions about how to go about trouble-shooting such problems in general. Maybe somebody knows of a cmd/tool or a particular log file which could help me pin down the root cause. –  Avian00 Apr 23 '13 at 12:46

1) If you are under warranty (do you have AppleCare?) you should contact Apple Technical Support over the telephone and ask them for help.

2) Do you frequently plug external hard drives or thumb drives into your Mac, or do you access remove volumes over the network? If there are a large number of files on those external drives, and the files on those external drives change frequently, Spotlight, by default, may try to index every file on every external drive whenever such a drive is attached to your Mac, and this may tie it up. If so, add those external drives to the "Prevent Spotlight from searching these locations:" list in the Privacy pane.

share|improve this answer
    
No AppleCare, but standard 1-year warranty applies. I guess I don't like the idea of sending in my MacBook somewhere for repair. I'm almost certain it's a software issue anyway. I don't frequently plug in external drives, and the behavior occurs even when no external dries are attached. –  Avian00 Apr 23 '13 at 13:13
    
@Avian00 You don't have to necessarily send it away. if you live close to an Apple Store they can test the system and find what's wrong. –  zoops Apr 23 '13 at 17:56
    
Unfortunately, I'm nowhere near an Apple store. The "authorized reseller" here can't help me. The next authorized repair place is about 30 minutes by car from here, and I'm pretty sure I'll have to leave it with them for several days. Aside from the inconvenience of it all, I don't like the idea of leaving a laptop with personal data on it with a stranger. –  Avian00 Apr 24 '13 at 11:10

Putting System Directory or any root level directory in the Privacy Tab is a very bad idea. These root level directories are not owned i.e. not given read-write permission to by a user account which is generally of admin type. An admin account does not have the ability to have read-write permissions to anything other than what is in a home directory. Here's the link: http://support.apple.com/kb/ht2409 Check the bottom- Additional information section. Now, about the spotlight doing reindexing for brief moments, I think its been more prevalent in Mountain Lion. I've tried reindexing the spotlight every now and then (adding and then removing Mac HD from the Privacy Tab, using commandline tool: mdutil E /, removing com.apple.spotlight.plist from ~/Library). Resetting the ACL from the Recovery HD triggers an automatic reindexing. After its done, the problem still doesn't resolve. Few days after that i once again encountered the unusual behavior of spotlight. But its not getting in the way of performance. It just happens every now and then. Its irritating. Just wait for OS X Mavericks and hope it does away with the problem.

share|improve this answer
    
Nice to finally get confirmation of this problem from someone else. You say you haven't noticed a performance impact. What kind of drive do you have? HDD? SSD? If HDD, 5400 or 7200 RPM? I have a 5400 RPM HDD, so a lot of extra I/O will have a noticeable impact on performance. I suspect installing an SSD would make a huge improvement. –  Avian00 Jun 25 '13 at 10:52

I had the same problem and it came out it's doing it because of SD Card. I have an SD Card that I use as an extension storage and keep it mounted all the time.

Problem solved when I prevented spotlight to index SD Card as described in Buscar's post in my situation.

share|improve this answer

To reset Indexes and solve many issues related with your Mac performances (mdworker continuously using your CPU), or corrupted indexes (you know a file is stored on your drive but Spotlight can't find it).

I'd advice you to get "OnyX" : http://www.titanium.free.fr/downloadonyx.php this freeware will help you in a couple of clicks to verify and clean-up your system from things that might get the spotlight "indexer" stuck...

OnyX Verifying, Maintenance, Rebuilding and Cleaning Automation

Tick only checkbox for "Spotlight index" or/and "Mail's mailboxes" when experiencing problem with one and/or the other as rebuilding indexes takes a while.

When updating OS X from one major version to another I've also experience that running OnyX before and after makes the system more stable (they're some stuff that Apple's installer should and aren't doing).

share|improve this answer
    
Downvoted - vague and doesn't address the question. –  Andrew Ferrier Sep 28 at 8:13
    
Well if you don't have a look you won't know what OnyX does. "grosso-modo" : the "sudo mdutil" stuff mentionned by Buscar... –  llange Sep 28 at 9:05

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.