Behaviour on Windows: When playing a video or audio file, it would cache to RAM and vfs cache folder on disk would remain empty with 0 disk write activity. Behaviour on Linux (MX Linux): Even with --vfs-cache-mode set to minimal (same behaviour with writes), it writes to disk the whole as --vfs-cache-mode full would. Disk activity is really high and the cache folder contains all the played back files i.e the whole file is being cache. Desired behaviour: rclone will cache to RAM when using vfs-cache-mode writes. Note: On Windows, the video which is being played usually cached a few second ahead, whereas on Linux it keeps caching until the whole video is cached showing the behaviour of vfs-cache-mode full
Run the command 'rclone version' and share the full output of the command.
os/version: debian 11.3 (64 bit)
os/kernel: 5.10.0-14-amd64 (x86_64)
Which cloud storage system are you using? (eg Google Drive)
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone mount GDrive: /home/Rafee/Documents/GDrive/ --vfs-cache-mode minimal --cache-dir /home/Rafee/Documents/cache
I'm not seeing anything wrong in the logs as that's what I would expect to happen.
The only thing that uses memory is buffer-size as that is how much of the file is kept in memory. Buffer is dumped if the file is closed.
That's not how the cache mode works. This only writes files locally to disk and uploads them. This is used for certain applications/programs that need a more compatible file system to write to. You'll see an error in the log saying you need this if the program is asking to write in a mode that isn't compatible with off.
Both OS'es do the same thing here. It's more dependent on how the file is being accessed. If the file is accessed sequentially, it continues to read ahead based on the buffer size until it's closed out. If you are using full, vfs-read-ahead comes into play as well.
I'm not sure if minimal uses sparse files as it's not called out as I've never used it or found a need for minimal.
Full cache mode definitely uses sparse files so you'll see a difference in what is being reported and what is actually used:
felix@gemini:/cache/TV$ du -sh *
felix@gemini:/cache/TV$ du -sh * --apparent-size
as an example as I'm using full so files are sparse which means only parts I've read are 'filled'. No idea how Windows shows that offhand as I'm primarily a Linux user.
I was trying to get same behaviour in Windows and the behaviour vfs-cache-mode writes should show which is
In this mode files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first.
since I was only reading the video file, yet it was buffering/caching the file to disk on Linux.
I managed to get the desired behaviour for playing back video vfs-cache-mode off and --buffer-size 1G, but I get errors when trying to upload/edit files.
If you are using cache-mode writes, that should not be the case if you reading. Would need to a debug log file and we can validate why as if the app opens it up in write mode even if it's reading only, that would cause a problem. Easy to see in the debug log.
That depends on how the application works and how it opens files. As you said, you'll see ERRORs in the logs if writes cache mode is required. That's nothing rclone can influence as that's application specific on how it asks for a file.