# Make media analysis stop wasting CPU on duplicate/repeated analysis

**URL:** https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275
**Category:** Plex Media Server
**Created:** [September 11, 2023, 10:33pm UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275 "2023-09-11T22:33:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![x0zfa](https://avatars.discourse-cdn.com/v4/letter/x/cab0a1/32.png) [@x0zfa](https://forums.plex.tv/u/x0zfa)
#### Post date: [September 11, 2023, 10:33pm UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/1 "2023-09-11T22:33:56Z")

</div>

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:

> [@Duplicate loudness analysis](https://forums.plex.tv/t/duplicate-loudness-analysis/850406):
>
> Server Version#: 1.32.5.7349 Player Version#:n/a Plex runs unnecessary loudness analysis on albums that already had their loudness analyzed whenever I set Analyze audio tracks for loudness to as a scheduled task and when media is added. After I add new media, very old media is also forcefully analyzed for loudness. It seems to me that the --force flag is just unnecessary on this operation, because it doesn’t consider that loudness analysis has already been completed. Inspecting tracks also sh…

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.

---

<div class="post-metadata">

### Author: ![alex3305](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alex3305](https://forums.plex.tv/u/alex3305)
#### Post date: [November 23, 2023, 12:35pm UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/2 "2023-11-23T12:35:51Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

### Author: ![alex3305](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alex3305](https://forums.plex.tv/u/alex3305)
#### Post date: [November 30, 2023, 8:40pm UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/3 "2023-11-30T20:40:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![alex3305](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alex3305](https://forums.plex.tv/u/alex3305)
#### Post date: [January 21, 2024, 9:09am UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/4 "2024-01-21T09:09:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![alex3305](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alex3305](https://forums.plex.tv/u/alex3305)
#### Post date: [February 26, 2024, 11:42am UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/5 "2024-02-26T11:42:07Z")

</div>

Still an issue.

---

<div class="post-metadata">

### Author: ![x0zfa](https://avatars.discourse-cdn.com/v4/letter/x/cab0a1/32.png) [@x0zfa](https://forums.plex.tv/u/x0zfa)
#### Post date: [February 28, 2024, 11:10pm UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/6 "2024-02-28T23:10:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![alex3305](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alex3305](https://forums.plex.tv/u/alex3305)
#### Post date: [February 29, 2024, 10:00am UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/7 "2024-02-29T10:00:10Z")

</div>

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

---

<div class="post-metadata">

### Author: ![alex3305](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@alex3305](https://forums.plex.tv/u/alex3305)
#### Post date: [April 9, 2024, 11:58am UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/8 "2024-04-09T11:58:18Z")

</div>

A couple of weeks ago I tried to the [Plex Dance](https://forums.plex.tv/t/the-plex-dance/197064) 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.

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [July 8, 2024, 11:58am UTC](https://forums.plex.tv/t/make-media-analysis-stop-wasting-cpu-on-duplicate-repeated-analysis/853275/9 "2024-07-08T11:58:59Z")

</div>

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