What is the problem you are having with rclone?
Wonder what exactly these two parameters --buffer-size
and --vfs-read-ahead
are about.
According to the documentation:
When reading a file rclone will read
--buffer-size
plus--vfs-read-ahead
bytes ahead. The--buffer-size
is buffered in memory whereas the--vfs-read-ahead
is buffered on disk.
When using this mode it is recommended that--buffer-size
is not set too large and--vfs-read-ahead
is 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?)
--buffer-size=4G
--vfs-read-ahead=4G
--buffer-size=16M
over--vfs-read-ahead=16M
--buffer-size=16M
over--vfs-read-ahead=1G
--buffer-size=1G
over--vfs-read-ahead=16M
--buffer-size=1G
over--vfs-read-ahead=1G
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 bufee-size
and 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!
Run the command 'rclone version' and share the full output of the command.
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
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
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
The rclone config contents with secrets removed.
[SCDISK]
type = webdav
host = https://192.168.1.2:1500
vendor = other
user = scruel
pass = ...