[PR #2707] [MERGED] Improved stat cache efficiency by not delete but only register #2726

Closed
opened 2026-03-04 02:07:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2707
Author: @ggtakec
Created: 8/21/2025
Status: Merged
Merged: 9/11/2025
Merged by: @gaul

Base: masterHead: improve/3_reduce_head


📝 Commits (1)

  • 70483e3 Improved stat cache efficiency by not delete but only register

📊 Changes

7 files changed (+389 additions, -113 deletions)

View changed files

📝 src/cache.cpp (+28 -10)
📝 src/cache.h (+2 -0)
📝 src/fdcache_entity.cpp (+16 -0)
📝 src/fdcache_entity.h (+5 -0)
📝 src/metaheader.cpp (+45 -0)
📝 src/metaheader.h (+1 -0)
📝 src/s3fs.cpp (+292 -103)

📄 Description

Relevant Issue (if applicable)

#2706

Details

Currently, after a file(object) operation, the stat cache would be always deleted and a HEAD request would be sent the next time the file(object) was accessed.
However, by changing this specification and updating only the stat information in stat cache (and deleting only the meta header), the number of HEAD requests sent can be reduced for operations that only require stat information.
(Memo: The stat cache caches both meta header and stat information.)
When meta header information is needed, a HEAD request is sent and the stat cache is updated.

In s3fs-fuse CI testing, it was little effect, but we did confirm a reduction in the number of HEAD requests when starting s3fs with the default options manually.

This PR is one in a series of enhancements using Stat Cache following #2706. (The PRs have been separated into smaller PRs.)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2707 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 8/21/2025 **Status:** ✅ Merged **Merged:** 9/11/2025 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `improve/3_reduce_head` --- ### 📝 Commits (1) - [`70483e3`](https://github.com/s3fs-fuse/s3fs-fuse/commit/70483e3329c82feefdb17aef9823e81e0183f54b) Improved stat cache efficiency by not delete but only register ### 📊 Changes **7 files changed** (+389 additions, -113 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+28 -10) 📝 `src/cache.h` (+2 -0) 📝 `src/fdcache_entity.cpp` (+16 -0) 📝 `src/fdcache_entity.h` (+5 -0) 📝 `src/metaheader.cpp` (+45 -0) 📝 `src/metaheader.h` (+1 -0) 📝 `src/s3fs.cpp` (+292 -103) </details> ### 📄 Description ### Relevant Issue (if applicable) #2706 ### Details Currently, after a file(object) operation, the stat cache would be always deleted and a HEAD request would be sent the next time the file(object) was accessed. However, by changing this specification and updating only the stat information in stat cache (and deleting only the meta header), the number of HEAD requests sent can be reduced for operations that only require stat information. (Memo: The stat cache caches both meta header and stat information.) When meta header information is needed, a HEAD request is sent and the stat cache is updated. In s3fs-fuse CI testing, it was little effect, but we did confirm a reduction in the number of HEAD requests when starting s3fs with the default options manually. _This PR is one in a series of enhancements using Stat Cache following #2706. (The PRs have been separated into smaller PRs.)_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:07:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2726
No description provided.