Suggestions for rclone mount settings to improve initial load times

What is the problem you are having with rclone?

i have hosted my emby server on a vps and using rclone mount as my library from google drive . Currently it takes around 7-9 seconds ( sometimes more ) before a video starts to play once play button is tapped. Can someone please suggest some improvements in my rclone mount settings to reduce this delay ? ( i would be quite happy with 3,4 seconds ) . I would like to add that i am not using transcoding. Its all direct play

My rclone mount service file is as follows :

[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/root/.config/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount emby: /GD \
--log-file /root/rclone/rclone.log \
--log-level INFO \
--umask 000 \
--poll-interval 15s \
--allow-other \
--fast-list \
--transfers 24 \
--dir-cache-time 72h \
--drive-chunk-size=32M \
--fuse-flag direct_io \
--cache-chunk-total-size 8G \
--cache-chunk-size 8M \
--cache-chunk-no-memory \
--cache-workers=24 \
--buffer-size=32M \
--vfs-cache-mode minimal \
--vfs-read-chunk-size 32M \
--vfs-cache-max-age 1h \
--vfs-read-chunk-size-limit off \
--cache-tmp-upload-path=/root/rclone
ExecStop=/bin/fusermount -uz /GD
Restart=on-abort
User=root
Group=root

[Install]
WantedBy=multi-user.target

The rclone config contents with secrets removed.

[emby]
type = drive
client_id  = ****
client_secret = ****
scope = drive
token = {"access_token":"****","token_type":"Bearer",
"refresh_token":"****","expiry":"2020-09-30T12:43:16.951503647+02:
00"}
team_drive = ****
root_folder_id =

rclone v 1.53.1
arch : Linux/amd64
OS : Ubuntu 20
go version : go1.15

hello,

these flags do nothing on a mount
--fast-list
--transfers

as a test, have you tried a very simple mount command, removing almost all those flags and using --vfs-cache-mode=full

Thanks for the recommendation , i will remove those 2 flags
The reason i am not using vfs cache mode full is because it will save file locally first as cache and play file from there itself and my vps doesn't have that much storage . Its around 40 gb only

as of v1.53.x, there is a shiny new vfs cache.

the biggest and best chance is with --vfs-cache-mode=full
rclone will not download the entire file anymore.
it uses a spare file and downloads only the parts of a file that are requested.
check it out
https://rclone.org/commands/rclone_mount/#vfs-cache-mode-full

also, based on your config file, you are not using the cache backend, is that correct?
https://rclone.org/cache/

Just one last doubt
Last time i was using @Animosity022 's exact config from github and my vps disk storage had got over
If vfs cache mode full isn't the culprit , than what could have possibly caused it ?
I see this time apart from few more flags in my mount settings and vfs cache mode being minimal , there is just 1 more difference .i am not using this particular flag from his config

# The local disk used for caching
--cache-dir=/cache \

So what should i do now ? Use exact config of his and just skip this --cache-dir flag ?

based on your config file, you are not using the cache backend, is that correct?
https://rclone.org/cache/

Yes correct , i am not using that rclone cache
The exact rclone.conf being used by me in vps is the one posted in this post

then remove this flags; as of now, seven flags removed.....

--cache-chunk-total-size
--cache-chunk-size 8M
--cache-chunk-no-memory
--cache-workers=24
--cache-tmp-upload-path

really, just start with the absolute simplest command possible, no flags at all and test.
rclone mount emby: /GD

This is my current mount settings

ExecStart=/usr/bin/rclone mount emby: /GD \
--umask 000 \
--poll-interval 15s \
--allow-other \

i dont see any improvement than earlier , its taking same amount of time to start videos or even more ( definitely not improved )

if you play a video direct from the mount, not using emby, with a media player, what is the initial delay?

Its around 5,6 seconds when video is played directly from mount without emby
I did some trial and error and removed vfs cache altogether and now i am using a very minimal mount settings which goes like this

ExecStart=/usr/bin/rclone mount emby: /GD \
--log-file /root/rclone/rclone.log \
--log-level INFO \
--umask 000 \
--poll-interval 15s \
--allow-other \
--dir-cache-time 100h

The initial load time seems better than earlier now. Should i add buffer time and timeout flags or this seems fine

yes, often the less flags the better.
if you think you need to add a flag, then try to add it and test.

i use a mount command like this
rclone emby: G: mount --attr-timeout 1000h --dir-cache-time 1000h --poll-interval 0 --rc --read-only

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.