[PR #404] [MERGED] Add curl handler pool to reuse connections #1495

Closed
opened 2026-03-04 01:54:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/404
Author: @rockuw
Created: 4/22/2016
Status: Merged
Merged: 4/26/2016
Merged by: @ggtakec

Base: masterHead: keep-alive


📝 Commits (1)

  • b78adb4 Add curl handler pool to reuse connections

📊 Changes

2 files changed (+126 additions, -2 deletions)

View changed files

📝 src/curl.cpp (+93 -2)
📝 src/curl.h (+33 -0)

📄 Description

Currently s3fs creates a new tcp connection for each request to s3. Together with the fact that curl(or HTTP) defaults to use 'Connection:keep-alive', the client may ends with lots of 'TIME_WAIT' connections:

ubuntu@ip-172-31-29-108:~/s3fs-fuse$ for i in $(seq 100); do ls /tmp/s3fs > /dev/null; done
ubuntu@ip-172-31-29-108:~/s3fs-fuse$ sudo ss -tan | grep TIME | wc -l
101

This patches enables reusing curl handlers and thus utilizes HTTP keep-alive, which has the effects:

  1. boost performance
  2. largely reduce TIME_WAIT connections

🔄 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/404 **Author:** [@rockuw](https://github.com/rockuw) **Created:** 4/22/2016 **Status:** ✅ Merged **Merged:** 4/26/2016 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `keep-alive` --- ### 📝 Commits (1) - [`b78adb4`](https://github.com/s3fs-fuse/s3fs-fuse/commit/b78adb4bb0542301dbe406023b7022fcdf2d8f4c) Add curl handler pool to reuse connections ### 📊 Changes **2 files changed** (+126 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/curl.cpp` (+93 -2) 📝 `src/curl.h` (+33 -0) </details> ### 📄 Description Currently s3fs creates a new tcp connection for each request to s3. Together with the fact that curl(or HTTP) defaults to use 'Connection:keep-alive', the client may ends with lots of 'TIME_WAIT' connections: ``` ubuntu@ip-172-31-29-108:~/s3fs-fuse$ for i in $(seq 100); do ls /tmp/s3fs > /dev/null; done ubuntu@ip-172-31-29-108:~/s3fs-fuse$ sudo ss -tan | grep TIME | wc -l 101 ``` This patches enables reusing curl handlers and thus utilizes HTTP keep-alive, which has the effects: 1. boost performance 2. largely reduce TIME_WAIT connections --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:54:14 +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#1495
No description provided.