yangljun / s3fs

Automatically exported from code.google.com/p/s3fs
GNU General Public License v2.0
0 stars 0 forks source link

S3fs cache size #383

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello S3FS team,

First, thanks for your good work !  

It would be great if we could specify when we mount the volume the following 
parameters : 
- The maximum size of local cache
- The maximum size of a single file to cache.

Example : 

/usr/bin/s3fs mybucket /mnt -ouse_cache=/tmp/mycache -omax_cache_size=64G 
-omax_file_size_cache=1M

This would allow caching of mybucket into /tmp/mycache   and grow untill reach 
64Gb, and would *only* cache files smaller than 1Mb

Why limit the maximum cache size ? 
This would fix a issue where s3fs cache use all partition space until disk is 
full.

Why limit the maximum size of a file to be stored in cache ?
In our case, we use S3FS to mount remote backup drive, the backup metadata is 
stored in XML or small binary files, and backup data in huge archives. Keeping 
metadata in cache would allow us to retrieve quickly backup information.

Thanks,
Samuel

Original issue reported on code.google.com by SamuelDe...@gmail.com on 31 Oct 2013 at 4:53

GoogleCodeExporter commented 9 years ago
Hi, Samuel

Now s3fs could not limit local cache size.
But there is test shell code in test directory, sample_delcache.sh file maybe 
helps your issue.
(This script is for issue 364)

Please try to use it.
Thanks in advance for your help.

Original comment by ggta...@gmail.com on 11 Nov 2013 at 2:57

GoogleCodeExporter commented 9 years ago
Hi,

This issue is left for a long term, and s3fs project moved on 
Github(https://github.com/s3fs-fuse/s3fs-fuse).
So I closed this issue.

If you have a problem yet, please post new issue.

Regards,

Original comment by ggta...@gmail.com on 23 Dec 2013 at 3:27