Plex scan of TV library running really long

I am testing out the new cache features with my Plex server. I switched from PlexDrive to the latest rclone beta last night. It seems to be working really well for the most part. However, my full library scan has been running for 12 hours straight. The movie scan (5k movies) seemed to finish within the normal window, but the TV scan (400 shows) has continued to run all morning. “Perform extensive media analysis during maintenance” is turned off. I have the Plex integration in my rclone config, but I know that only increases the workers during playback (not during scanning). Is there a better way to configure my rclone mount to make the scans happen in a reasonable amount of time? Here is my mount command (order is GD -> Cache -> Crypt):

/usr/bin/rclone-beta mount
–config /home/me/.config/rclone/rclone-beta.conf
–allow-non-empty
–allow-other
–vfs-cache-mode writes
–cache-db-purge
–log-file /dev/null
GD-cache-crypt:/ /home/me/plex/media/.gd-cache/ &

Should I change the buffer, workers, or other cache settings?

Thanks.

It sounds like you are analyzing files and not just doing a check in scan.

If you can your plex logs, you can see if it’s analyzing the files. The alert screen in the WebUI will show the processing of individual episodes as well.

Once it’s scanned, it should be quick. I would turn off the cache-db-purge as well as you only need that once imo as you want the cache to be persistent and only purge it via a kill -HUP if you have problems.

Thanks… I’ll check the logs. However, that doesn’t explain why it is taking so much longer with rclone than it did with PlexDrive. My Plex configuration hasn’t changed. Would there be something different about the file metadata in the switch that would cause Plex to think the file has changed, and that would trigger a reanalyze of the files? If that is the case, it would explain it. It would also mean that subsequent scans should be faster if the metadata stays consistent after the initial rescan.

I do have “Upgrade media analysis during maintenance” checked on. Should I turn that off? What other settings would affect the scan speed? I actually thought rclone would be FASTER at scanning than PlexDrive…

Did you change paths or anything or all the same?

I use a script I borrowed from someone to check library stats and see what’s left to analyze:

[felix@gemini scripts]$ cat plex-library-stats

#!/bin/bash
# Generate Plex Library stats
# OS: Ubuntu 16.04 ( change dbpath if using diffrent OS )
# Output:
# Media items in Libraries
# Library = Movies
#  Items = 2815

# Library = TV Shows
#  Items = 13105

# Time to watch
# Library = Movies
# Minutes = 312664
#   Hours = 5211
#    Days = 217

# Library = TV Shows
# Minutes = 525251
#   Hours = 8754
#    Days = 364

# 15921 files in library
# 0 metadata_items marked as deleted
# 0 media_parts marked as deleted
# 0 media_items marked as deleted
# 0 directories marked as deleted
# 0 files missing analyzation info
# 15491 files missing deep analyzation info.

logfile="/home/felix/logs/plexstats.log"
db="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
echo "$(date "+%d.%m.%Y %T") PLEX LIBRARY STATS" | tee -a $logfile
echo "Media items in Libraries" | tee -a $logfile
query="SELECT Library, Items \
                        FROM ( SELECT name AS Library, \
                        COUNT(duration) AS Items \
                        FROM media_items m  \
                        LEFT JOIN library_sections l ON l.id = m.library_section_id  \
                        WHERE library_section_id > 0 GROUP BY name );"
sqlite3 -header -line "$db" "$query" | tee -a $logfile
echo " " | tee -a

query="select count(*) from media_items"
result=$(sqlite3 -header -line "$db" "$query")
echo "${result:11} files in library" | tee -a $logfile

query="select count(*) From media_items Inner Join metadata_items On media_items.metadata_item_id = metadata_items.id Where media_items.bitrate Is Null And Not metadata_items.metadata_type = 12"
result=$(sqlite3 -header -line "$db" "$query")
echo "${result:11} files missing analyzation info" | tee -a $logfile

query="SELECT count(*) FROM media_parts WHERE deleted_at is not null"
result=$(sqlite3 -header -line "$db" "$query")
echo "${result:11} media_parts marked as deleted" | tee -a $logfile

query="SELECT count(*) FROM metadata_items WHERE deleted_at is not null"
result=$(sqlite3 -header -line "$db" "$query")
echo "${result:11} metadata_items marked as deleted" | tee -a $logfile

query="SELECT count(*) FROM directories WHERE deleted_at is not null"
result=$(sqlite3 -header -line "$db" "$query")
echo "${result:11} directories marked as deleted" | tee -a $logfile

query="select count(*) from metadata_items meta \
                        join media_items media on media.metadata_item_id = meta.id \
                        join media_parts part on part.media_item_id = media.id \
                        where part.extra_data not like '%deepAnalysisVersion=2%' \
                        and meta.metadata_type in (1, 4, 12) and part.file != '';"
result=$(sqlite3 -header -line "$db" "$query")
echo "${result:11} files missing deep analyzation info." | tee -a $logfile
exit
0

For me that will spit out some output that shows what’s the count and what’s left to analyze. If nothing changed, I wouldn’t expect the scan to take long.

Upgrade on analysis just checks for anything during the time window you’ve selected. I personally keep it off as plex normally can analyze before it plays a file but that makes it take a little longer to play so keeping things analyzed is usually helpful.

Path in Plex stayed the same. I just changed the symbolic link to point to the rclone mount instead of the PlexDrive link.

I’m going to check out your script right now… Interesting…

If I purge my cache DB and let it scan again, I have roughly 40TB of stuff with 1749 Movies and 18944 TV shows and with everything analyzed, the scan to rebuild the cache maybe takes 10-15 minutes.

After the cache is there, it’s maybe 1 minute to scan the entire thing.

If you check your alerts in the WebUI, are you seeing things like this?

That is when it’s analyzing a newly added show that it hasn’t seen before.

Hmm. The other thing I notice at times is that if I fiddle with my settings too much, something in the cache gets funky and I have to just -HUP it to clear it and do a quick scan again to bring things back to normal.

I should probably run DEBUG at some point to figure out what the issue is but since my settings have been very static, I don’t see the issue often.

So if the library stats show everything is analyzed, might be worthwhile to clear the cache and do a scan. Once that finished for me, scans went back to super fast.

What do you mean by “funky”? What are the symptoms? And I know I could find this if I searched, but what is the exact command to send the HUP signal?

Thanks again.

kill -HUP rclone_process_#

My normal full library scan takes roughly 30 seconds when the cache is working properly. I was fiddling with settings and added nothing to the library and the scan would start to analyze files that already are there and just plain take ‘long’ cause it was analyzing stuff it was thinking was new.

I didn’t spend the time to turn up plex or rclone logging as a kill -HUP cleaning out the cache and another scan solved the issue. Once I get some time, I’ll try to collect the logs and see.

My scans are still taking a LONG time… I turned on verbose logging in Plex. It seems that there are some seemingly random slowdowns in the process. It just takes longer than it should for each directory and then has some strange looking breaks of anything from several seconds to 20+ seconds.

The scanner analysis log is pretty much empty. So, I don’t think it is doing analysis. It is just taking a long time to get the last change dates and decide whether to further the scan or not… Look at my comment in-line in the log below. There is a 25 second gap between “gumball” and “earth to moon”.

Here is a chunk of the scanner log.
Apr 17, 2018 13:58:54.185 [0x7f057e4b8800] VERBOSE - * Noting that ‘’ was updated at 2017-05-25 22:36:20
Apr 17, 2018 13:58:54.186 [0x7f057e4b8800] VERBOSE - * Taking directory ‘’ (5373) out of the map (2434 left)
Apr 17, 2018 13:58:54.384 [0x7f057e4b8800] VERBOSE - * Noting that ‘Moonlighting’ was updated at 2018-04-16 01:51:16
Apr 17, 2018 13:58:54.384 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Moonlighting’ (7958) out of the map (2433 left)
Apr 17, 2018 13:58:54.412 [0x7f057e4b8800] VERBOSE - * Noting that ‘Moonlighting/Season 1’ was updated at 2018-04-16 01:51:29
Apr 17, 2018 13:58:54.412 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Moonlighting/Season 1’ (7959) out of the map (2432 left)
Apr 17, 2018 13:58:54.449 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Michael McIntyre Chat Show’ was updated at 2018-04-15 18:48:15
Apr 17, 2018 13:58:54.449 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Michael McIntyre Chat Show’ (7955) out of the map (2431 left)
Apr 17, 2018 13:58:54.465 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Michael McIntyre Chat Show/Season 1’ was updated at 2018-04-15 18:48:23
Apr 17, 2018 13:58:54.465 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Michael McIntyre Chat Show/Season 1’ (7956) out of the map (2430 left)
Apr 17, 2018 13:58:54.547 [0x7f057e4b8800] VERBOSE - * Noting that ‘The 100’ was updated at 2018-04-13 18:33:00
Apr 17, 2018 13:58:54.547 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The 100’ (7945) out of the map (2429 left)
Apr 17, 2018 13:58:54.567 [0x7f057e4b8800] VERBOSE - * Noting that ‘The 100/Season 3’ was updated at 2018-04-15 18:06:20
Apr 17, 2018 13:58:54.567 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The 100/Season 3’ (7960) out of the map (2428 left)
Apr 17, 2018 13:58:54.605 [0x7f057e4b8800] VERBOSE - * Noting that ‘The 100/Season 2’ was updated at 2018-04-13 18:33:07
Apr 17, 2018 13:58:54.605 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The 100/Season 2’ (7946) out of the map (2427 left)
Apr 17, 2018 13:58:54.659 [0x7f057e4b8800] VERBOSE - * Noting that ‘Lost in Space (2018)’ was updated at 2018-04-13 06:15:04
Apr 17, 2018 13:58:54.659 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Lost in Space (2018)’ (7942) out of the map (2426 left)
Apr 17, 2018 13:58:54.674 [0x7f057e4b8800] VERBOSE - * Noting that ‘Lost in Space (2018)/Season 1’ was updated at 2018-04-13 06:15:18
Apr 17, 2018 13:58:54.674 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Lost in Space (2018)/Season 1’ (7943) out of the map (2425 left)
Apr 17, 2018 13:58:54.776 [0x7f057e4b8800] VERBOSE - * Noting that ‘Pushing Daisies’ was updated at 2018-04-12 15:12:52
Apr 17, 2018 13:58:54.776 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Pushing Daisies’ (7939) out of the map (2424 left)
Apr 17, 2018 13:58:54.791 [0x7f057e4b8800] VERBOSE - * Noting that ‘Pushing Daisies/Season 2’ was updated at 2018-04-13 06:38:47
Apr 17, 2018 13:58:54.791 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Pushing Daisies/Season 2’ (7954) out of the map (2423 left)
Apr 17, 2018 13:58:54.832 [0x7f057e4b8800] VERBOSE - * Noting that ‘Pushing Daisies/Season 1’ was updated at 2018-04-12 15:13:16
Apr 17, 2018 13:58:54.832 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Pushing Daisies/Season 1’ (7940) out of the map (2422 left)
Apr 17, 2018 13:58:54.904 [0x7f057e4b8800] VERBOSE - * Noting that ‘Revolution’ was updated at 2018-04-12 10:45:00
Apr 17, 2018 13:58:54.904 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Revolution’ (7936) out of the map (2421 left)
Apr 17, 2018 13:58:54.921 [0x7f057e4b8800] VERBOSE - * Noting that ‘Revolution/Season 2’ was updated at 2018-04-12 12:58:39
Apr 17, 2018 13:58:54.921 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Revolution/Season 2’ (7937) out of the map (2420 left)
Apr 17, 2018 13:58:55.127 [0x7f057e4b8800] VERBOSE - * Noting that ‘Revolution/Season 1’ was updated at 2018-04-12 10:45:21
Apr 17, 2018 13:58:55.127 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Revolution/Season 1’ (7938) out of the map (2419 left)
Apr 17, 2018 13:58:55.322 [0x7f057e4b8800] VERBOSE - * Noting that ‘Hell on Wheels’ was updated at 2018-04-10 20:09:14
Apr 17, 2018 13:58:55.322 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Hell on Wheels’ (7929) out of the map (2418 left)
Apr 17, 2018 13:58:55.343 [0x7f057e4b8800] VERBOSE - * Noting that ‘Hell on Wheels/Season 1’ was updated at 2018-04-10 20:12:14
Apr 17, 2018 13:58:55.343 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Hell on Wheels/Season 1’ (7930) out of the map (2417 left)
Apr 17, 2018 13:58:55.448 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Amazing World of Gumball’ was updated at 2018-04-08 10:38:21
Apr 17, 2018 13:58:55.448 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Amazing World of Gumball’ (7919) out of the map (2416 left)
Apr 17, 2018 13:58:55.472 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Amazing World of Gumball/Season 1’ was updated at 2018-04-11 13:12:12
Apr 17, 2018 13:58:55.472 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Amazing World of Gumball/Season 1’ (7933) out of the map (2415 left)
Apr 17, 2018 13:58:55.750 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Amazing World of Gumball/Season 3’ was updated at 2018-04-09 15:35:09
Apr 17, 2018 13:58:55.750 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Amazing World of Gumball/Season 3’ (7924) out of the map (2414 left)
Apr 17, 2018 13:59:04.651 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Amazing World of Gumball/Season 2’ was updated at 2018-04-08 23:14:53
Apr 17, 2018 13:59:04.651 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Amazing World of Gumball/Season 2’ (7923) out of the map (2413 left)
Apr 17, 2018 13:59:04.854 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Amazing World of Gumball/Season 6’ was updated at 2018-04-08 19:32:21
Apr 17, 2018 13:59:04.854 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Amazing World of Gumball/Season 6’ (7922) out of the map (2412 left)
Apr 17, 2018 13:59:04.989 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Amazing World of Gumball/Season 5’ was updated at 2018-04-08 17:45:13
Apr 17, 2018 13:59:04.989 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Amazing World of Gumball/Season 5’ (7921) out of the map (2411 left)
Apr 17, 2018 13:59:05.392 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Amazing World of Gumball/Season 4’ was updated at 2018-04-08 10:38:25
Apr 17, 2018 13:59:05.393 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Amazing World of Gumball/Season 4’ (7920) out of the map (2410 left)

[COMMENT: Why did it take 25 seconds from finishing “The Amazing World of Gumball” before it processed “From the Earth to the Moon”??? ]

Apr 17, 2018 13:59:30.822 [0x7f057e4b8800] VERBOSE - * Noting that ‘From the Earth to the Moon’ was updated at 2018-03-30 02:44:52
Apr 17, 2018 13:59:30.822 [0x7f057e4b8800] VERBOSE - * Taking directory ‘From the Earth to the Moon’ (7905) out of the map (2409 left)
Apr 17, 2018 13:59:30.838 [0x7f057e4b8800] VERBOSE - * Noting that ‘From the Earth to the Moon/Season 1’ was updated at 2018-03-30 02:44:55
Apr 17, 2018 13:59:30.838 [0x7f057e4b8800] VERBOSE - * Taking directory ‘From the Earth to the Moon/Season 1’ (7906) out of the map (2408 left)
Apr 17, 2018 13:59:30.878 [0x7f057e4b8800] VERBOSE - * Noting that ‘Splitting Up Together (US)’ was updated at 2018-03-28 04:27:21
Apr 17, 2018 13:59:30.878 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Splitting Up Together (US)’ (7900) out of the map (2407 left)
Apr 17, 2018 13:59:30.896 [0x7f057e4b8800] VERBOSE - * Noting that ‘Splitting Up Together (US)/Season 1’ was updated at 2018-03-28 04:27:43
Apr 17, 2018 13:59:30.896 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Splitting Up Together (US)/Season 1’ (7901) out of the map (2406 left)
Apr 17, 2018 13:59:30.943 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller Tell a Lie’ was updated at 2018-03-22 21:39:58
Apr 17, 2018 13:59:30.943 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller Tell a Lie’ (7884) out of the map (2405 left)
Apr 17, 2018 13:59:30.958 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller Tell a Lie/Season 1’ was updated at 2018-03-22 21:40:00
Apr 17, 2018 13:59:30.958 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller Tell a Lie/Season 1’ (7885) out of the map (2404 left)
Apr 17, 2018 13:59:30.993 [0x7f057e4b8800] VERBOSE - * Noting that ‘Krypton’ was updated at 2018-03-22 15:06:14
Apr 17, 2018 13:59:30.993 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Krypton’ (7886) out of the map (2403 left)
Apr 17, 2018 13:59:31.009 [0x7f057e4b8800] VERBOSE - * Noting that ‘Krypton/Season 1’ was updated at 2018-03-22 15:06:21
Apr 17, 2018 13:59:31.009 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Krypton/Season 1’ (7887) out of the map (2402 left)
Apr 17, 2018 13:59:31.059 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Fool Us’ was updated at 2018-03-21 18:45:41
Apr 17, 2018 13:59:31.059 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Fool Us’ (7871) out of the map (2401 left)
Apr 17, 2018 13:59:31.080 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Fool Us/Season 2’ was updated at 2018-03-22 17:08:15
Apr 17, 2018 13:59:31.080 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Fool Us/Season 2’ (7880) out of the map (2400 left)
Apr 17, 2018 14:00:06.240 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Fool Us/Season 3’ was updated at 2018-03-21 21:30:11
Apr 17, 2018 14:00:06.241 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Fool Us/Season 3’ (7875) out of the map (2399 left)
Apr 17, 2018 14:00:06.399 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Fool Us/Season 4’ was updated at 2018-03-21 20:20:26
Apr 17, 2018 14:00:06.399 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Fool Us/Season 4’ (7872) out of the map (2398 left)
Apr 17, 2018 14:00:06.550 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Fool Us/Season 1’ was updated at 2018-03-21 18:45:46
Apr 17, 2018 14:00:06.550 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Fool Us/Season 1’ (7876) out of the map (2397 left)
Apr 17, 2018 14:00:40.425 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!’ was updated at 2018-03-21 18:39:13
Apr 17, 2018 14:00:40.425 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!’ (7868) out of the map (2396 left)
Apr 17, 2018 14:00:40.473 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 2’ was updated at 2018-03-22 17:08:25
Apr 17, 2018 14:00:40.474 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 2’ (7881) out of the map (2395 left)
Apr 17, 2018 14:00:40.622 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 4’ was updated at 2018-03-22 17:08:22
Apr 17, 2018 14:00:40.622 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 4’ (7882) out of the map (2394 left)
Apr 17, 2018 14:00:40.727 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 8’ was updated at 2018-03-22 10:26:22
Apr 17, 2018 14:00:40.727 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 8’ (7879) out of the map (2393 left)
Apr 17, 2018 14:00:40.839 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 7’ was updated at 2018-03-21 21:30:22
Apr 17, 2018 14:00:40.839 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 7’ (7877) out of the map (2392 left)
Apr 17, 2018 14:00:40.939 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 6’ was updated at 2018-03-21 21:30:19
Apr 17, 2018 14:00:40.939 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 6’ (7873) out of the map (2391 left)
Apr 17, 2018 14:00:41.050 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 3’ was updated at 2018-03-21 21:30:14
Apr 17, 2018 14:00:41.050 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 3’ (7878) out of the map (2390 left)
Apr 17, 2018 14:00:41.195 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 5’ was updated at 2018-03-21 20:20:20
Apr 17, 2018 14:00:41.195 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 5’ (7870) out of the map (2389 left)
Apr 17, 2018 14:00:41.307 [0x7f057e4b8800] VERBOSE - * Noting that ‘Penn & Teller- Bullshit!/Season 1’ was updated at 2018-03-21 18:42:16
Apr 17, 2018 14:00:41.307 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Penn & Teller- Bullshit!/Season 1’ (7869) out of the map (2388 left)
Apr 17, 2018 14:00:41.464 [0x7f057e4b8800] VERBOSE - * Noting that ‘Instinct (2018)’ was updated at 2018-03-19 05:29:03
Apr 17, 2018 14:00:41.464 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Instinct (2018)’ (7860) out of the map (2387 left)
Apr 17, 2018 14:00:41.478 [0x7f057e4b8800] VERBOSE - * Noting that ‘Instinct (2018)/Season 1’ was updated at 2018-03-19 05:31:44
Apr 17, 2018 14:00:41.478 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Instinct (2018)/Season 1’ (7861) out of the map (2386 left)
Apr 17, 2018 14:00:41.533 [0x7f057e4b8800] VERBOSE - * Noting that ‘Bull (2016)’ was updated at 2018-03-14 18:03:12
Apr 17, 2018 14:00:41.533 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Bull (2016)’ (7852) out of the map (2385 left)
Apr 17, 2018 14:00:41.851 [0x7f057e4b8800] VERBOSE - * Noting that ‘Bull (2016)/Season 1’ was updated at 2018-03-15 00:32:36
Apr 17, 2018 14:00:41.851 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Bull (2016)/Season 1’ (7853) out of the map (2384 left)
Apr 17, 2018 14:00:52.858 [0x7f057e4b8800] VERBOSE - * Noting that ‘Bull (2016)/Season 2’ was updated at 2018-03-14 18:03:14
Apr 17, 2018 14:00:52.858 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Bull (2016)/Season 2’ (7857) out of the map (2383 left)
Apr 17, 2018 14:00:54.958 [0x7f057e4b8800] VERBOSE - * Noting that ‘Dimension 404’ was updated at 2018-03-14 16:00:00
Apr 17, 2018 14:00:54.958 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Dimension 404’ (7850) out of the map (2382 left)
Apr 17, 2018 14:00:54.972 [0x7f057e4b8800] VERBOSE - * Noting that ‘Dimension 404/Season 1’ was updated at 2018-03-14 16:08:23
Apr 17, 2018 14:00:54.972 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Dimension 404/Season 1’ (7851) out of the map (2381 left)
Apr 17, 2018 14:00:55.047 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Treehouse Guys’ was updated at 2018-03-02 09:15:19
Apr 17, 2018 14:00:55.047 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Treehouse Guys’ (7800) out of the map (2380 left)
Apr 17, 2018 14:00:55.063 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Treehouse Guys/Season 3’ was updated at 2018-03-02 10:58:13
Apr 17, 2018 14:00:55.063 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Treehouse Guys/Season 3’ (7806) out of the map (2379 left)
Apr 17, 2018 14:01:03.000 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Treehouse Guys/Season 2’ was updated at 2018-03-02 09:15:24
Apr 17, 2018 14:01:03.000 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Treehouse Guys/Season 2’ (7801) out of the map (2378 left)
Apr 17, 2018 14:01:49.155 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters’ was updated at 2018-03-02 08:54:17
Apr 17, 2018 14:01:49.155 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters’ (7802) out of the map (2377 left)
Apr 17, 2018 14:01:49.187 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 8’ was updated at 2018-03-02 13:41:41
Apr 17, 2018 14:01:49.187 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 8’ (7807) out of the map (2376 left)
Apr 17, 2018 14:01:49.259 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 5’ was updated at 2018-03-02 13:01:01
Apr 17, 2018 14:01:49.259 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 5’ (7808) out of the map (2375 left)
Apr 17, 2018 14:01:49.366 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 4’ was updated at 2018-03-02 12:29:41
Apr 17, 2018 14:01:49.366 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 4’ (7809) out of the map (2374 left)
Apr 17, 2018 14:01:49.493 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 6’ was updated at 2018-03-02 12:29:40
Apr 17, 2018 14:01:49.493 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 6’ (7810) out of the map (2373 left)
Apr 17, 2018 14:01:49.594 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 9’ was updated at 2018-03-02 12:29:39
Apr 17, 2018 14:01:49.594 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 9’ (7811) out of the map (2372 left)
Apr 17, 2018 14:01:49.696 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 7’ was updated at 2018-03-02 11:31:57
Apr 17, 2018 14:01:49.696 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 7’ (7812) out of the map (2371 left)
Apr 17, 2018 14:01:49.792 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 3’ was updated at 2018-03-02 09:52:14
Apr 17, 2018 14:01:49.792 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 3’ (7813) out of the map (2370 left)
Apr 17, 2018 14:01:49.942 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 10’ was updated at 2018-03-02 09:52:12
Apr 17, 2018 14:01:49.942 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 10’ (7814) out of the map (2369 left)
Apr 17, 2018 14:01:50.041 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 2’ was updated at 2018-03-02 09:16:21
Apr 17, 2018 14:01:50.041 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 2’ (7803) out of the map (2368 left)
Apr 17, 2018 14:01:50.132 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters/Season 1’ was updated at 2018-03-02 08:54:18
Apr 17, 2018 14:01:50.132 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters/Season 1’ (7804) out of the map (2367 left)
Apr 17, 2018 14:01:50.249 [0x7f057e4b8800] VERBOSE - * Noting that ‘Bad Days’ was updated at 2018-02-26 22:31:48
Apr 17, 2018 14:01:50.249 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Bad Days’ (7781) out of the map (2366 left)
Apr 17, 2018 14:01:50.266 [0x7f057e4b8800] VERBOSE - * Noting that ‘Bad Days/Season 2’ was updated at 2018-02-26 23:33:15
Apr 17, 2018 14:01:50.266 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Bad Days/Season 2’ (7783) out of the map (2365 left)
Apr 17, 2018 14:01:50.405 [0x7f057e4b8800] VERBOSE - * Noting that ‘Bad Days/Season 3’ was updated at 2018-02-26 23:09:57
Apr 17, 2018 14:01:50.405 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Bad Days/Season 3’ (7786) out of the map (2364 left)
Apr 17, 2018 14:01:50.538 [0x7f057e4b8800] VERBOSE - * Noting that ‘Bad Days/Season 1’ was updated at 2018-02-26 22:31:49
Apr 17, 2018 14:01:50.538 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Bad Days/Season 1’ (7782) out of the map (2363 left)
Apr 17, 2018 14:01:50.667 [0x7f057e4b8800] VERBOSE - * Noting that ‘Britannia’ was updated at 2018-02-23 14:00:15
Apr 17, 2018 14:01:50.667 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Britannia’ (7754) out of the map (2362 left)
Apr 17, 2018 14:01:51.136 [0x7f057e4b8800] VERBOSE - * Noting that ‘Britannia/Season 1’ was updated at 2018-02-23 14:00:18
Apr 17, 2018 14:01:51.136 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Britannia/Season 1’ (7755) out of the map (2361 left)
Apr 17, 2018 14:01:53.411 [0x7f057e4b8800] VERBOSE - * Noting that ‘Cosmos’ was updated at 2018-02-23 11:04:23
Apr 17, 2018 14:01:53.411 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Cosmos’ (7752) out of the map (2360 left)
Apr 17, 2018 14:01:53.429 [0x7f057e4b8800] VERBOSE - * Noting that ‘Cosmos/Season 1’ was updated at 2018-02-23 11:04:24
Apr 17, 2018 14:01:53.430 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Cosmos/Season 1’ (7753) out of the map (2359 left)
Apr 17, 2018 14:03:34.705 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Pillars of the Earth’ was updated at 2018-02-18 16:21:13
Apr 17, 2018 14:03:34.705 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Pillars of the Earth’ (7707) out of the map (2358 left)
Apr 17, 2018 14:03:34.723 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Pillars of the Earth/Season 1’ was updated at 2018-02-18 16:28:08
Apr 17, 2018 14:03:34.723 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Pillars of the Earth/Season 1’ (7708) out of the map (2357 left)
Apr 17, 2018 14:03:34.849 [0x7f057e4b8800] VERBOSE - * Noting that ‘Stargate- Origins’ was updated at 2018-02-15 05:45:54

Shouldn’t each directory take a few milliseconds???

Here is another couple of big gaps:

Apr 17, 2018 14:00:55.047 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Treehouse Guys’ was updated at 2018-03-02 09:15:19
Apr 17, 2018 14:00:55.047 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Treehouse Guys’ (7800) out of the map (2380 left)
Apr 17, 2018 14:00:55.063 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Treehouse Guys/Season 3’ was updated at 2018-03-02 10:58:13
Apr 17, 2018 14:00:55.063 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Treehouse Guys/Season 3’ (7806) out of the map (2379 left)

<------- 8 second gap between seasons

Apr 17, 2018 14:01:03.000 [0x7f057e4b8800] VERBOSE - * Noting that ‘The Treehouse Guys/Season 2’ was updated at 2018-03-02 09:15:24
Apr 17, 2018 14:01:03.000 [0x7f057e4b8800] VERBOSE - * Taking directory ‘The Treehouse Guys/Season 2’ (7801) out of the map (2378 left)

<------ 46 second gap!!!

Apr 17, 2018 14:01:49.155 [0x7f057e4b8800] VERBOSE - * Noting that ‘Treehouse Masters’ was updated at 2018-03-02 08:54:17
Apr 17, 2018 14:01:49.155 [0x7f057e4b8800] VERBOSE - * Taking directory ‘Treehouse Masters’ (7802) out of the map (2377 left)

Are you able to check your plex logs at the same time something is happening that’s stuck? You can see if it’s trying to analyze a file.

You’d see something like this:

[felix@gemini Logs]$ cat 'Plex Media Scanner.log'
Apr 17, 2018 20:25:54.381 [0x7f9b4ec30700] INFO - Plex Media Scanner v1.12.3.4973-215c28d86 - ubuntu PC x86_64 - build: linux-ubuntu-x86_64 - GMT -04:00
Apr 17, 2018 20:25:54.381 [0x7f9b4ec30700] INFO - Linux version: 4.15.16-300.fc27.x86_64 (#1 SMP Mon Apr 9 17:50:06 UTC 2018), language: en-US
Apr 17, 2018 20:25:54.381 [0x7f9b4ec30700] INFO - Processor Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Apr 17, 2018 20:25:54.382 [0x7f9b4ec30700] INFO - /usr/lib/plexmediaserver/Plex Media Scanner --analyze --item 28871

What I posted was a direct copy & paste from the ‘Plex Media Scanner.log’ with verbose enabled. I don’t see any analyze happening. In fact, all of the messages are stating that the scanner is “taking directory out of the map”, which I think means it isn’t doing anything with the files in the directory.

Did you try to kill -HUP the process and let it just redo the cache and see if it comes back to normal after the longer scan?

Yep… Tried it…

I’m wondering if it is either a cpu or network limitation… But, it was much, much faster with PlexDrive… I wonder if rclone is doing some sort of network call that PlexDrive didn’t need to do???

Is there any copying etc going on in another task to the drive?

What I noticed is that my directory caching time was too low. I increased it and did a recursive ls to prime the pump. My 4tb test dir takes about 3 minutes tops to scan now

There is no other task accessing the rclone cache on this server. I run nothing but Plex and PlexPy on this machine. However, I do have Sonarr and Radarr running on a different machine; they have their own rclone cache mount, of course…

I might try the recursive ls idea… I’ll try it out and see what happens. How big are your libraries?

My test lib is 4tb. I ran into an issue where the dir db was in use by another process

What do you mean regarding increasing your directory caching time prior to running the ls? What exactly did you change?