New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VFS Cache: control caching of files by size #4110
Comments
I think this could certainly be done. I'm unsure how it would help in your scenario though? For |
In my case, I'm not interested in excluding the small files actually, only in excluding larger files from monopolizing disk space. I actually don't run vfs-cache-mode full over writes because with my use-case my local storage fills up far too quickly with cache-mode full. I see this request as a way to make cache-mode full more useful than what it already is. |
@ncw You did add this in https://forum.rclone.org/t/rclone-vfs-cache-maximum-size-per-file/30037/6 under the https://github.com/rclone/rclone/tree/fix-vfscache-strategy branch. Would it be possible to add this to the mainline too? Any help that you require that's preventing it's merge? |
…FIXME WIP FIXME this needs docs, and maybe needs to be configurable. FIXME needs tests also See: https://forum.rclone.org/t/rclone-vfs-cache-maximum-size-per-file/30037 Fixes: #4110
I had forgotten about that code! I rebased it here if anyone wants to try it v1.61.0-beta.6571.6f53463c3.fix-vfscache-strategy on branch fix-vfscache-strategy (uploaded in 15-30 mins) @darthShadow are you finding that code useful?
According to the notes in the commit
I think maybe its worth discussing the first point. I was thinking of introducing a new parameter
This could potentially have other values - see the wikipedia article for ideas. Most of these would only be a few lines of code to implement. What do you think? |
There was atleast one other person on the forum interested in it: https://forum.rclone.org/t/lru-sp-vfscache-strategy-roadmap/32919 Apart from that, I have pointed a few folks over on Discord to the linked branch for using that change and haven't heard any complaints yet ... 😉 I think we should merge it only with the additional |
Looking forward to it~ |
…FIXME WIP FIXME this needs docs, and maybe needs to be configurable. FIXME needs tests also See: https://forum.rclone.org/t/rclone-vfs-cache-maximum-size-per-file/30037 Fixes: rclone#4110
…FIXME WIP FIXME this needs docs, and maybe needs to be configurable. FIXME needs tests also See: https://forum.rclone.org/t/rclone-vfs-cache-maximum-size-per-file/30037 Fixes: rclone#4110
Implements Least Frequently Used (LFU), Largest File First (LFF), and Size-Adjusted and Popularity-Aware LRU (LRU-SP) strategies See: https://forum.rclone.org/t/rclone-vfs-cache-maximum-size-per-file/30037 Fixes: rclone#4110 Co-authored-by: Nick Craig-Wood <nick@craig-wood.com>
Implements Least Frequently Used (LFU), Largest File First (LFF), and Size-Adjusted and Popularity-Aware LRU (LRU-SP) strategies See: https://forum.rclone.org/t/rclone-vfs-cache-maximum-size-per-file/30037 Fixes: rclone#4110 Co-authored-by: Nick Craig-Wood <nick@craig-wood.com>
What is your current rclone version (output from
rclone version
)?rclone v1.51.0-151-gfc663d98-beta
What problem are you are trying to solve?
File-level encryption w/ file-name encryption creates small, must-access files on a per-directory basis. These files will often be rate-limited by the underlying providers resulting in errors and temporary, potentially permanent, service bans. Additionally, this option below would help create more logical filtering rules for --vfs-cache-mode full given the fact cloud storage often greatly exceeds local storage.
How do you think rclone should be changed to solve that?
By implementing options for controlling the --vfs-cache-file-max-size and vfs-cache-file-min-size, you would be able to create a range of files which would be unaffected by vfs-cache-mode full. These unaffected files should default back to vfs cache-mode writes keeping in-line with the hierarchy structure.
Example File-Sizes :
25k, 1g
5g, 100g
File-max-size 26k.
Caches : 25k
Un-cached : 1g, 5g, 100g
File-min-size 2.5g
Caches : 5g, 100g
Un-cached : 25k, 1g
File-max-size 26k
File-min-size 6g
Caches : 25k, 100g
Un-cached : 1g,5g
Thoughts? Is the get file size function fast-enough to support these operations on-the-fly?
The text was updated successfully, but these errors were encountered: