Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

photolibraryd sucking up CPU in Sierra

I have a moderate sized library ~7,000 photos, and sometimes it just goes away for 3 minutes or more with the spinning beach ball. Activity Monitor shows CPU usage of 95–100% for a task called photolibraryd, and Photos is shown in red as "Not Responding". Memory Pressure is low, there is very little other activity, maybe 10 - 15%.


I do have a lot of Smart Albums, and I have folders that are nested 3 – 5 deep, with mostly Smart Albums in them. That may require a lot of index manipulation. I don't know enough about Photos to have any idea. I have also had Photos crash at least twice while in this state.


In earlier releases this has been attributed to refreshing thumbnails, rebuilding the Faces database, etc. after a new release. I've had this release installed for well over a week. I use Photos every day, and the problem isn't constant as I've seen it in earlier releases. Photos comes up, runs for awhile, then I get the beach ball. After awhile ~5 minutes everything settles down. Then some time later maybe 10 minutes, maybe 30, here we go again. etc. etc.

MacBook, macOS Sierra (10.12), 8 Gb Ram

Posted on Oct 25, 2016 1:02 PM

Reply
Question marked as Best reply

Posted on Jan 9, 2017 11:15 PM

Its processing the facial recognition for the "people" album. It only runs when you are connected to power, so it wont kill your battery.


If you click on the "people" album you can see its progress (note that it will not continue processing while the app is open)


Mine has been doing this for several weeks, basically daily, but I have a pretty big libraryUser uploaded file

15 replies
Question marked as Best reply

Jan 9, 2017 11:15 PM in response to mdm13

Its processing the facial recognition for the "people" album. It only runs when you are connected to power, so it wont kill your battery.


If you click on the "people" album you can see its progress (note that it will not continue processing while the app is open)


Mine has been doing this for several weeks, basically daily, but I have a pretty big libraryUser uploaded file

Mar 13, 2017 9:45 AM in response to afurley

While faces are a factor, there is more here than just facial recognition. This version of Photos adds object recognition, a feature I did not know about until I actually looked at "What's New in Photos" a few days ago.


As others have reported, the iMac this morning is about halfway through the photoslibrary after a little less than 72 hours.


photoanalysisd is the top % CPU item but harmlessly so.


Apple points out that now you can search on natural language terms such as "pumpkin" and Photos will respond, quite outside of the system for searching on text present in photo titles, descriptions or keywords.


Enter such a term in the search box and Photos responds with the usual tabulation, at the top of which will be "categories", a new feature, showing the number of photos that match. Here's an example from the iMac as Photos works its way through around 27,000 photos, this one matching the category "violin".

User uploaded file


This photo is not annotated with title or description containing the text "violin". Apple has developed a fine-grained process to produce an accurate match of a photo such as this, showing only a small part of a violin. Thus if photos are detailed, presenting a host of possible or accurate matches, even a machine with a high capability for computational throughput could bog down.


Separately, I have seen iPhoto and Photos both generate false matches for faces, notably on flowers and the hubs of automotive wheels. That's amusing to be sure, and could possibly contribute to the memory pressure you observe. I have not yet checked whether (or not) Photos has re-populated faces on flower photos from which they earlier were removed manually.


About memory usage and problems I can offer little insight as that is not happening here.


User uploaded file


That is a lot of CPU for the iMac


iMac 27 Late-2015 Core i7 4.0 GHz

8 GB

2 TB Fusion Drive 75% free

MacOS Sierra 10.12.3

Photos 2.0 (3130.0.240)


User uploaded file


Yet memory pressure remains within reason. Again that's a lot for this iMac. But other processes are running ok.


You mention force quit. When Photos halts on error you may very well wind up with a corrupt PhotosLibrary file since the file was not closed correctly. That happened here with iPhoto as the result of a different problem, and required a library rebuild.


I would also check whether there might be other processes that contribute to memory pressure. Trying a shutdown and startup in safe mode might shed some light on that issue.

Mar 13, 2017 10:45 AM in response to iGardener

Apple Support offers Photos help that illustrates the general category search:


http://help.apple.com/photos/mac/1.2/#/pht64de33e5a


User uploaded file

This looks to be a powerful new feature. Photos shares with iPhoto the ability to provide a response to a query almost immediately. This gives Photos the look and feel of Apple's HyperCard, and may be accomplished by maintaining a complete inverted index and data dictionary. If that is so, there's no wonder why photoanalysisd is busy in the background.

Mar 13, 2017 12:55 PM in response to mdm13

mdm13, I took time to re-read your original post and noticed this detail:


... Activity Monitor shows CPU usage of 95–100% for a task called photolibraryd, and Photos is shown in red as "Not Responding"...


That's different from the well-behaved processing on the iMac here. The process occupying CPU here is photoanalysisd not photolibraryd. That latter daemon may be working on problems created in the two crashes you mention, not general category indexing:


... I have also had Photos crash at least twice while in this state...


Apple Support Community contributors provided helpful information in this related discussion a couple of years ago:


iPhoto 9.4.3 frequent crashes


The crashes damaged the iPhoto library, thus it needed repair. This is about earlier versions; OS X 10.8.5 and iPhoto 11 9.4.3 not MacOS Sierra and Photos for Mac 2.0, so this discussion may not apply to your question directly.


Apple Support offers this information pertinent to Photos for Mac:


Photos for Mac: Repair your library

Mar 13, 2017 8:42 AM in response to j_bowl

The problem is not strictly the CPU, but the Memory Pressure. Photolibraryd drives mine into the Red (Activity Monitor) on a regular, actually now incessant basis and everything else comes to a halt, this despite leaving the machine running over several nights. Why can't I just turn it off? In fact, I have had to kill the process on multiple occasions just to get some work done, but it comes screaming back. I am on the point of exporting all my photos and resorting to running iPhoto on an older machine because this is incompatible with use of the MacBook as a professional tool.

Mar 13, 2017 8:54 AM in response to afurley

1 - Patience is a virtue and if you would stop messing with it and let it finish then it would be over - you are extending an required process


2 - you certainly can use any software you want - Photos is not required and many people do not use it for various reasons - be aware that iPhoto is dead and some day with some upgrade will totally quit working leaving you with a mess to resolve with fewer alternatives


3 - a Professional should never be using Photos (or iPhoto for that matter) as they are not professional programs - pros use Lightroom or other professional level programs


LN

Mar 13, 2017 11:00 AM in response to iGardener

This looks to be a powerful new feature. Photos shares with iPhoto the ability to provide a response to a query almost immediately. This gives Photos the look and feel of Apple's HyperCard, and may be accomplished by maintaining a complete inverted index and data dictionary. If that is so, there's no wonder why photoanalysisd is busy in the background.



As answered in the very first answer to this thread


There is a long, CPU intensive pass through the library identifying objects and people - this may take several days or even weeks adn until it is complete you may have seplls like this

and there is no way to get around it as answered to you specifically

Patience is a virtue and if you would stop messing with it and let it finish then it would be over - you are extending an required process


Not using Photos is an option - if you use Photos then let the ID process finish - once the initial pass is complete future updates are not noticeable they are so quick unless you import massive numbers of photos at once


LN

Mar 13, 2017 11:15 AM in response to LarryHN

I think you misunderstood iGardener's contribution, Larry. It describes quite nicely the new power added to Photos by the automatic classification of objects into categories - not a complaint at all about the additional memory pressure and processing time required by the new analysis of the Photos Library. Actually, I'm quite surprised, how good the artificial intelligence algorithms are, that are used by Photos and that it takes no more than a week to scan my library. Most photos have been classified correctly in my library.

Mar 15, 2017 6:58 AM in response to mdm13

On photolibraryd and photoanalysisd: should it worry me that every so often they'll suddenly combine to take up 100% or more of my CPU, even though I haven't opened Photos for weeks? They'll just do this once in a while and slow everything else down. Like right now. And I probably haven't opened Photos in a month or so.


It may or may not be a coincidence that Time Machine is informing me it's going to take 14 hours for a 7.53 GB backup, when basically nothing's changed on my system since the last backup this morning. Oh, now it's projecting 16 hours. Now 17 hours ...

Jun 24, 2017 8:01 AM in response to mdm13

I thought i'd share my personal experience. I have a 105k picture library and was using it on my MacBook Pro 13" in optimized-local-storage-mode. After 3 month of processing pictures it completed roughly 35k pictures.


I recently decided to sell the macbook and replace it with a new iMac 2017 on highest configuration (i7 4,2 ghz, 48GB memory). It processed my whole library (which i am now using in a NOT local storage optimized configuration) within 4 days!


Of course there are 2 components which optimize the processing speed:

1. full resolution on local store. otherwise the mac has to download the high resolution photo, then perform the scan and then replace it again with a low resolution version - it obviously takes more time

2. better CPU & general configuration.


I'm impressed by the recognition precision of Apple's AI and it's worth giving your CPU enough time to process everything :-)

Nov 6, 2016 10:05 AM in response to mdm13

I'm about a week into Sierra -- and CPU also running hard with photolibraryd 24/7 less a few moments when I think its done -- and then it restarts. Library is in the 10s of thousands. If this is just face recognition in background, is there any way to know progress? I'd like to use machine on the road, but battery life is now reduced.

photolibraryd sucking up CPU in Sierra

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.