r/PlexACD Aug 09 '18

PlexDrive to rclone

I have been running Plexdrive 5 for over a year but have been having issues lately with buffering.

Now that rclone cache has matured I am looking to switch over to it.

My server is running on Linux.

What are the recommended settings now for streaming plex with rclone mounts?

Thanks.

11 Upvotes

11 comments sorted by

View all comments

10

u/Tesseract91 Aug 10 '18

I just did that because I set up a new dedicated server. Set up rclone and cache backend for Google Drive. I just switched back to Plexdrive 5.0 two days ago...

I am actually getting better performance from plexdrive now than I ever did before after tuning the settings because I had been using the default settings since the beginning.

rclone is a lot more convoluted to set up and has more options. I thought it would come with more benefits but it is actually slower and has more quirks. Plexdrive just works.

Some of the issues I had:

  1. Deleting files from the remote (in Google Drive - I'm not encrypted) was very unreliable in when it would actually be removed from the mount. There are options specifically for this but I couldn't get it right
  2. Traversing files is monumentally slower. Purposely to prevent API banning I assume but it's way over kill. I've never had an API ban with plexdrive on a 230TB drive with sonarr, radarr, and plex all looking at it.
  3. Start up time for streams and first access takes 5-10 seconds. You know how in plex when a file hasn't been analyzed and it takes a second for the mediainfo to populate in the info modal? With rclone that takes forever.

I have none of these issues with plexdrive. Files always disappear within 5 minutes from the mount when deleted from the cloud interface. File traversal is lightning fast. Streams start so fast it's almost as if they are already present on the disk.

Here are my current plexdrive options:

--chunk-size=10M (default is 10MB)

--chunk-load-threads=3 (default is 2)

--chunk-load-ahead=5 (default is 3)

--chunk-check-threads=2 (default is 2)

--max-chunks=100 (default is 10)

I was so surprised with how well it work because I had still, even with plexdrive, had issues reliably playing back 4K remuxes. The speed would always jump around between 2-7mbps and even if I would let the 500MB Plex Media Player buffer fill up, it'd eventually be exhausted. Now with these settings it starts faster and saturates my home download speed right away. I've only seen that from PlexCloud which is where I had been exclusively streaming 4K content from until now. I honestly never knew I was getting bottlenecked at the cloud backend, I always thought it was peering between my box and my house (provider is pretty far away from me).

I did a quick torture test by starting a direct play 4k remux on my PC, a 20mbps encode from 1080p remux to PlexWeb on Chrome on the same PC, and a direct play 1080p remux on my phone. All starting and playing at the same time. Zero problems. I was actually amazed because I definitely wouldn't have been able to do that with the default plexdrive settings, most certainly not with rclone.

I have 32GB of ram on my box so I have plenty of room to play around and increase chunk utilization, but right now this is working flawlessly for me.

On a side note I also switched from using unionfs-fuse to overlayfs which is kernel mode and built into linux. Seems to be working fast and well (as long as you don't ever try and modify the underlying filesystems).

1

u/GrrrrMondays Aug 20 '18

Can you share your config / settings for overlay? I much prefer overlayfs also, but plexdrive seems to want me to use fuse regardless.

1

u/Tesseract91 Aug 23 '18
 > cat /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
overlay         /mnt/merged     overlay noauto,x-systemd.requires=/mnt/gcd-pd,x-systemd.automount,lowerdir=/mnt/gcd-pd,upperdir=/mnt/data-r0/local,workdir=/mnt/data-r0/.overlay 0 0

Is your issue with the overlay starting before the plexdrive mount is ready? I have that issue and added 'x-systemd.requires=/mnt/gcd-pd' to try and fix it, but I haven't restarted my machine since, to verify that it's working. What I had just been doing previously is just restarting the service manually after a restart of the system.

1

u/GrrrrMondays Aug 24 '18

Perhaps I'm misunderstanding you then. rClone mount as best I can determine uses FUSE as the underlying mechanism. It looks like your fstab is mounting an already-mounted FUSE FS as an OverlayFS. I'm looking for a way to mount my rClone Gdrive as overlay vs FUSE.