mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #824] Explanation of async vs sync #480
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#480
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CMCDragonkai on GitHub (Sep 20, 2018).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/824
In the man page, it says that async and sync are all supported. I was hoping to find out how does s3fs implement async writes. I have a situation where I have a process that wants to write hundreds of thousands of files that are each a couple megabytes in size.
I was worried that if sync was the default, then the writing process will be blocked by sending an HTTP PUT to S3. On the other hand, if async was switched on, I couldn't find any information on how the writeback buffer is implemented. Is it buffering into RAM? Can these writes be spilled onto swap/disk? What about backpressure, is it possible that eventually writes will block once the buffer is full?
I also found that there is a cache option and a
ensure_diskfreeoption, which appears to allow the possibility of using a local filesystem as both the read cache and write cache. But how does this feature interact with sync vs async mounting options?@gaul commented on GitHub (Oct 10, 2020):
Asynchronous has a different meaning here, related to whether an interrupt like
SIGINTwill interrupt a network call like write when the server is not responding:https://unix.stackexchange.com/questions/146620/difference-between-sync-and-async-mount-options
This dates back to NFS which would retry operations forever. s3fs actually will return
EIOafter a configurable number of retries.As for the asynchronous meaning you mean, s3fs has close-to-open semantics. Internally it spools writes to a local file and does a PUT during
closeorfsync. This means that the write is not complete or observable to other S3 clients until these calls complete. #367 discusses a write-behind caching system although this has numerous pitfalls and may never be implemented.