30s - 60s play start time using a cache mount and plex

My setup seems to be working quite well, apart from the crazy start times for most tvshows/movies I have.

The command I run is:

/usr/bin/rclone mount media-enc--crypt: /mnt/media \
   --cache-db-purge \
   --allow-other \
   --dir-cache-time=160h \
   --cache-chunk-size=10M \
   --cache-info-age=168h \
   --cache-workers=5 \
   --cache-tmp-upload-path /data/rclone-enc_upload \
   --cache-tmp-wait-time 60m \
   --buffer-size=256M \
   --attr-timeout=1s \
   --syslog \
   --umask 002 \
   --log-level INFO

With my config being defined as follows:

type = crypt
remote = media-enc--cache:
filename_encryption = standard
directory_name_encryption = true
password = *
password2 = *

type = cache
remote = gdrive:media-enc
plex_url =
plex_username = *
plex_password = *
chunk_size = 10M
info_age = 24h
chunk_total_size = 100G
plex_token = *

type = drive
client_id =
client_secret =
scope = drive
root_folder_id =
service_account_file =
token = *

My current flow is:

Sonar/Radar -> torrent -> download folder
Download folder -> copy -> mount
Mount -> eventual upload -> gdrive

I’m a fan of this flow since I only need to manage one transfer (download folder -> mount) which sonar/radar can handle well.

I’m looking at moving to a vfs mount over a cache to see if that can improve start speeds.

Does anyone have any insight into how I can make this setup quicker?

As you said, look into swapping out cache for a vfs setup. I was running animosity’s setup and trying to marry vfs/cache but, in the end, dropped to a close mirror of his because cache performance was causing 10-30s startup times. This is my seedbox’s mount systemd:

Description=Mount google drive to /mnt/drive

ExecStartPre=-/bin/mkdir /mnt/drive
ExecStart=/usr/bin/rclone mount drive: /mnt/drive \
   --allow-non-empty \
   --allow-other \
   --buffer-size 64M \
   --config /root/.config/rclone/rclone.conf \
   --dir-cache-time 672h \
   --fast-list \
   --poll-interval 1m \
   --vfs-cache-max-age 168h \
   --vfs-read-chunk-size 32M \
   --vfs-read-chunk-size-limit off \
   --umask 002 \
   --uid 1000 \
   --gid 1000 \
   --log-level INFO \
   --log-file /root/.config/rclone/log.rclone
ExecStop=/bin/fusermount -u -z /mnt/drive


Note that that’s on a 1Gbps connection and I still have my buffersize at 64M. Plex starts playback for all users nearly immediately unless their peering to my server is garbage.

Try increasing your cache size to something like 64M or 128M. Also, set the --buffer-size to 0M since cached chunks are already stored in memory for some time.

Do you mean cache-chunk-size to 64M or 128M? Reading the docs I’m not sure what’s better for me. I’m on a 250mbit connection at the moment, so it’s not the quickest.

Do you think increasing will make a difference?

I’ll try lowering buffer-size to see what that does

You will have to experiment with it. It honestly won’t make much of a difference between 64M and 128M.

So to confirm, you do mean cache-chunk-size? I don’t see anything related to cache size.

Yeah, its cache-chunk-size, my mistake