Rclone (Gdrive) with Komga and Plex performance issue

My rclone version:
rclone v1.53.1

  • os/arch: linux/amd64
  • go version: go1.15

My server:
Ubuntu 18.04 hwe recommended. Dedicated 1 Gbps dublex with 2xNvme. I am running cloudbox

My usage case:
I am using this server to stream via Plex my videos and audio files. I installed Komga, a cbr reader. I have my comics on my Gdrive (unionfs), however the comics don't load at all when I click to read them. The scanning itself takes ages. I am using Komga in a docker container, which is set up properly. Other users who have similar settings say their loading takes 30 seconds for every 3 pages, despite all of us using --vfs-cache-mode=full .

My rclone config:

/etc/systemd/system/rclone_vfs.service

#########################################################################

[Unit]
Description=Rclone VFS Mount
After=network-online.target

[Service]
User=pizza
Group=pizza
Type=notify
ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/rclone mount
--user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'
--config=/home/pizza/.config/rclone/rclone.conf
--allow-other
--allow-non-empty
--rc
--rc-addr=localhost:5572
--fast-list
--drive-skip-gdocs
--vfs-read-ahead=128M
--vfs-read-chunk-size=64M
--vfs-read-chunk-size-limit=2G
--vfs-cache-mode=full
--vfs-cache-max-age=40h
--vfs-cache-max-size=150G
--buffer-size=64M
--poll-interval=1m
--dir-cache-time=168h
--timeout=10m
--drive-chunk-size=64M
--umask=002
--syslog
-v
google: /mnt/remote
ExecStop=/bin/fusermount -uz /mnt/remote
Restart=on-abort
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=default.target

I think I am missing something out
Any feedback would be much appreciated :slightly_smiling_face:

Remove these flags and start with the defaults:

--vfs-read-ahead=128M
--vfs-read-chunk-size=64M
--vfs-read-chunk-size-limit=2G
--buffer-size=64M
--drive-chunk-size=64M

Only add them if you know what they do and actually need to change the defaults.

hi,
--allow-non-empty almost always not a good idea.

--fast-list does nothing on a mount.

I eventually found my problem. There was a permission issue on the .../.cache/rclone folder. It was root, when it should have been user:user.

To the future reader reading this. For this case scenario, having plex and komga at the same time streaming from GDrive can be a little bit tricky. The best way to do it is to create a different mount for Komga, as the files are smaller than the videos (if you are using plex for videos like myself), so the rclone flags can be different. So for this case scenario my suggestion would be to create a share drive/teamdrive on Google Drive. This way, the teamdrive mount will have its own vfs.service files.
These are the flags I used with mine (special thanks to Max)

--rc-addr=localhost:5573
--async-read=false
--allow-other
--allow-non-empty
--rc
--fast-list
--drive-skip-gdocs
--poll-interval=60s
--dir-cache-time=168h
--vfs-cache-max-age=168h
--vfs-cache-mode=full
--vfs-cache-poll-interval=30s
--vfs-read-chunk-size=2M
--vfs-read-chunk-size-limit=512M
--vfs-cache-max-size=100G
--timeout=30m
--umask=002
--syslog
-v \

My comics now load instantly, around 1 second to load the whole comic ''streaming'' remotely. Yes ! you heard my right! Of course you need the rclone version which allows --vfs-cache-mode full .

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