Make media analysis stop wasting CPU on duplicate/repeated analysis

It’s understandable that Plex media analysis is a CPU-intensive task, however it keeps rerunning the same analyses on library items it’s already processed, and is wasting CPU and electricity while not getting any new information from a library. I’m not sure if it’s intentional to do this or if Plex is just very prone to creating high-CPU race conditions where it is never able to complete, but from experience the default seems to be scan/analyze everything all the time unless I tell it not to.

Reprocessing should not be the default unless the user tells it to, or there’s a new feature added that’s able to extract something new from the analysis (and it should do this only once to extract the new info and skip it if it’s already been done).

At first I thought this was just due to my own library being big and the automated scan/analysis settings I was using, but after doing research this is a very common problem. One example:

If Plex has already analyzed something, it shouldn’t do it again and skip that particular item. Plex should also give users an option to analyze new items only instead of just “as a scheduled task and when new items are added”. The new items one to me implied that it would only scan new items but instead that seems to kick off processing the entire library again.

1 Like

Thanks for referencing my issue. I still have my issue. It’s really annoying. For now I have disabled automatic loudness analysis. However I now schedule this task with a cron job:

docker exec plex \
    bash -c '${PLEX_MEDIA_SERVER_HOME}/Plex\ Media\ Scanner -c 4 --analyze-loudness'

Where 4 is my music library. This seems to fix my issues and only process new entries. Very odd.

I have disabled loudness analysis scan completely as some files will be re-scanned everyday without any error in my logs.

Recently I found out that Plex also likes to rescan some movies or tv shows. As far as I could find out there was nothing common between the files. They all had different extensions, different resolutions and even different codecs. But replacing those files with other versions mitigated the issue. Very weird.

There also wasn’t anything of significance in the Plex logging. At least the default logging.

Still an issue.

Yeah I doubt there is any work that’s going to be done on this unless more people say something. Though hopefully Plex should care about all of the electricity of its users it’s wasting and driving up the cost of running a Plex server.

If anything it may even get worse as the analysis will probably become more CPU intensive as it’s able to extract more information.

Fair enough. But I just want to keep this issue open as this is IMHO still an active bug :slight_smile: .

A couple of weeks ago I tried to the Plex Dance for albums and artists which have caused this issue, and it looked like it was resolved. but today I noticed that the issue was back.

Things that I observed for albums that seem to suffer from this issue:

  • Most albums don’t have a year set or is unknown. Plex seems to falls back to epoch - 1, which is a bit weird, because music can be from 1969-12-31.
  • Tracks or album titles have special characters in them. for instance: +, é, ' or

I’m wondering if the latter causes any issues, although that shouldn’t be case because the SQLite format should be UTF-8. I want to try if replacing or removing those will have any (positive) effect.

You can easily check if filenames have non ASCII characters under Linux with the following command: LC_ALL=C find . -name '*[! -~]*'.

Edit: I also still think this issue is related to the performance of my home server. I have an Intel 13500 and use all the P-cores (6, 12 with HT) for Plex. I have a feeling that there is a race condition where albums are possibly processed twice. Because all of the albums that have issues I notice (in the popup) that they will be processed multiple times. For instance, processing / analyzing a ‘good’ album should take something like 5 seconds, while a ‘bad’ album takes a minute or longer.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.