Correct way to cache an encrypted remote?

Changed to:

mount --allow-other --buffer-size 0m --dir-cache-time 24h --vfs-cache-mode writes --vfs-cache-max-age 0m --write-back-cache --cache-dir "C:\Cache" gcrypt:/ X: --config "C:\rclone\rclone.conf"

As for -vfs-cache-max-age 0m ... I have no idea! Should I modify it?

I tend to try to leave everything at the defaults unless there is a reason to change it and understand why I want to change it.

If you have writes on, when you are write a file, it will by default leave it in the cache area for 1h and remove it after that time:

--vfs-cache-max-age duration         Max age of objects in the cache. (default 1h0m0s)

If you want to remove it immediately by using 0m, you could do that because you want to avoid disk space or other things, but I generally would leave it unless I have a reason to change it.

Okay, I removed it and remounted using nssm. 0 errors in the log.

But for some reason, it's super slow opening a file. Is that normal for the 'first' play ... until the cache is built?

In fact, it's unuseably slow. Seeking is impossible .... it just hangs.

Seems like Animosity got you covered on a suggestion for config.
If you tested streaming with only the VFS and that was stutter-free for you then that's great - and if so that does take away some of the benefit of a cache. The cache retention for reads is still nice in my book.

As for cache settings, these are the ones I would look into:
chunk_size = 32M
There is no "best" chunk size. Smaller chunks will open media faster, but it's less efficient for using all of your bandwidth, and very high bitrate (4K) videos may need larger chunks to not run out of buffer. With a fast connection 8-32MB is about what you want depending on your preference. Remember if you change this setting your cache directory must be purged or deleted or you will get unexpected end of file errors.

info_age = 8760h
This sets the amount of time the cache DB considers file/directory info valid. If you have a single user and do all modifications via cache it can be set yo a very large number like I have here. Not recommended if the drive is modified by third parties however as the cache will simply not notice that stuff has changed because it doesn't ask.

chunk_total_size = 10G
Total amount of cache space - the amount here is just for illustration. The more the better really.

db_path = C:---RCLONE_DB
chunk_path = E:---RCLONE_CACHE
Location of the database and file cache. Optimally put the DB on an SSD, but you may want to have the file cache on a HDD since there isn't much point of using SSD space for it. Even slow harddrives are way faster than your internet connection after all - but this is up to preference.

workers = 4
4 is the default value. Determines the number of simultanious downloads of chunks. May benefit from 6 or 8 if experiencing problems with very high bitrate media, but may also slow the opening of files. More is not necessarily better - but you can freely experiment...

"In fact, it's unuseably slow. Seeking is impossible .... it just hangs."

Don't know if this applies to you, but if on windows make sure thumbnails are not set to show on that drive. At the very least use list-view and save that folder preference via folder options.

It's a known issue that Windows will try to fetch the entirety of all "thumbnailable" files to make it's thumbnails, so this just needs to be worked around one way or another.

Odd behaviour: playback is almost instant, but seeking is impossible - player simply hangs if trying to seek.

cache:

[gcache]
type = cache
remote = gdrive:
chunk_size = 32M
info_age = 7d
chunk_total_size = 20G

nssm mount:

mount --allow-other --dir-cache-time 24h --drive-chunk-size 32M --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off --vfs-cache-mode writes --write-back-cache --cache-dir "C:\Cache" gcrypt:/ X: --config "H:\rclone\rclone.conf" --log-level DEBUG --log-file "H:\rclone\logs\rclone.log"

Can you guys see anything that would explain the inability to seek during playback?

Can you do the playback and post the log?

Playback is literally instantaneous ... it actually opens as fast as the same .mkv on my local Nvme ... crazy! But seeking is nigh on impossible for some reason.

log:
2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS/desktop.ini: >Getattr: errc=-2 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Opendir: 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >OpenFile: fd=Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS/ (r), err=<nil> 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Opendir: errc=0, fh=0x0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Releasedir: fh=0x0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Releasedir: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Opendir: 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >OpenFile: fd=Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS/ (r), err=<nil> 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Opendir: errc=0, fh=0x0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Opendir: 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >OpenFile: fd=Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS/ (r), err=<nil> 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Opendir: errc=0, fh=0x1 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Opendir: 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >OpenFile: fd=Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS/ (r), err=<nil> 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Opendir: errc=0, fh=0x2 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Readdir: ofst=0, fh=0x2 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Readdir: items=1, errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS/StepIntoLiquid.BluRay.x264.OAR.GOS.mkv: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS/StepIntoLiquid.BluRay.x264.OAR.GOS.mkv: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Releasedir: fh=0x2 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Releasedir: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film: Opendir: 2019/07/25 18:05:10 DEBUG : /Encodes-Film: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:10 DEBUG : /Encodes-Film: >OpenFile: fd=Encodes-Film/ (r), err=<nil> 2019/07/25 18:05:10 DEBUG : /Encodes-Film: >Opendir: errc=0, fh=0x2 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:10 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:10 DEBUG : /Encodes-Film: Releasedir: fh=0x2 2019/07/25 18:05:10 DEBUG : /Encodes-Film: >Releasedir: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Opendir: 2019/07/25 18:05:11 DEBUG : /Encodes-Film: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >OpenFile: fd=Encodes-Film/ (r), err=<nil> 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Opendir: errc=0, fh=0x2 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Releasedir: fh=0x2 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Releasedir: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Opendir: 2019/07/25 18:05:11 DEBUG : /Encodes-Film: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >OpenFile: fd=Encodes-Film/ (r), err=<nil> 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Opendir: errc=0, fh=0x2 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Opendir: 2019/07/25 18:05:11 DEBUG : /Encodes-Film: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >OpenFile: fd=Encodes-Film/ (r), err=<nil> 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Opendir: errc=0, fh=0x3 2019/07/25 18:05:11 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /: Opendir: 2019/07/25 18:05:11 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:11 DEBUG : /: >OpenFile: fd=/ (r), err=<nil> 2019/07/25 18:05:11 DEBUG : /: >Opendir: errc=0, fh=0x4 2019/07/25 18:05:11 DEBUG : /: Statfs: 2019/07/25 18:05:11 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:268320369028 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0 2019/07/25 18:05:11 DEBUG : /: Releasedir: fh=0x4 2019/07/25 18:05:11 DEBUG : /: >Releasedir: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Opendir: 2019/07/25 18:05:11 DEBUG : /Encodes-Film: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >OpenFile: fd=Encodes-Film/ (r), err=<nil> 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Opendir: errc=0, fh=0x4 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film: Releasedir: fh=0x4 2019/07/25 18:05:11 DEBUG : /Encodes-Film: >Releasedir: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Getattr: fh=0xFFFFFFFFFFFFFFFF 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: >Getattr: errc=0 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: Opendir: 2019/07/25 18:05:11 DEBUG : /Encodes-Film/Step.Into.Liquid.2003.1080p.BluRay.DTS.x264-GOS: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx

Can you link a log file as the formatting is somewhat impossible to read?

Sure ... I notice that the forum limited the log length.

https://privatebin.net/?983627095917ea53#5qfWDeHvystEKHQnPBS7FnQUFTa9ohhjcqU7akAYk4D2

I notice there are a LOT of references to obsolete 'Shared with me' files ...

You can see where I attempt to seek in the .mkv - and the player hangs.

Why do you have the buffer size at 8G?

2019/07/25 18:14:29 DEBUG : rclone: Version "v1.48.0" starting with parameters ["H:\\rclone\\rclone.exe" "mount" "--allow-other" "--buffer-size" "8G" "--dir-cache-time" "24h" "--drive-chunk-size" "32M" "--vfs-read-chunk-size" "32M" "--vfs-read-chunk-size-limit" "off" "--vfs-cache-mode" "writes" "--write-back-cache" "--cache-dir" "C:\\Cache" "gcrypt:/" "X:" "--config" "H:\\rclone\\rclone.conf" "--log-level" "DEBUG" "--log-file" "H:\\rclone\\logs\\rclone.log"]

You want buffer-size 0M and I'd remove write-back-cache unless you have a reason for that to be on.

Sorry - was testing. Will change that now and paste a new log ...

Okay... with buffer size set to 0 and write-back-cache removed, it simply won't play ... at all. Player just hangs.

Using this mount:

mount --allow-other --allow-non-empty --buffer-size 0M --dir-cache-time 24h --drive-chunk-size 32M --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off --vfs-cache-mode writes --cache-workers=8 --cache-dir "C:\Cache" --cache-db-path "C:\Cache\gcache.db" --cache-chunk-path "C:\Cache\gcache" gcrypt:/ X: --config "H:\rclone\rclone.conf" --log-level DEBUG --log-file "H:\rclone\logs\rclone.log"

Can you share the log file ?

https://privatebin.net/?64af1a629d645a33#FQGGirHWyFwz4pGnqNnxULwVqT8MqFQxjM4EYws8UMuF

Tries to open .... but hangs. Seeking is impossible with 0M buffer.

I have GBit/GBit and no limits ... so whichever settings will enable instant playback and near-instant seeking are what I'm looking for :slight_smile:

That seems to be just a piece of the log. Can you share the whole log?

Sorry - will replay and post the full log

What are you using as a player as well? Plex or something else?

Using MPC-BE x64

Full log:
https://privatebin.net/?e7fa4195879b247a#6wDd1wqa3w8yz91qyC4vvvjjhV1APSNhpQ3JQXkK3M7X