Best mount settings for streaming ( Plex )

Yup. Come to think of it, that alone is probably worth switching.

And the fact that ncw is constantly optimizing it :slight_smile:

I’m just syncing from Google Drive to Amazon Drive, using Scaleway VPS, with pretty decent transfer rates…

These are my settings:

rclone --verbose --transfers=20 --drive-chunk-size=32M --no-update-modtime --ignore-existing sync google:PATH amazon:PATH

@pushnoi I changed my mind and switched my Plex server to Crypt now, as i started to get tons of requests and did not want to have maintain encfs and crypt libs ( eg double space/upload )

Made quick test with 5 streams running.

version: rclone v1.35-47-g29c6e22β (latest beta)
Testing Mount options: rclone mount --read-only --allow-non-empty --allow-other --max-read-ahead 14G --acd-templink-threshold 0 --checkers 16 -v --debug-fuse --dump-headers --log-file=/home/plex/logs/cryptmount.log acdcrypt: /storage/acdcrypt/

The production mount options:
rclone mount --read-only --allow-non-empty --allow-other --max-read-ahead 14G --acd-templink-threshold 0 --checkers 16 --quiet --stats 0 acdcrypt: /storage/acdcrypt/
(NOTE. I plan to remove -max-read-ahead as default is already max 128K and thats OS limit )

During around 10/15 minutes test streaming worked great without any hickups, there were no errors in Plex Media Server logs, and couple of things in cryptmount.log.

It seems rclone have some problems reading the hidden files, BUT this wont be the problem as .fuse folder wont be present anymore in my crypt mount anymore. ( with encfs i did not filter it out during upload )
2017/01/29 13:37:50 fuse: <- Lookup [ID=0x872f Node=0x8 Uid=1000 Gid=1000 Pid=1508] “White Collar”
2017/01/29 13:37:50 .unionfs-fuse/series/White Collar: Dir.Lookup
2017/01/29 13:37:50 fuse: -> [ID=0x872f] Lookup error=ENOENT
2017/01/29 13:37:50 fuse: <- Lookup [ID=0x8730 Node=0x17d Uid=1000 Gid=1000 Pid=2319] “White Collar - S02E01.en.srt”
2017/01/29 13:37:50 series/White Collar/Season 02/White Collar - S02E01.en.srt: Dir.Lookup

The other errors I noticed

2017/01/29 13:31:59 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2017/01/29 13:31:59 fuse: <- Read [ID=0x43ca Node=0x13a Uid=1000 Gid=1000 Pid=2311] 0x1 131072 @0x563e0000 dir=false fl=0 lock=0 ffl=OpenReadOnly
2017/01/29 13:31:59 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2017/01/29 13:31:59 HTTP RESPONSE (req 0xc4200f04b0)
2017/01/29 13:31:59 HTTP/1.1 504 GATEWAY_TIMEOUT
Connection: keep-alive
Content-Length: 0

2017/01/29 13:31:59 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2017/01/29 13:31:59 pacer: Rate limited, sleeping for 461.017702ms (1 consecutive low level retries)
2017/01/29 13:31:59 pacer: low level retry 1/10 (error )
2017/01/29 13:31:59 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2017/01/29 13:31:59 HTTP REQUEST (req 0xc4201f2960)
2017/01/29 13:31:59 GET /cdproxy/templink/3mypbsFdfDP5dc5khF2xXofcoCYdiw5YklqYtM0wiCE38XJVg HTTP/1.1
Host: content-eu.drive.amazonaws.com
User-Agent: rclone/v1.35-47-g29c6e22β
Range: bytes=1447388192-

and

2017/01/29 13:36:46 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2017/01/29 13:36:46 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2017/01/29 13:36:46 HTTP RESPONSE (req 0xc420672870)
2017/01/29 13:36:46 HTTP/1.1 500 Internal Server Error
Content-Length: 30
Connection: keep-alive
Content-Type: application/vnd.error+json
Date: Sun, 29 Jan 2017 12:36:45 GMT
Server: Amazon-Cloud-Drive
X-Amzn-Requestid: 7222237d-c43b-407e-879b-bba98937b529

2017/01/29 13:36:46 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2017/01/29 13:36:46 pacer: Rate limited, sleeping for 615.656825ms (1 consecutive low level retries)
2017/01/29 13:36:46 pacer: low level retry 1/10 (error )
2017/01/29 13:36:46 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2017/01/29 13:36:46 HTTP REQUEST (req 0xc4200f0780)
2017/01/29 13:36:46 GET /cdproxy/templink/EnrgOuzqd0YPCEmh0T-l4HyEJs6Cc1MImHQF7RiUONM38XJVg HTTP/1.1
Host: content-eu.drive.amazonaws.com
User-Agent: rclone/v1.35-47-g29c6e22β
Range: bytes=3080976-

@ncw since this kind of logging is growing file very fast any chance you make log rotation as well eg --log-maxsize=100M , in those 10 minutes my log was already over 20M

1 Like

i use my hetzner server with .com. but then again i dont expect speeds past what hetzner provides though i do max out the upload when adding things to the cloud 10 transfers works well lol

I share with you my current Plex Environment (recently “cloudified”) thanks to the inspiration and work from people like @ncw @Ajki @chrisanthropic and others…

4 Likes

Hello All,

One question: are your plex libraries only for you and your families?

It’s just for me, and my family and friends.

@benamira

Are you located in Europe? I see you’re using Hetzner. I had to get off Hetzner as peering to the US was too slow

I’m now using a dedicated box from OVH, located in Canada, but it’s about 130$ CAD (95$ USD) per month.

Correct. I’m in Europe. And it works pretty well, so far.
Not tested with other providers.

How did you make this scheme?

Easy… with Keynote (from Apple) or Powerpoint… I can’t remember…

This thread is so long now. What is the best mount setting for streaming plex? I am on Ubuntu 16.04

First, i would recommend you to read the post when you have 15 minutes free.
I’ve learned a lot.

In any case, these are my current settings:

rclone mount
–config “/configs/.rclone.conf”
–read-only
–allow-other
–acd-templink-threshold 0
–allow-non-empty
–dir-cache-time 1m
–checkers 32
–contimeout 15s
–low-level-retries 1
–no-check-certificate
–quiet
–retries 3
–stats 0
–timeout 30s
google:PATH /mnt/PATH/ &

@benamira

–checkers doesn’t do anything for mount. @ncw confirmed this

Also, why limit the low level retries? If you’re using mount with Plex you want it to retry otherwise the playback would fail.

–stats doesn’t do anything with mount either I don’t believe.

I have a very simple mount and it works fine:

–read-only --allow-other --log-file FILE

that’s it. Nothing else I tried improved Plex performance in any significant way.

thanks @Stokkes, i knew my mount was not clean but not aware of one of your recommendations… (the one of the retries…).
I will change to simplify and improve my mount script.

Just made a test and this was one of the better performances, during the test there was only 1 concurrent stream. ( iam intentionally moving mouse around so you can see the plex progress bar )
On the left side you can see logs from cryptmount and on the right are the Plex Media Server ones.

It took 9 seconds for video to start playing ( Direct Stream ) and around 10 seconds when seeking to the end of the movie.

rclone mount \
       --read-only \
       --allow-non-empty \
       --allow-other \
       --acd-templink-threshold 0 \
       -v \
       --debug-fuse \
       --dump-headers \
       --log-file=/home/plex/logs/cryptmount.log \
       acdcrypt: /storage/acdcrypt/ &

I recently added to unionfs mount flag auto_cache option.

unionfs-fuse
-o cow,allow_other,auto_cache
/storage/media-local=RW:/storage/acdcrypt=RO
/storage/media-unionfs

I also noticed that sometimes jumping back at beginning it can take forever to load. ( eg i rather close and reopen the video)

1 Like

How is unionfs fuse working for you?
For me it is somehow terrible slow when I open a file that is only on my amazon cloud drive mount

I dont have any local files all my media is on ACD.
Unionfs should not really have any performance impact, if anything with auto_cache it could help out a bit.

Its normal that files you dont have locally are slower since you are downloading them from ACD, unionfs just allows you to “merge” multiple folder into one location.

I keep local files until disk is 80% full via script monitor which then executes my upload cloud script.

So

/data/.local (monitors for 80% full then pauses downloads and uploads)
/data/.acd-crypt (rclone mount)
/data/media (unionfs)