My VFS SweetSpot - Updated 30-Aug-2018


#341

What pathes do you mean ?

I can list my mount command here and also my cronjobs if that helps

I’am not sure if it was finished last time completly (my NAS was updated which is why the scan probably was interupted) but right now the manual scan I started it running. Should I let it finish ?

Yes media is beeing direct played. I am playing directly from the mount (is that wrong/bad?)


#342

If a movie or show was /something/Movie/Movie.mkv and changed to /herenow/Movie/Movie.mkv, plex has to check the file and make sure it’s the same thing.

I try to always keep my overall path/location of the file consistent when I’m doing things so it does not have to recsan my whole library again.

Yes, just let it finish so you can have that initial scan fully complete.

Your preference really as it doesn’t matter with way. For my use case, I user mergerfs. The 5-7 could also be if the media isn’t analyzed so has to do that before it plays it hard.


#343

How can I let plex force to anylze everything in my library to speed up the load times ?


#344

Let the first scan finish completely.


#345

Hey man. I just tried Plex behind a reverse-proxy - Let’sEncrypt with Nginx. Still having the same Direct Play issue. To be sure I tried Caddy - same issue. I’ve tried just about everything, no idea how you solved it. Any special settings for Caddy? I used a basic config posted below.

plex.myDomain.xxx {
gzip
root /var/www
tls myEmail # Email for Let’s Encrypt
proxy / 10.10.20.11:32400 {
transparent
}


#346

My caddy config is posted on my github that I use:

What’s your mount settings? What’s your player that is being used? Are there logs from DEBUG when you are playing?


#347

I’ve been busy, finally got around to this. Here’s a log of the 1st run of MediaInfo, takes about 2 minutes. Next, a log of the 2nd run, which is of course nearly instant. Plex is having issues with constant buffering, so something isn’t working right.

MediaInfo Pass 1 debug log
MediaInfo Pass 2 debug log


#348

Hello, @Animosity022! Thank you very much for your guides. But after following your settings and having tried several other variations, I still think plexdrive5 is much less of a headache than VFS is. I’m getting 100%+ CPU usage on scanning an 11 TB anime library wherein on multiple instances, PMS is unreachable.

CPU: Intel® Xeon® E5 1410 v2
RAM: 64 GB DDR3 ECC

rclone mount command
mergerfs command

I would ideally want to use a lot of RAM which plexdrive satisfies. I have seen suggestions from people to increase buffer size (I have tried 64M, 128M, 256M, 4G) which I have already tried. All have landed me in a similar position; the only difference being on the latter where the RAM usage was also at peak. If you could please help me on this, I’d really appreciate it.

EDIT: I should also mention that I have Deep analysis, loudness analysis, preview generation, chapter generation turned off, in sync with the settings in your screenshots.


#349

You look like you have something with Plex transcoding / syncing offline from the screenshot as Plex is using all your CPU and nothing to do with rclone.

On your command, you don’t need:

fast-list - does nothing on the mount
checkers does nothing on a mount
transfers does nothing on a mount
max-read-ahead does nothing unless you have a custom kernel

I think the mergerfs looks fine as that’s more related to your environment but you have sync_read.

What are you doing that Plex is transcoding? What’s the activity list?


#350

Can you grab the latest version as you look to be a DEV branch?

Is that media info from when you ran both commands?

I can see that is does close the file out a few times which seems strange:

textere@seraph:~/Downloads grep Flush test1.log
2018/11/26 10:53:55 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: Flush:
2018/11/26 10:53:55 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: >Flush: err=<nil>
2018/11/26 10:53:55 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: Flush:
2018/11/26 10:53:55 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: >Flush: err=<nil>
2018/11/26 10:53:56 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: Flush:
2018/11/26 10:53:56 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: >Flush: err=<nil>
2018/11/26 10:53:56 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: Flush:
2018/11/26 10:53:56 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: >Flush: err=<nil>
2018/11/26 10:55:51 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: Flush:
2018/11/26 10:55:51 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: >Flush: err=<nil>
2018/11/26 10:55:51 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: Flush:
2018/11/26 10:55:51 DEBUG : &{movies/Sample.Movie.Title.2015.1080p.DTS.x264/Sample.Movie.Title.2015.1080p.DTS.x264.mkv (r)}: >Flush: err=<nil>

The flushes usually make playback bad. What client are you using as a player?


#351

Here’s an updated log with 1.45

I tried the DEV branch to see if it was working better than the regular branch, but no luck. This is a mediainfo dry run (different movie so the total duration isn’t as long). It still has the same inexplicable dead spots where nothing is happening for many seconds at a time.

This happens whether I use the Plex player, web Plex player, Android client, anything. my rClone conf, for reference:

[gdrive_username]
type = drive
client_id = redacted
client_secret = redacted
scope = drive
root_folder_id = redacted
service_account_file =
token = redacted

[gcrypt_username]
type = crypt
remote = gdrive_username:
filename_encryption = standard
directory_name_encryption = true
password = redacted
password2 = redacted

Things I’ve tried:

  • Buffer size variations
  • drive-chunk-size variations (larger generally less stuttering)
  • vfs-read-chunk-size variations (128-256 generally less stuttering)
  • Different DNS providers (Quad9, Cloudflare, etc)
  • Increasing core counts and RAM on contianer (no effect – resource logs never show any sort of saturation on CPU, RAM, network, disk)
  • Running mediainfo on host vs container (no effect)

#352

What is your kernel version/OS?

felix@gemini:~/logs$ uname -a
Linux gemini 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

#353

The way media info works, it closes/opens the file usually 3 times if you run a trace on the file.

Having a bigger buffer would waste memory but generally shouldn’t cause any issues as once the file is closed the buffer is dumped.

drive-chunk-size is only for uploading so wouldn’t have any impact on reading a file so changes here shouldn’t matter.

      --drive-chunk-size SizeSuffix                Upload chunk size. Must a power of 2 >= 256k. (default 8M)

DNS really shouldn’t matter as once you make a connection, it should be set so it won’t do much other than maybe change a peer (could be helpful if you have a peering to a particular location).

My media info on a few test files comes back in 4-10 seconds. What’s the actual output of the file you are testing? I’ve seen where very complex containers might take longer, but 2 minutes seems way off.


#354
Linux servername 4.15.18-7-pve #1 SMP PVE 4.15.18-26 (Thu, 04 Oct 2018 11:03:06 +0200) x86_64 GNU/Linux

MediaInfo Output (took 45s)

When I run MediaInfo on a larger file, like a 20GB mkv remux, it runs for 5+ minutes (still going). I can ‘tail -f’ the log and it’s just a bunch of reads going on and on. If this is better suited to have its own thread, I’m happy to do that too, this config is driving me crazy.


#355

Yeah, something still seems very strange as here is an example of 50Gb file:

felix@gemini:/gmedia/Radarr_Movies/Tomb Raider (2018)$ ls -al
total 56455883
drwxrwxr-x 1 felix felix           0 Aug 27 14:13 Plex Versions
-rw-rw-r-- 1 felix felix 57810823461 Jul  1 23:27 Tomb Raider (2018).mkv
felix@gemini:/gmedia/Radarr_Movies/Tomb Raider (2018)$ time mediainfo Tomb\ Raider\ \(2018\).mkv
General
Unique ID                                : 248549693991481587955502839299685084104 (0xBAFCEE09832D52732BD74BE790C1EBC8)
Complete name                            : Tomb Raider (2018).mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 53.8 GiB
Duration                                 : 1 h 57 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 65.4 Mb/s
Movie name                               : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Encoded date                             : UTC 2018-06-13 12:15:53
Writing application                      : mkvmerge v24.0.0 ('Beyond The Pale') 64-bit
Writing library                          : libebml v1.3.6 + libmatroska v1.4.9
Cover                                    : Yes
Attachments                              : small_cover.jpg / small_cover_land.jpg / cover.jpg / cover_land.jpg / small_cover.jpg / small_cover_land.jpg / cover.jpg / cover_land.jpg

Video #1
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 57 min
Bit rate                                 : 52.4 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.264
Stream size                              : 43.1 GiB (80%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : SMPTE ST 2084
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : R: x=0.708000 y=0.292000, G: x=0.170000 y=0.797000, B: x=0.131000 y=0.046000, White point: x=0.312700 y=0.329000
Mastering display luminance              : min: 0.0050 cd/m2, max: 4000.0000 cd/m2
Maximum Content Light Level              : 2971 cd/m2
Maximum Frame-Average Light Level        : 112 cd/m2

Video #2
ID                                       : 2
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 57 min
Bit rate                                 : 64.6 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.001
Stream size                              : 54.5 MiB (0%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Default                                  : No
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : SMPTE ST 2084
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : R: x=0.708000 y=0.292000, G: x=0.170000 y=0.797000, B: x=0.131000 y=0.046000, White point: x=0.312700 y=0.329000
Mastering display luminance              : min: 0.0050 cd/m2, max: 4000.0000 cd/m2

Audio #1
ID                                       : 3
Format                                   : Atmos / TrueHD
Codec ID                                 : A_TRUEHD
Duration                                 : 1 h 57 min
Bit rate mode                            : Variable
Bit rate                                 : 3 214 kb/s
Maximum bit rate                         : 5 520 kb/s
Channel(s)                               : Object Based / 8 channels
Channel positions                        : Object Based / Front: L C R, Side: L R, Back: L R, LFE
Sampling rate                            :  / 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 spf)
Compression mode                         : Lossless
Stream size                              : 2.64 GiB (5%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 4
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : MA / Core
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 1 h 57 min
Bit rate mode                            : Variable / Constant
Bit rate                                 : 4 138 kb/s / 1 509 kb/s
Channel(s)                               : 8 channels / 6 channels
Channel positions                        : Front: L C R, Side: L R, Back: L R, LFE / Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 spf)
Bit depth                                : 24 bits
Compression mode                         : Lossless / Lossy
Stream size                              : 3.41 GiB (6%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : English
Default                                  : No
Forced                                   : No

Audio #3
ID                                       : 5
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 378 MiB (1%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : English
Default                                  : No
Forced                                   : No

Audio #4
ID                                       : 6
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 378 MiB (1%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : Japanese
Default                                  : No
Forced                                   : No

Audio #5
ID                                       : 7
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 378 MiB (1%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : English
Default                                  : No
Forced                                   : No

Audio #6
ID                                       : 8
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 378 MiB (1%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : French
Default                                  : No
Forced                                   : No

Audio #7
ID                                       : 9
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : MA / Core
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 1 h 57 min
Bit rate mode                            : Variable / Constant
Bit rate                                 : 2 335 kb/s / 1 509 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossless / Lossy
Stream size                              : 1.92 GiB (4%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : Italian
Default                                  : No
Forced                                   : No

Audio #8
ID                                       : 10
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 378 MiB (1%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : Chinese
Default                                  : No
Forced                                   : No

Audio #9
ID                                       : 11
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 378 MiB (1%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : Spanish
Default                                  : No
Forced                                   : No

Audio #10
ID                                       : 12
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1 h 57 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 spf)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 378 MiB (1%)
Title                                    : Tomb.Raider.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT
Language                                 : Portuguese
Default                                  : No
Forced                                   : No

Text #1
ID                                       : 13
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 56 min
Bit rate                                 : 20.6 kb/s
Count of elements                        : 2244
Stream size                              : 17.2 MiB (0%)
Title                                    : English-PGS
Language                                 : English
Default                                  : Yes
Forced                                   : No

Text #2
ID                                       : 14
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 56 min
Bit rate                                 : 14.4 kb/s
Count of elements                        : 1850
Stream size                              : 12.1 MiB (0%)
Title                                    : French-PGS
Language                                 : French
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 15
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 56 min
Bit rate                                 : 20.1 kb/s
Count of elements                        : 2304
Stream size                              : 16.8 MiB (0%)
Title                                    : Italian-PGS
Language                                 : Italian
Default                                  : No
Forced                                   : No

Text #4
ID                                       : 16
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 57 min
Bit rate                                 : 17.3 kb/s
Count of elements                        : 1816
Stream size                              : 14.5 MiB (0%)
Title                                    : Chinese-PGS
Language                                 : Chinese
Default                                  : No
Forced                                   : No

Text #5
ID                                       : 17
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 56 min
Bit rate                                 : 16.3 kb/s
Count of elements                        : 1700
Stream size                              : 13.6 MiB (0%)
Title                                    : Spanish-PGS
Language                                 : Spanish
Default                                  : No
Forced                                   : No

Text #6
ID                                       : 18
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 56 min
Bit rate                                 : 16.7 kb/s
Count of elements                        : 1694
Stream size                              : 13.9 MiB (0%)
Title                                    : Portuguese-PGS
Language                                 : Portuguese
Default                                  : No
Forced                                   : No

Text #7
ID                                       : 19
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 56 min
Bit rate                                 : 15.4 kb/s
Count of elements                        : 1712
Stream size                              : 12.9 MiB (0%)
Title                                    : Bulgarian-PGS
Language                                 : Bulgarian
Default                                  : No
Forced                                   : No

Text #8
ID                                       : 20
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 56 min
Bit rate                                 : 16.9 kb/s
Count of elements                        : 1694
Stream size                              : 14.1 MiB (0%)
Title                                    : Portuguese-PGS
Language                                 : Portuguese
Default                                  : No
Forced                                   : No

Text #9
ID                                       : 21
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 53 min
Bit rate                                 : 332 b/s
Count of elements                        : 38
Stream size                              : 276 KiB (0%)
Title                                    : French-FORCED-PGS
Language                                 : French
Default                                  : No
Forced                                   : No

Text #10
ID                                       : 22
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 53 min
Bit rate                                 : 458 b/s
Count of elements                        : 58
Stream size                              : 381 KiB (0%)
Title                                    : Italian-FORCED-PGS
Language                                 : Italian
Default                                  : No
Forced                                   : No

Text #11
ID                                       : 23
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 57 min
Bit rate                                 : 573 b/s
Count of elements                        : 78
Stream size                              : 494 KiB (0%)
Title                                    : Chinese-FORCED-PGS
Language                                 : Chinese
Default                                  : No
Forced                                   : No

Text #12
ID                                       : 24
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 41 min
Bit rate                                 : 281 b/s
Count of elements                        : 26
Stream size                              : 210 KiB (0%)
Title                                    : Spanish-FORCED-PGS
Language                                 : Spanish
Default                                  : No
Forced                                   : No

Text #13
ID                                       : 25
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 53 min
Bit rate                                 : 133 b/s
Count of elements                        : 16
Stream size                              : 111 KiB (0%)
Title                                    : Portuguese-FORCED-PGS
Language                                 : Portuguese
Default                                  : No
Forced                                   : No

Text #14
ID                                       : 26
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 45 min
Bit rate                                 : 222 b/s
Count of elements                        : 143
Stream size                              : 172 KiB (0%)
Title                                    : Japanese-PGS
Language                                 : Japanese
Default                                  : No
Forced                                   : No

Text #15
ID                                       : 27
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 50 min
Bit rate                                 : 11.9 kb/s
Count of elements                        : 1711
Stream size                              : 9.42 MiB (0%)
Title                                    : Japanese-FORCED-PGS
Language                                 : Japanese
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : en:Chapter 1
00:13:13.250                             : en:Chapter 2
00:24:04.234                             : en:Chapter 3
00:31:57.999                             : en:Chapter 4
00:39:57.061                             : en:Chapter 5
00:50:31.069                             : en:Chapter 6
01:04:49.844                             : en:Chapter 7
01:13:58.100                             : en:Chapter 8
01:20:17.395                             : en:Chapter 9
01:27:41.130                             : en:Chapter 10
01:38:41.624                             : en:Chapter 11
01:51:17.420                             : en:Chapter 12



real	0m2.488s
user	0m0.084s
sys	0m0.012s
felix@gemini:/gmedia

That’s first time as the second time takes sub 1 second.

Are you running Ubuntu? It could be a similar kernel issue that other folks have reported. I run Debian personally.


#356

Thanks, I’ll remove those options. I didn’t have them before though, only added recently to see if they would make a difference. I don’t see any reason that Plex should transcode because this is literally the first library I have put to scan. There is nothing else on Plex. I tried scanning the same library with plexdrive a few days ago, it finished without using any CPU at all in 4 to 5 hours with about 80-85% RAM usage.


#357

The mount using plexdrive or rclone doesn’t have any impact on the CPU Plex uses to scan a library as those aren’t related.

There is another task/person syncing/something else causing the CPU usage from Plex. You can figure that out from the Plex logs. You should something like:

felix@gemini:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs$ tail -f "Plex Media Scanner.log"
Nov 26, 2018 22:26:26.617 [0x7f22f4e64700] INFO - Plex Media Scanner v1.14.0.5468-5a0183d2c - ubuntu PC x86_64 - build: linux-ubuntu-x86_64 - GMT -05:00
Nov 26, 2018 22:26:26.618 [0x7f22f4e64700] INFO - Linux version: 4.9.0-8-amd64 (#1 SMP Debian 4.9.130-2 (2018-10-27)), language: en-US
Nov 26, 2018 22:26:26.618 [0x7f22f4e64700] INFO - Processor Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Nov 26, 2018 22:26:26.618 [0x7f22f4e64700] INFO - /usr/lib/plexmediaserver/Plex Media Scanner --scan --refresh --section 5

For me, that was just library refresh as media was added. There will be a clue in the logs from Plex as to what the cause for that was. If it isn’t someone playing a movie, it’s analyze/deep analyze/optimize/etc going on.


#358

I think you’re right. it isn’t rclone as I put on a scan with plexdrive mount and it’s more or less the same result.

As for logs, I constantly see a lot of these at which point PMS becomes largely unresponsive or just goes unreachable.

Sqlite3: Sleeping for 200ms to retry busy DB.
sendto: Operation not permitted

Also I see these in Analysis logs:

Waited one whole second for a busy database.
ERROR - Part 56671 disappeared while we were analyzing it.
Failed to begin transaction (../Library/MetadataItem.cpp:925) (tries=1): Cannot begin transaction. database is locked

Could this might be because of dropcacheonclose=true ? I remember having no sorts of problems like these when I scanned (the first time when I was setting everything up) from the drive mount itself instead of mergerfs.


#359

I just tried changing my settings to these, almost mirroring yours:

rclone
mergerfs

Now plex becomes unresponsive way sooner and the scanning doesn’t go past 10% of my library. The Scanner logs doesn’t show anything of substance but I found multiple occurences of these in the server logs:

DEBUG - Last refresh (1900-01-01 00:00:00) appears to be older than directory change time (2018-06-06 04:33:11), need to refresh local media agent.
DEBUG - [com.plexapp.agents.localmedia] Plug-in is starting, waiting 18 seconds for it to complete.

#360

If you change the paths on Plex for a file from one location to another, that causes Plex to reanalyze the file to validate it’s the same file. I try to keep my path names always the same if I use the mount or mergerfs.

You kind of need to pick one thing and let it run so your library gets analyzed. When I first setup and scanned about 25TB or so, it took about 36-48 hours to finish that as that’s the time consuming part of the effort.

Based on the odd errors you keep getting, you seem to have something going on with your Plex database as you are getting odd errors. You should get some of these:

Nov 27, 2018 06:06:28.863 [0x7f734effc700] WARN - SLOW QUERY: It took 210.000000 ms to retrieve 4 items.

and some of those:

Nov 26, 2018 21:15:03.509 [0x7f734aff4700] WARN - Held transaction for too long (../Versions/VersionItemGenerator.cpp:71): 0.230000 seconds
Nov 26, 2018 21:15:04.074 [0x7f734aff4700] WARN - Held transaction for too long (../Sync/SyncItemGenerator.cpp:153): 0.120000 seconds
Nov 26, 2018 21:15:04.244 [0x7f734aff4700] WARN - Held transaction for too long (../Sync/SyncItemGenerator.cpp:153): 0.130000 seconds
Nov 26, 2018 21:15:04.853 [0x7f734aff4700] WARN - Held transaction for too long (../Versions/VersionGarbageCollector.cpp:78): 0.110000 seconds
Nov 26, 2018 21:16:40.202 [0x7f736dbff700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 30 items.

as you have a cloud mount so Plex is expecting things to be faster/local, those can be ignored. Errors like parts disappearing or something more related to your mount and not being able to access the file.

What’s the size of your library?

felix@gemini:~$ rclone about gcrypt:
Used:    50.563T
Trashed: 0
Other:   57.134M

I use a script called plex-library-stats.sh to see what needs to be analyzed:

23017 files in library
0 files missing analyzation info
0 media_parts marked as deleted
0 metadata_items marked as deleted
0 directories marked as deleted
22838 files missing deep analyzation info.

You need to let the first scan complete as that analyzes each file and will take quite some time depending on the size of your library. Once the library is fully analyzed, scans are fast.