My friend build_hd_index (updated 4x)

Since I’m on a bit of a performance tuning hunt this week, I decided to find out why my hard drive was grinding away this morning.  (With a load average of 2.6)

Turns out, it was my old friend build_hd_index.  This horrible little app is part of Apple Remote Desktop.  It is designed to index the hard drive at a default time of midnight on all systems that are managed by Remote Desktop. Seems innocuous enough- that is until you hear it churning away late at night on several computers.

So now we have Spotlight, locate, Time Machine and build_hd_index indexes of the hard drive and they all grind away at all hours of the day and night.  The unfortunate thing is that only Spotlight is away of the “special” status of Time Machine’s Backups.backupdb database.  All the others just thrash away.

So without further ado- here’s how to disable build_hd_index:

sudo chmod a-x /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/build_hd_index


Keep your friends close and your enemies even closer.

update: A few people have written me to say that turning off the “generate reports” option in the Sharing/Remote Management panel will keep this from happening but this seems to have no effect on my system.

update 2: A better fix: manually reset the data collection policy by removing the file com.apple.ARDAgent.plist file in /Library/Preferences as Apple recommends.  (This does not seem to always do the trick)

sudo rm /Library/Preferences/com.apple.ARDAgent.plist

update 3: laptopleon pointed out that nulling the privileges can break macosx server system updates.  I’ve updated the chmod command to simply remove execute privs.

update 4: Apple has posted a Knowledge Base article: “Apple Remote Desktop: How to disable build_hd_index.”  Not sure that this is a definitive solution.

comments on this post:

dfbills's avatar
dfbills said:
February 05, 2008 (late at night)

I saw this on twitter...  wink

“build_hd_index is running seemingly constantly in Leopard, with activity noise from my Time Machine drive”

dfbills's avatar
dfbills said:
May 31, 2008 (late at night)

So glad to see my friend grinding away after the 10.5.3 update!

laptopleon said:
July 14, 2008 (late at night)

Interesting quote from http://devnevyn.livejournal.com/3558.html :

UPDATE: WARNING! Don’t do this! Remove execution privileges with “sudo chmod a-x (path to the file)” instead. If you chmod 000 or use ACLs to remove system privileges from the file, a later system update may fail! This completely destroyed my 10.5.1 Server system when trying to update to 10.5.2.

dfbills's avatar
dfbills said:
July 14, 2008 (late at night)

Hard to believe nulling the privs would break a system update, since those are applied with root privs.  But in the case of server, one never knows.

I’ve updated the above instructions.

nevyn said:
December 03, 2008 (late at night)

dfbills: Yeah, I’m pretty 99% sure it was the ACLs. You can’t remove an ACL’d file even as root, which breaks a lot of “old” code. chmodding 000 should be fine. I should update the blog entry but I don’t remember the password to that old lj and I’m too lazy to rerequest it.

Also, I thoroughly dislike your comments code; logging in redirects to front page instead of back here.

dfbills's avatar
dfbills said:
December 11, 2008 (late at night)

nevyn: Thanks for complaining about the comments code.  I just fixed it.

You must be logged in to comment on this post (damn those spammers)

Already registered?

Username

Password

forgot password?       register