8000 Homebrew Free space management, ideas for cron job bash script maybe · Issue #6 · Doloops/mcachefs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Homebrew Free space management, ideas for cron job bash script maybe #6

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

Open
Jieiku opened this issue Oct 13, 2018 · 2 comments
Open

Comments

@Jieiku
Copy link
Jieiku commented Oct 13, 2018

I have implemented the use of this, and its saving me a ton of bandwidth, so thank you!

I tried like 5-6 different cache files systems, and this and pcachefs were the only ones that worked for me. They both work, but so far I prefer mcachefs, its c/c++ which I love, and also when I view lsof mcachefs only seems to use one entry for r3 file descriptor per file, but when I use pcachefs i see both a r3 and r4 per accessed file, this leads me to believe that mcachefs is doing a cleaner job.

So the next thing to figure out is how to best manage free space, so that the cache does not completely fill the hard drive.

I was thinking I could run a cron job that checks df -h or something similar to see what free space % is at.
then if the space is above a given threshold then delete a file from cache that was accessed the longest time ago.

ls -ltuR /tmp/mcachefs/media_remotefs/cache

the only problem with that Idea is that it seems the atime is not updated for the files in the cache directory, instead the atime is getting updated on the files in the mount location.

I was thinking that maybe the script could get a list of files in the cache, then compare those with files in the mount location to determine which are actually cache files and get the atimes there.

Any ideas on this subject are appreciated!

If I can come up with a good idea for a solution, then I could just have the cron job run every 10 minutes or something

@hradec
Copy link
hradec commented Mar 29, 2019

humm... the journal doesn't show accessed files either, right?

maybe we need some new code in mcachefs to show a new file in the .mcachefs folder, which would show a list of the cached files, with atime...

or maybe just update atime on the cache would be the simpler solution! LOL

I'm working on adding some stuff that I need to mcachefs, so I'll check for this since I'll be messing with the code anyways... I'll let you known!

@jmanley
Copy link
jmanle 6884 y commented Feb 11, 2022

It's been a while since there was any action here, but I'm also interested in a feature to manage/limit the data cached. Any further thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0