Recommend mount settings for cloudflare r2

I'm moving to cloudflare r2 as my cloud provider.

I'll be using with rclone mount, and would like to know the optimal settings both for speed and to cut the bill.

Anyone can give me some ideas?

sure, but let us know what you will use the mount for?

the more details upfront, the better...

I'll be using as a cold storage for files I don't currently on my vfs cache.

I don't expect to read a lot from it, only sometimes. Other than that I expect to be running rclone vfs/refresh a lot so my rclone mount will catch new files (not sure if necessary with that remote or not)

Very few files will be written, and it will be outside of the mount, it will be with rclone copy.

That's it

So basically the mount is read-only, and with --dir-cache-time= as high as possible for fast access, but a manual/automatic way to detect changes on the mount, and using the least amount of read operations when file is not on vfs cache already

With any s3 based mount, if you want to cut transaction costs you should read this section of the manual. Consider whether you want accurate modtimes and if you it doesn't matter then this is relevant.

If using rclone mount or any command using the VFS (eg rclone serve ) commands then you might want to consider using the VFS flag --no-modtime which will stop rclone reading the modification time for every object. You could also use --use-server-modtime if you are happy with the modification times of the objects being the time of upload.

S3 based remotes don't support detecting changes, so you'll need refresh to pick up new files.

I'd mount it read only in this case.

I'd use --use-server-modtime with --read-only - set the VFS caching parameters how you want them and run vfs/refresh when you need new content pulled in. (Or set --dir-cache small - this will read the directory listings off the remote often but the cached files will remain).

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.