Disable prefetchimg

What is the problem you are having with rclone?

I'm using rclone mount to access files on Google Drive, primarily for browsing the file structure and not frequently downloading file content.

While I appreciate the performance benefits of prefetching, it consumes a significant amount of network bandwidth, which is a concern for me.

Currently, I'm using --vfs-cache-mode full with a high --vfs-cache-max-age value to maximize caching efficiency. However, I'm still seeing noticeable data usage when simply navigating directories.

Is there any way to further reduce or disable prefetching specifically for directory listings while maintaining the ability to download files on demand?

Run the command 'rclone version' and share the full output of the command.

rclone v1.68.2

  • os/version: darwin 15.2 (64 bit)
  • os/kernel: 24.2.0 (arm64)
  • os/type: darwin
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.23.3
  • go/linking: dynamic
  • go/tags: cmount

Which cloud storage system are you using?

Google drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount GoogleDriveRemote: /mnt/gdrive \
    --vfs-cache-mode full \
    --cache-dir /data/rclone/cache \
    --vfs-cache-max-age 9999d \
    --vfs-cache-max-size 500G

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

./rclone config --config rclone.conf redacted
[drive]
type = drive
scope = drive
team_drive = 
### Double check the config for sensitive info before posting publicly

Rclone doesn't prefetch.

Sounds like you have something indexing or runnig through the mount.

Prefetch all metadata once. It will run in the background when mount starts.

 --vfs-refresh

and keep it valid "forever":

--dir-cache-time 9999h

The last value is 5min by default hence you see repetitive remote content reading.

The GDrive is polling remote so any remote changes will be picked up via polling anyway.

Metadata is cached in memory which means that after every mount restart the refresh has to happen again. There is some ongoing work to make is persistent but it is maybe only future thing.

OP is talking about high data usage and the directory/file caching aren't doing that.

Changing those values or doing them on startup really won't change much.

You'd want to look at what is accessing the files and downloading them. Finder/etc.

Possibly. Not 100% clear for me.

Given that it is macOS then indeed Finder thumbnails generation might be responsibly for big chunk of data reading.

But metadata constant re-reading adds its share of downloads too, especially for many files dirs.

Let's see what OP investigates.

Yes, my biggest concern is the downloading the files themselves.
I will check if it's Finder. I will try to open it only with the terminal.

might read about and test flags such as
--vfs-read-chunk-size 10M - decrease the chunk size
--vfs-read-chunk-size-limit 0 - prevent rclone from doubling the chunksize per read.

So after checking it indeed the Finder.
I tried to use terminal only and everything worked perfect.
The moment I used Finder I saw the same behaviour of prefetching.