Skip to content

Set PoolManager blocksize if urllib3 is v2 #3612

Merged
hssyoo merged 2 commits intoboto:developfrom
hssyoo:set-blocksize
Feb 5, 2026
Merged

Set PoolManager blocksize if urllib3 is v2 #3612
hssyoo merged 2 commits intoboto:developfrom
hssyoo:set-blocksize

Conversation

@hssyoo
Copy link
Copy Markdown
Contributor

@hssyoo hssyoo commented Dec 11, 2025

While running some S3 performance tests, we noticed that network bandwidth took a significant hit uploading large objects when going from urllib3 v1 to v2. We isolated the bottleneck to this commit: urllib3/urllib3@791c385

urllib3 v2 implemented in-house chunking logic and set a default blocksize of 16KB. This created a bottleneck when transferring larger payloads. Experiments showed that setting 128KB blocksizes was roughly the point where we started getting diminishing returns in performance improvements with large payloads and had negligible impact on small payloads.

We're setting an initial override blocksize of 128KB based on current data. Ideally we won't touch this too much but we can revisit this value if we find users aren't benefitting from it.

PR that added blocksize support: urllib3/urllib3#2348

Figure_1

@hssyoo hssyoo changed the title Set blocksize Set PoolManager blocksize if urllib3 is v2 Dec 11, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 11, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.67%. Comparing base (b0a4fbe) to head (a23ca16).
⚠️ Report is 131 commits behind head on develop.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3612      +/-   ##
===========================================
- Coverage    92.71%   92.67%   -0.05%     
===========================================
  Files           68       68              
  Lines        15561    15567       +6     
===========================================
- Hits         14428    14427       -1     
- Misses        1133     1140       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@SamRemis SamRemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Steve!

Appreciate the deep dive and PR here. Looks good- I was able to reproduce significant bandwidth increases with the new block size from this PR compared to the before.

@hssyoo hssyoo merged commit fd080c7 into boto:develop Feb 5, 2026
40 checks passed
@hssyoo hssyoo deleted the set-blocksize branch February 5, 2026 16:04
aws-sdk-python-automation added a commit that referenced this pull request Feb 5, 2026
* release-1.42.43:
  Bumping version to 1.42.43
  Update endpoints model
  Update to latest models
  Set PoolManager blocksize if urllib3 is v2  (#3612)
hswong3i pushed a commit to alvistack/boto-botocore that referenced this pull request Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants