Rclone buffering (gdrive)

Problem:
Plex is buffering with rclone mount

rclone version:
rclone v1.45

OS:
Debian 10

Storage:
Google Drive

Command:

rclone mount plex1: /home/plex1 --allow-other --dir-cache-time 1000h --vfs-cache-mode=full -vv

Logs:

2021/03/28 23:43:24 DEBUG : &{toplex1/Series/******** (rw)}: >Read:
read=131072, err=<nil>
2021/03/28 23:43:24 DEBUG : &{toplex1/Series/******** (rw)}: Read: len=131072, offset=10878976
2021/03/28 23:43:24 DEBUG : &{toplex1/Series/******** (rw)}: >Read:
read=131072, err=<nil>
2021/03/28 23:43:24 DEBUG : &{toplex1/Series/******** (rw)}: Read: len=131072, offset=11010048
2021/03/28 23:43:24 DEBUG : &{toplex1/Series/******** (rw)}: >Read:
read=131072, err=<nil>
2021/03/28 23:43:24 DEBUG : &{toplex1/Series/******** (rw)}: Read: len=131072, offset=11141120
2021/03/28 23:43:24 DEBUG : &{toplex1/Series/******** (rw)}: >Read:
read=131072, err=<nil>
2021/03/28 23:43:55 DEBUG : Google drive root '': Checking for changes on remote
2021/03/28 23:43:55 DEBUG : Cleaning the cache

hello and welcome to the forum,

v1.45 is 30 months old now.
please update to latest stable v1.54.1 and test again.

buffering is often due to the internet connection, not rclone itself.

I will try updating rclone, I don't think its my connection as I have 1gbps dl/up and I'm using plex locally so 1 gbps should be enough for rclone/gdrive

Update: I have updated rclone, will let you know if its better

root@debian:/home/scripts# rclone version
rclone v1.54.1

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

Still have buffering problem, here's the log

2021/03/29 22:42:44 DEBUG : vfs cache: looking for range={Pos:212410368 Size:131072} in [{Pos:0 Size:212852736} {Pos:8814755840 Size:2940}] - present true
2021/03/29 22:42:44 DEBUG : toplex1/.mkv(0xc000ae2240): >_readAt: n=131072, err=
2021/03/29 22:42:44 DEBUG : &{toplex1/
.mkv (rw)}: >Read: read=131072, err=
2021/03/29 22:42:49 DEBUG : toplex1/.mkv: vfs cache: stopping download thread as it timed out
2021/03/29 22:43:02 DEBUG : Google drive root '': Checking for changes on remote
2021/03/29 22:43:02 DEBUG : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item toplex1/
.mkv not removed,
freed 0 bytes
2021/03/29 22:43:02 INFO : vfs cache: cleaned: objects 1 (was 1) in use 1, to upload 0, uploading 0, total size 218.995M (was 218.995M)
2021/03/29 22:44:02 DEBUG : Google drive root '': Checking for changes on remote
2021/03/29 22:44:02 DEBUG : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item toplex1/.mkv not removed,
freed 0 bytes
2021/03/29 22:44:02 INFO : vfs cache: cleaned: objects 1 (was 1) in use 1, to upload 0, uploading 0, total size 218.995M (was 218.995M)
2021/03/29 22:45:02 DEBUG : Google drive root '': Checking for changes on remote
2021/03/29 22:45:02 DEBUG : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item toplex1/
.mkv not removed,
freed 0 bytes
2021/03/29 22:45:02 INFO : vfs cache: cleaned: objects 1 (was 1) in use 1, to upload 0, uploading 0, total size 218.995M (was 218.995M)
2021/03/29 22:46:02 DEBUG : Google drive root '': Checking for changes on remote
2021/03/29 22:46:02 DEBUG : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item toplex1/***.mkv not removed,
freed 0 bytes
2021/03/29 22:46:02 INFO : vfs cache: cleaned: objects 1 (was 1) in use 1, to upload 0, uploading 0, total size 218.995M (was 218.995M)

Speedtest on Plex server

Testing download speed................................................................................
Download: 835.69 Mbit/s
Testing upload speed................................................................................................
Upload: 494.90 Mbit/s

Speedtest on Shield TV

DL: 207 Mbps
UP: 208 Mbps

New log:

ping download thread as it timed out
2021/03/29 22:53:37 DEBUG : toplex1/Series/****.mp4: vfs cache: stopping download thread as it timed out

If you want to post the full debug log, that would be more helpful.

Timeouts are usually internet related so perhaps connectivity issues.

as a test, using a media player, stream a media file from the mount, do not use plex.
if possible, use a device with a wired connection.

Sorry I don't have the full log file, tried with 2k movies and its buffering, logs look like this :

2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=183115776
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=183246848
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=183377920
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=183508992
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=
2021/03/30 10:18:24 DEBUG : toplex1/Films/2K.mkv: ChunkedReader.Read at 199294976 length 1048576 chunkOffset 138481664 chunkSize 268435456
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=183640064
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=183771136
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=183902208
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: Read: len=131072, offset=184033280
2021/03/30 10:18:24 DEBUG : &{toplex1/Films/2K.mkv (r)}: >Read: read=131072, err=

did you do a test, not using plex?

when using plex, does it buffer with 720p or 1080p?

That snippet of a log isn't helpful. Need a full log.

It does buffer on my computer which is wired using VLC or even Plex in 1080p

I'll get a full logs later

very strange.
for my media server, i use a teeny tiny rasbbery pi zero running rclone serve dlna, over 2.4GHz wifi.
on my wifi tablet, using vlc, i can stream 1080p, no buffering.

have you tried without --vfs-cache-mode
what is the file system type for cache-dir, ext4 or what?

"IMPORTANT not all file systems support sparse files. In particular FAT/exFAT do not. Rclone will perform very badly if the cache directory is on a filesystem which doesn't support sparse files and it will log an ERROR message if one is detected"

I will try without --vfs-cache-mode

The gdrive folder is on a ext4 ssd while rclone is on a raid 1 ext4 with debian 10

I'm actually running rclone mount as screen, should I run it as a service or it doesn't change anything ?

this would not matter for testing.
i run rclone as a background process, not as a service

I give up, no error on logs, can't even stream 480p without buffering

Can you post the full log?

Here my log file:

raw.githubusercontent[dot]com/WooAf/rclonelog/main/rclonemount.txt

(can't seems to be able to post link or upload .txt file)

Tried this 4k file, my server is wired connection on a 1gbps connection
(Same result with 480p, 720p, 1080p, 4k)

Speedtest:

Testing download speed................................................................................
Download: 852.95 Mbit/s
Testing upload speed................................................................................................
Upload: 510.33 Mbit/s

Tried using plex on my computer which is also wired connected

Ping: 2 ms
Download: 923.40 Mbps
Upload: 618.85 Mbps

Server is on the same lan, tried with VLC and have the same problem

Edit 3 : Even tried with plex local (192.168.1.xxx:32400) and its still buffering

Looks like you are running a 2160.

Are you direct playing or is it transcoding?

Direct playing, yeah I'm playing 2160p but its doing the same thing for 480p like I said, its just more often with 2k or 4k movies but I was watching 480p today and it was buffering