Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

getrealbro

macrumors 6502a
Original poster
Sep 25, 2015
604
262
The photo analysis daemon (photoanalysisd) that does the object/face recognition in Photos, can grind to a halt when working on multiple Photos libraries. Photo analysis of a smallish (6-8 GB) Photos library can consume 100+% of CPU and 30-50 CPU minutes on our Late 2014 Mini. But when faced with a dozen recently upgraded Photos libraries it simply grinds to a halt.

Ordinarily I’d be happy to find a way to stop Photos from wasting CPU & disk resources on something I never use. But there is a down side — photoanalyisd runs as a user process and even when it is doing nothing, it “hangs onto” the Photo libraries, which has at least two negative consequences;
1 - un-mounting the partition with the Photos libraries requires Force eject and
2 - it stops other users from accessing the Photos libraries.

So if you are upgrading to Mojave and have multiple Photos libraries: only convert one Photos Library at a time and monitor the photosanaylsisd process with Activity Monitor to be sure it has finished the Photos facial/object recognition before you convert the next one.

GetRealBro
 
When the Photo Analysis Daemon (photoanalysisd) ground to a halt and quit doing photo analysis, Activity Monitor showed that it had 120+ threads and over a dozen Photos Libraries open.

So I began spoon feeding Photos Libraries to photoanalysisd by copying one Photos Library at a time to a USB stick and un-mounting the external drive with the dozen and a half Photo Libraries that the daemon couldn’t handle.

I haven’t found a way to “force” the daemon to analyze the Photos Library on the USB stick. But the daemon usually kicks in after several minutes of inactivity. It creates 2-5 threads and consumes 125+% of CPU and 30min to an hour+ of CPU Time depending on the size of the library.

This process of “fixing” the facial/object analysis on over a dozen Photos Libraries is a serious PITA. Just moving the 25-150GB Photos libraries on and off the USB Stick is time consuming. It would be so much easier if there was a way to force the analysis on a specific Photos Library with a terminal command.

BTW Activity Monitor's (i) button lets you see which Photos Library is being analyzed and the other files/ports photoanalysisd has open. It’s a bunch — no wonder the Finder has trouble ejecting a volume when photoanalysisd has several Photos Libraries open.

GetRealBro
 
After “fixing” the Photo Analysis on 18 Photos Libraries (roughly 1TB), I left the external disk mounted. Overnight photoanalysisd was able to complete the analysis on the remaining dozen Photos libraries (roughly .5TB). It used 12.5 hours of CPU Time with under 20 threads.

It will be interesting to see if photoanalysisd is able to maintain the facial/object analysis of these Photos libraries without getting bogged down again.

GetRealBro
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.