PMS 1.31 takes longer to scan than 1.29

The purpose is;

  1. Apples → Apples comparison (same data but different versions)

  2. Convert each person’s results into “unitized” results ( seconds/item – items/second )

  3. If the results are the same across the board then there is reason to investigate further.

  4. If results do not follow the same trend then differences can only be attributed to local storage / database status (at this point)

  5. Next step would be to fully optimize the database (my tool) and scan again.

Ok, makes sense.

I guess the reason I was asking about the collections is, once I deleted the collections from the database that was scanning slowly, the problem disappeared.

Now, the scan times are pretty much consistent across all versions. Native / Docker, and 1.29 / 1.31.

Like I said, I’m going to re-run the collections on various versions to see if the problem returns, but that will take time.

It’s important we compare Apples->Apples or Samsungs->Samsung :slight_smile:

Another question for you, are you using any Smart Collections in your Plex libraries?

I’ve done a lot of testing on this, setting up various instances of Plex and removing certain aspects of my libraries. And I happen to use several Smart Collections. When I remove these collections, my problem goes away.

I don’t know if Plex is automatically scanning new entries in the database, to see if they fit into any of these Smart Collections. If that’s the case, that could be the reason the scan is taking longer and stalling at the end.

The only smart collections I use are for music and atm I only have two defined. When I get some time I’ll delete these and see if it helps.

One observation I have is that when new media is added its scanned and match almost instantaneous but then the scanner goes off checking all the other folders if something has changed. This is VERY slow as the scanner crawls through the stuff which is unchanged …

Been busy with real life activity so not had much time to debug and troubleshoot :frowning:

@Departed69 QQ – within a library which is now slow scanning, how many individual media folders do you have within your library ? Not total folders, the number of folders in the library settings, basically here …

Screenshot from 2023-03-19 10-01-28

I had 3000+ movies in my main Movies folder /data/MediaServer/14b-Movies/Movies. As a test today I setup a brand new test plex server and I split them up into smaller chucks (700 or so).

Initial scan and match was as zippy as always, no issues whatever completing in approx 15 minutes. Then optimised the db, stop and restarted plex and ran a scan.

The scan was even slower that any previous test I’ve done before taking 2+ minutes to just scan for changes when none exist.

Using data I’ll collected along the way and from this thread I started Ubuntu 22.04 - Slow scanning of libraries here are my results:

All these times are from running a scan with NO changes to my Movies library:

  • Before this issue started happened → 10-15 seconds to fully scan for changes. Been like this for YEARS!
  • Initially reported with two folders under my plex movie library settings → 60-90 seconds
  • Today’s test with six folders under my plex movie library settings → 120-150 seconds

BTW… while these times themselves don’t appear to bad (a few minutes), its a pattern of degradation and its exponential for TV & Music libraries with much more content.

In my specific situation, I was able to remedy the situation by removing a lot of smart collections that I had set up. It still stalls for a short time at the end of the scan, but I’ve been able to determine that the amount of stall is directly related to the number of smart collections in my library.

I’m guessing that after a scan of new media is completed, Please then checks the smart collections to decide if that media should be added to the smart collection. Seems kind of inefficient, in my opinion, but that’s what we have.

1 Like

Thanks for the info. My issue is certainly similar but is different. I’ll use my other thread once I have some more data based on tests I’m still preforming.

Thanks again.

@Departed69 FYI → Ubuntu 22.04 - Slow scanning of libraries - #10 by dokuro

Summary, my issue is now resolved and was a kernel regression which is now patched.

1 Like

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