Wonder what exactly these two parameters
--vfs-read-ahead are about.
According to the documentation:
When reading a file rclone will read
--vfs-read-aheadbytes ahead. The
--buffer-sizeis buffered in memory whereas the
--vfs-read-aheadis buffered on disk.
When using this mode it is recommended that
--buffer-sizeis not set too large and
--vfs-read-aheadis set large if required.
I want to know details in it:
"is not set too large"?,
How much value can be treated as large? And what will happen if we set it to large? OOM or anything else?
"is set large if required"
What is the meaning of "required"? When will be the time we increase the value of is?
And for caching, wouldn't it be better to cache in memory instead of on disk? Why not just set large
--buffer-size value to have the beset performer consider I got enough memory?
Assume the following use cases, what will happen as excepted?
(Consider I have the host with 64GB memory and 40TB disk space available for rclone to use, also what if the host only have limited resources for rclone? Like only 512MB memory and 20GB disk space?)
BTW, also wondering how it works? Like if I want to read a large file for the beginning or with certain position (peek), what will happen?
I think it first starts a connection to the server, and will write data into memory after reach
buffer-size limit, it will write data (from 0 to the limit value) into disk, do the same with
vfs-read-ahead limit, then will start to write to true disk cache file until exceed the value of
vfs-cache-max-size, if the file closed, then all cache in
vfs-cache-max-size, but keep the downloaded bits of the true cached file, is this correct or not?
Hope I can have this answered, so I can know how to balance these two parameters, thanks!
rclone v1.63.0 - os/version: Microsoft Windows 11 Home China 22H2 (64 bit) - os/kernel: 10.0.22621.1992 (x86_64) - os/type: windows - os/arch: amd64 - go/version: go1.20.5 - go/linking: static - go/tags: cmount
rclone mount SCDISK: S: --cache-dir H:/Rclone \ --no-check-certificate --file-perms=0700 \ --buffer-size=32M \ --vfs-read-ahead 1G\ --use-mmap \ --vfs-cache-mode full \ --vfs-cache-max-age=72h \ --vfs-cache-max-size=1024G
[SCDISK] type = webdav host = https://192.168.1.2:1500 vendor = other user = scruel pass = ...