gpt4 book ai didi

amazon-web-services - s3fs 在/tmp 中缓存了什么?

转载 作者:行者123 更新时间:2023-12-04 11:45:36 24 4
gpt4 key购买 nike

我正在使用 s3fs将大量文件挂载到 S3 存储桶。它工作正常,除了我的本地磁盘空间也增长了很多(/tmp 目录中的内容)。

我的命令是:

$ su ec2-user -c '/usr/bin/s3fs my-bucket-name -o use_cache=/tmp /home/ec2-user/dir'`

我正在使用 use_cache参数但实际缓存的是什么?这些文件是否仍然需要上传到 s3 并缓存在我的本地机器上?我可以在上传/挂载期间删除它吗?如果我将其关闭(如果用于其他目的),我的上传速度会更快吗?

最佳答案

来自 s3fs wiki (这有点难找)。

If enabled via "use_cache" option, s3fs automatically maintains a local cache of files in the folder specified by use_cache. Whenever s3fs needs to read or write a file on s3 it first downloads the entire file locally to the folder specified by use_cache and operates on it. When fuse release() is called, s3fs will re-upload the file to s3 if it has been changed. s3fs uses md5 checksums to minimize downloads from s3. Note: this is different from the stat cache (see below).

Local file caching works by calculating and comparing md5 checksums (ETag HTTP header).

The folder specified by use_cache is just a local cache. It can be deleted at any time. s3fs re-builds it on demand. Note: this directory grows unbounded and can fill up a file system dependent upon the bucket and reads to that bucket.

关于amazon-web-services - s3fs 在/tmp 中缓存了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54292365/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com