improve download performance, minimal effort #14098
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not poll the socket for pending data every transfer loop iteration. This gives 10-20% performance gains on large HTTP/1.1 downloads (on my machine).
> python3 tests/http/scorecard.py --httpd -d --download=100mb h1 Size single(1x1) [cpu/rss] serial(50x1) [cpu/rss] parallel(50x50) [cpu/rss] Errors before 100MB 781 MB/s [94.0%/8MB] 1163 MB/s [98.9%/9MB] 1450 MB/s [99.9%/18MB] after 100MB 796 MB/s [94.1%/8MB] 1184 MB/s [98.8%/9MB] 1694 MB/s [100.0%/18MB]