OS X Server and the runaway process

Yesterday I heard the fan running like mad on my Mac Mini. My mini is my workhorse machine that is my media center, surveillance system, and build server. This is not uncommon as it processes video at times and when it builds certain projects (Swift seems to cause it more), the processor has to work harder. Normally the load is about 30% (Quad Core i7), but when the fan comes on loud enough for me to notice, it is hitting the 50-90% range. I did a little poking at the machine and saw a process called sdmd hogging the CPU. I had never heard of this process, but a quick search found some references on Apple’s support discussion threads.

I read through all the responses and turned off “Create personal folders when users connect on iOS”.

FileSharing

Unfortunately that was only half the solution. The other half of the answer that I ignored on the first pass was a setting in each Shared Folder that enables iOS sharing. I had recently added a shared item and didn’t notice the iOS setting.

Sharing

Once I unchecked iOS, the load started going down and little files stopped being created. By this time, I had over 150,000 little files! These were thumbnails from my cameras collected over the last week. Using the Finder to delete the files was an exercise in waiting, so I searched for a UNIXy way to do this and found the answer. Switch to the /Library/Server/ServerDocs/Data directory and issue:

sudo find . -type f -print -delete

This quickly nukes all files in the current directory.

I still have mixed feelings about OS X Server; it is working pretty well for me right now to perform basic functions including Time Machine backups, but sometimes it does magic where it takes time for me to figure out how to undo its magic.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.