Glossary/Processes you will see
mediaanalysisd
Also: media analysis
Quick answer
mediaanalysisd is the macOS process that analyzes the photos and videos on your Mac: it recognizes scenes, objects and text in images so you can search Photos for "beach" or copy text out of a picture. It works through your library in the background and is busiest after an import, a new Mac or a macOS update.
mediaanalysisd works alongside photoanalysisd. Roughly, mediaanalysisd looks at each image and video, and photoanalysisd builds what Photos shows from the results: people, memories and search. Both run under your own user account, which is why they appear in Activity Monitor with your name in the User column.
The heavy stretches are predictable: the first days on a new Mac, after turning on iCloud Photos, after importing a large batch, and after a major macOS update, which can ask it to analyze the library again with newer models. It prefers to run when the Mac is idle, so it often looks busiest when you come back to the Mac.
Why mediaanalysisd is using so much CPU
It is working through images and videos it has not analyzed yet. On a library of tens of thousands of photos that can take days of idle time, and video takes far longer than stills.
It backs off when you use the Mac, so the load moves out of your way. If it stays high while you are working, the library may be large and still unanalyzed, or a recent update has queued it all again.
What to do about it
Let it finish. Leave the Mac on power and awake overnight, and the backlog goes down far faster than in short idle gaps. Quitting it in Activity Monitor only pauses the work: macOS starts it again and it picks up where it stopped.
There is no supported switch to turn it off. The analysis is what makes search, text selection in images and Visual Look Up work, and it happens on the Mac, not on Apple's servers.
How to check if mediaanalysisd is still working
You can see whether it is getting through the backlog or starting over, without opening Photos.
- Open Activity Monitor, click the CPU tab and type
analysisin the search field. You will see mediaanalysisd, and often photoanalysisd next to it. - Look at the User column. Both run under your own name, because they work on your library.
- Watch % CPU for a few minutes, then check the CPU Time column. CPU Time is the total it has used since it started, so a figure that keeps climbing means it is still working.
- Click the Energy tab to compare its Energy Impact with your apps. On a laptop this is the figure that tells you what it costs the battery.
- For the detail, open Terminal and run
log stream --predicate 'process == "mediaanalysisd"'. A steady flow of messages means it is processing. Press Control-C to stop. - Check again the next day. If its CPU has dropped to near zero and stays there, the analysis is done until new photos arrive.
Normal mediaanalysisd use vs a problem
Normal: long stretches of high CPU while the Mac is idle, mostly in the first days after a big change, then quiet. It may come back for an hour or two after you import a batch, and for longer after a major macOS update.
Worth looking into: it stays busy for a week or more while the Mac has had plenty of idle time on power, or it keeps coming back when nothing new has been added. These are the usual causes:
- A large library with a lot of video, which takes far longer to analyze than photos.
- iCloud Photos still downloading the library to a new Mac, so there is always more to analyze.
- A Mac that sleeps soon after you leave it, which leaves little idle time for the work.
- A Photos library that has problems of its own. If Photos also misbehaves, back up the library and use the Repair Library tool: hold Command and Option while you open Photos.
Questions people ask
What is mediaanalysisd on Mac?
The macOS process that analyzes photos and videos for scenes, objects and text, so Photos search, Live Text and Visual Look Up work. It runs in the background and is busiest after imports and updates.
Is mediaanalysisd safe?
Yes. It is part of macOS, signed by Apple, and it analyzes your library on the Mac itself. It lives in /System, on the sealed part of the disk that only Apple's updates can change.
How long does mediaanalysisd take?
From hours to several days, depending on the size of the library and how much the Mac is left idle on power. Video takes longer than photos. It stops once everything is analyzed, until new media arrives.
Why is mediaanalysisd connecting to the internet?
The analysis runs on your Mac, but features such as Visual Look Up and Enhanced Visual Search check what they found with Apple. Apple says Enhanced Visual Search sends an encrypted mathematical representation of part of a photo, not the photo, through a relay that hides your IP address. You can turn it off in Photos → Settings → General.
Why is mediaanalysisd using so much memory?
It loads the models it uses to recognize images and text while it works, so its memory figure rises during analysis. Use the Memory Pressure graph on Activity Monitor's Memory tab to judge whether that matters.
Related
Looking for something better than Activity Monitor? See the best Activity Monitor alternatives for Mac, or browse every term in the glossary.