Homebrew Free space management, ideas for cron job bash script maybe · Issue #6 · Doloops/mcachefs · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
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
The text was updated successfully, but these errors were encountered: