Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > The great crusade against 10.5 mdworker

The great crusade against 10.5 mdworker
Thread Tools
Thain Esh Kelch
Mac Enthusiast
Join Date: May 2001
Location: Denmark
Status: Offline
Reply With Quote
Feb 13, 2008, 06:48 PM
 
I would like to know, those of you who have had problems with this one eating up loads of CPU and doing the system unresponsive; did you do a clean Mac OS X install or an upgrade on top of 10.x?

Personally i did an upgrade, and i would like to know if a clean install of Mac OS X could fix it..
     
UpQuark
Fresh-Faced Recruit
Join Date: May 2005
Location: Zushi, Japan
Status: Offline
Reply With Quote
Feb 13, 2008, 08:03 PM
 
What is your system set up? CPU/RAM etc.


I have installed 10.5 on 4 machines with no issues. But my results are in the majority. There are several users whom have not had good luck.
" That is just crazy, man!"
     
Azzgunther
Dedicated MacNNer
Join Date: Apr 2003
Location: Milwaukee, WI
Status: Offline
Reply With Quote
Feb 13, 2008, 08:42 PM
 
I did a clean 10.5.0 install and I've seen mdworker try to take over a couple times but you can quit it in the activity monitor if it's being absolutely ridiculous. I believe that it is Spotlight trying to index your hard drive so let it go one of these times and see if it finishes after a few hours. It hasn't done anything stupid in a month so I think, in my case, it was related to the fresh install during the first few weeks.
"The best part about breaking up with someone is moving all your porn from C:\Program Files\Java\j2re1.4.2\lib\zi\Pacific to C:\Porn."
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Feb 14, 2008, 01:33 AM
 
Twice in an early release of Tiger the md process went nuts on me, but a restart fixed the problem. So I'd try restarting.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
Don Pickett
Professional Poster
Join Date: Mar 2000
Location: New York, NY, USA
Status: Offline
Reply With Quote
Feb 14, 2008, 04:35 AM
 
If you add a lot of data to your drive at one time, then it's normal behavior.
The era of anthropomorphizing hardware is over.
     
analogika
Posting Junkie
Join Date: Feb 2005
Location: 888500128
Status: Offline
Reply With Quote
Feb 14, 2008, 06:56 AM
 
it MUST be fixed.

I found out about this the hard way, when a recording job crapped out on me in mid-recording due to the sudden spike in disk/CPU activity.

I can get around it by excluding my projects folder from Spotlight search, but that's a stupid, stupid solution, since that also means my audio files and samples aren't searchable.
     
Thain Esh Kelch  (op)
Mac Enthusiast
Join Date: May 2001
Location: Denmark
Status: Offline
Reply With Quote
Feb 14, 2008, 11:03 AM
 
Originally Posted by UpQuark View Post
What is your system set up? CPU/RAM etc.
MBP 2.16, rev B. 1 Gb ram, 120 Gb harddrive. Mac OS X 10.5.2.
Originally Posted by Azzgunther View Post
I did a clean 10.5.0 install and I've seen mdworker try to take over a couple times but you can quit it in the activity monitor if it's being absolutely ridiculous. I believe that it is Spotlight trying to index your hard drive so let it go one of these times and see if it finishes after a few hours. It hasn't done anything stupid in a month so I think, in my case, it was related to the fresh install during the first few weeks.
I tried to kill the process, but it kept comming back a second after. The first time I've seen this is actually a few days after I upgraded to 10.5.2. Pre that I've never seen it eat cycles as much as now.
Originally Posted by Big Mac View Post
Twice in an early release of Tiger the md process went nuts on me, but a restart fixed the problem. So I'd try restarting.
Tried that, didn't work.
Originally Posted by Don Pickett View Post
If you add a lot of data to your drive at one time, then it's normal behavior.
Weird thing is, I didn't. It just kinda popped up suddenly...

Does 10.5.2 lets Spotlight access more places to index? Especially the Library for instance?
     
Don Pickett
Professional Poster
Join Date: Mar 2000
Location: New York, NY, USA
Status: Offline
Reply With Quote
Feb 14, 2008, 02:42 PM
 
Originally Posted by Thain Esh Kelch View Post
Weird thing is, I didn't. It just kinda popped up suddenly...

Does 10.5.2 lets Spotlight access more places to index? Especially the Library for instance?
Hmm. Dunno. The only times I have Spotlight do that is either right after I upgraded to 10.5, or when I've added a lot of stuff to my drive. Other than that I don't even notice it.
The era of anthropomorphizing hardware is over.
     
Thain Esh Kelch  (op)
Mac Enthusiast
Join Date: May 2001
Location: Denmark
Status: Offline
Reply With Quote
Feb 15, 2008, 07:43 AM
 
Originally Posted by Don Pickett View Post
Hmm. Dunno. The only times I have Spotlight do that is either right after I upgraded to 10.5, or when I've added a lot of stuff to my drive. Other than that I don't even notice it.
Actually, I've also noticed that it activates quite often after starting my torrent-client. Are torrent-files downloaded in small increments, that can be Spotlighted, or in a single large file?
     
Don Pickett
Professional Poster
Join Date: Mar 2000
Location: New York, NY, USA
Status: Offline
Reply With Quote
Feb 15, 2008, 05:25 PM
 
Originally Posted by Thain Esh Kelch View Post
Actually, I've also noticed that it activates quite often after starting my torrent-client. Are torrent-files downloaded in small increments, that can be Spotlighted, or in a single large file?
Well, I would imagine it's choice number one, as you're getting the file a bit at a time.
The era of anthropomorphizing hardware is over.
     
Thain Esh Kelch  (op)
Mac Enthusiast
Join Date: May 2001
Location: Denmark
Status: Offline
Reply With Quote
Feb 16, 2008, 08:10 AM
 
And what do you know, removing my torrent temp-folder, in the Spotlight control panel, removes the problem... Pretty annoying though.. But hey, now its fixed! yay!
     
useopenid
Fresh-Faced Recruit
Join Date: Jul 2008
Status: Offline
Reply With Quote
Jul 16, 2008, 08:54 PM
 
The problem isn't cpu cycles, it's that it consumes all the memory, forcing everything out into paging hell. 2G in my 3G imac (which is all the poor thing can take). I've got everything turned off that I can in the spotlight preferences, and still it goes crazy, fortunately only occasionally. In this case, it was right after booting after firefox got so wedged the process wouldn't exit and it hung during shutdown trying to reboot, so I had to power cycle it. It was likely trying to clean stuff up or something after the crash, but that would be fine if it would limit itself to a reasonable amount of ram. I just had to give up and wait 15-20 minutes for it to finish, blistering the air in the process...
     
eoe_gian
Fresh-Faced Recruit
Join Date: Aug 2008
Status: Offline
Reply With Quote
Aug 26, 2008, 03:18 AM
 
I don't understand why Apple allows mdworker to take so much processor power and memory in the first place. They should review this potential hog for the next System updates. This being related to the issue of applications spamming syslogd with the same message thousand times per second causing the fast growing log files. DETAILS BELOW


mdworker will also reindex large files if they are modified or swapped. I see an audio recording job and merged chunks of a torrent download fit the profile exactly.

It seems the larger the file is, the longer mdworker works.

If you didn't add a new drive, or haven't modified much data yourself, have no downloads running and still mdworker kicks in using all your CPU cycles, it could also be due to a huge log file that is being indexed. I found out after force quitting a hung Quicktime Player, that many thousands of changes to an overgrown 150MB system.log were made in a matter of a few seconds, that fact would keep mdworker busy for 5 minutes more after quitting the hung application. ( 5 minutes was on my 2.2 GHz. Core 2 Duo MacBook, OS 10.5.4)

Faulty applications or network issues can cause many log entries to be written to a file at once (see syslogd issues for more info). This can cause a log file to grow out of hand in short time, and I assume the mdworker will feed on many new words that it thinks need indexing. The system will archive and compress the log once a day to free up disk space, but until that point you have a big file that is affected and mdworker appears to work a lot for no obvious reason.

So if in your case mdworker works over time for no reason, three options below could be a fix:

1. Exclude the /var/log or entire /var folder from Spotlight indexing. /var is usually hidden in the Finder, but you may navigate there directly after pressing [cmd]+[shift]+G in the Finder.

2. Remove large log files or prune old log entries. The rude way is to trash the affected log file and restart once before you empty the trash. Else go to Terminal and type "man syslog" to see details about the proper way to clean it.

3. Set the mdworker process to use a lower CPU priority. The indexing tasks can take a bit longer but it should allow you to continue to work without noticing it. You can edit the /System/Library/LaunchDaemons/com.apple.metadata.mds.plist to do so.
( Last edited by eoe_gian; Aug 26, 2008 at 03:47 AM. )
     
arekkusu
Mac Enthusiast
Join Date: Jul 2002
Status: Offline
Reply With Quote
Aug 27, 2008, 11:25 PM
 
/var/log is excluded by default.
     
- - e r i k - -
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status: Offline
Reply With Quote
Aug 27, 2008, 11:38 PM
 
Originally Posted by eoe_gian View Post
3. Set the mdworker process to use a lower CPU priority. The indexing tasks can take a bit longer but it should allow you to continue to work without noticing it. You can edit the /System/Library/LaunchDaemons/com.apple.metadata.mds.plist to do so.
Which part do you edit?

[ fb ] [ flickr ] [♬] [scl] [ last ] [ plaxo ]
     
eoe_gian
Fresh-Faced Recruit
Join Date: Aug 2008
Status: Offline
Reply With Quote
Sep 2, 2008, 11:34 AM
 
Originally Posted by - - e r i k - - View Post
Which part do you edit?
I understand thats confusing, there are many topics out there about setting the CPU priority.

This one seems good, however I didn't test it myself:
http://www.newartisans.com/blog_file....spotlight.php
     
eoe_gian
Fresh-Faced Recruit
Join Date: Aug 2008
Status: Offline
Reply With Quote
Sep 2, 2008, 11:39 AM
 
Originally Posted by arekkusu View Post
/var/log is excluded by default.
But mdworker does kick up the activity after the log files are expanded on my Mac. I never changed any thing about the indexing, so the settings should be as default.

Anyone have a more explaining idea what mdworker does or does not do in the /var/log ? Are we talking about a loop hole here? or is mdworker doing something else that is only related to the sudden expanding log file?
( Last edited by eoe_gian; Sep 2, 2008 at 11:49 AM. )
     
Dual Porpoise
Forum Regular
Join Date: Sep 2008
Status: Offline
Reply With Quote
Sep 14, 2008, 04:28 PM
 
It seems odd that a background process like that should be allowed to take over the system - mine does that occasionally too.
     
eoe_gian
Fresh-Faced Recruit
Join Date: Aug 2008
Status: Offline
Reply With Quote
Oct 4, 2008, 07:38 AM
 
Originally Posted by arekkusu View Post
/var/log is excluded by default.
arekkusu, your link is talking about "time machine", mdworker however is the spotlight indexer for the supposedly faster searching features in Mac OS X. Apparently spotlight does index the keywords inside log files. Is this maybe new in Leopeard?
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Oct 5, 2008, 09:30 AM
 
I had mdworker and LAServer take over my CPU repeatedly on my old iBook G4 with 10.4. I haven't had any problems with my MacBook running 10.5 though.
     
rszabo
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 15, 2009, 11:09 AM
 
Time Machine Backups volume was being indexed on my system in Spotlight when I noticed the sluggishness in response time. mdworker was using over 40% of the CPU and the LED on my little WD USB hard drive used for Time Machine Backups was lit up solid. I noticed what was being done in Spotlight by simply clicking on the Spotlight icon in the upper right corner.

Opening my Applications folder in Finder took over 30 seconds during this slowdown, but it eventually allowed me to find Activity Monitor and report the symptoms above. I opened a bug report with Apple today.

Could it be that the introduction of Time Machine caused the scans in Spotlight to grow astronomically in size, thereby leading to the slowdowns we see in mdworker?
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Feb 15, 2009, 11:25 AM
 
I'm not sure, but I do know that my G5's processors spike during a TM backup. It doesn't cause a lot much sluggishness, but it's annoying to see. Who knew a backup operation could be so processor intense?

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Feb 15, 2009, 01:27 PM
 
Is your G5 multi-core? Because that seems to help a lot with TM and sluggishness - on my old single-core iMac G5, TM used to bring the machine to a crawl every time it started, causing text lag and everything, to the extent that I ended up turning it off whenever I was using the computer and turning it back on when I was done.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Big Mac
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Feb 15, 2009, 03:38 PM
 
DP 2.0, which is supposedly almost identical in performance to the slightly newer DC 2.0. It doesn't cause that much lag but I see the activity and it makes me think I have to scale back on what I'm doing and let it do its thing. I adjusted the frequency of backups to reduce the annoyance.
( Last edited by Big Mac; Feb 15, 2009 at 03:58 PM. )

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Feb 15, 2009, 03:55 PM
 
On my MBP, the activity is there, but in real-world use I don't notice it nearly as much as I did on the old G5, and also it usually takes only about 5 minutes to do a backup, unlike on the G5 where it often took 45 minutes or more, causing the G5 to be almost always in the middle of a backup unless I turned TM off when I was using the computer.

Perhaps the experience with TM on the iMac has lowered my expectations - however, I find TM pretty ignorable on my MBP.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
myrkatt
Fresh-Faced Recruit
Join Date: May 2008
Status: Offline
Reply With Quote
Nov 20, 2009, 07:26 AM
 
I have recently bought a new MacBook Pro with 5.6 on it and transferred my home directory off a Time Machine backup. The mdworker has been using 99% of CPU for a week now without stopping.

Firstly, does it take all that time to index (6GB, because I have excluded everything except my Documents folder from being indexed).

Secondly, while this process does not slow down most other programs, Mail just hangs up with the wheel of death forever. I know that Mail uses spotlight, but it seems a bad design feature for Mail to completely hang until indexing is finished. What are threads for if not that?

I'm going to try Nicing the process but has anyone had similar problems with mdworker and Mail together?
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:23 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,