GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — quic: apply multiple quic performance and packet handling improvements by jasnell · Pull Request #63267 · nodejs/node Conversation
Member
A number of planned backend changes and improvements in the packet handling. Yields a net performance improvement of around 10% higher rps. Sets us up to be able to better leverage libuv/libuv#5116 if/when that lands (@santigimeno @saghul fyi) which will provide an even larger perf boost. Fixes a bug while we're at it. @nodejs/quic
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
jasnell
force-pushed
the
jasnell/quic-backend-improvements
branch
from
e921c66 to
ef9e8da
Compare
This comment was marked as outdated.
This comment was marked as outdated.
jasnell
force-pushed
the
jasnell/quic-backend-improvements
branch
4 times, most recently
from
bbe613a to
6ef4e68
Compare
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
jasnell
force-pushed
the
jasnell/quic-backend-improvements
branch
2 times, most recently
from
bfc3adc to
c9c714e
Compare
|
There was an error while loading. Please reload this page.
|
Ok, with a bit of perf tunning and mangling with both h2load options and v8 perf tuning options on the server, with a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: James M Snell <[email protected]>
Use a uv_check_t on BindingData to process outbound pending packet send, and use TrySend for actually sending packets when possible. Results in an 8% improvement in req/s and ~24% improvement in p95 latency. Also sets us up better for future improvements in libuv if the changes proposed in libuv/libuv#5116 are accepted. Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6
Signed-off-by: James M Snell <[email protected]>
Improves overall performance and sets us up for eventual support for GRO/GSO batching in libuv in the future. Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6
Set up for when libuv eventually supports ECN marking. Pass the ECN marking stuff into ngtcp2. Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6
Signed-off-by: James M Snell <[email protected]> PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Use a uv_check_t on BindingData to process outbound pending packet send, and use TrySend for actually sending packets when possible. Results in an 8% improvement in req/s and ~24% improvement in p95 latency. Also sets us up better for future improvements in libuv if the changes proposed in libuv/libuv#5116 are accepted. Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Improves overall performance and sets us up for eventual support for GRO/GSO batching in libuv in the future. Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Set up for when libuv eventually supports ECN marking. Pass the ECN marking stuff into ngtcp2. Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Every stream, session, and endpoint creates aliased structs for stats and state. These were creating v8::ArrayBuffer allocations and views for each instance, which is expensive. This adds a new arena mechanism for AliasedStructs that allocates in pages and allows Streams and Sessions to share the same underlying ArrayBuffer for their stats and state. Since these are never exposed to users, this is safe and results in a significant reduction in allocation counts. Each arena maintains a freelist of pages, where each page is a max of 16KB bytes. Pages are lazily allocated and freed as needed. Each slot in the arena corresponds to a single struct instance, and the slot index is used to calculate the byte offset within the page for that struct's view. The perf improvement is modest but measurable. The key benefit is in reduced memory fragmentation and GC overhead. Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
* Adds invalid this protections in the stats classes * Collects internal private fields into a single private symbol to reduce the number of private field accesses * Adds and corrects isQuic* class checks * Preserve stream id and direction after destroy * Improve stats close snapshotting * Fixes a handful of other bugs and doc issues Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> Assisted-by: Opencode:Opus 4.6 PR-URL: #63267 Reviewed-By: Matteo Collina <[email protected]>
|
@jasnell: Can I ask something about this PR and the performance optimization? I do not know if it is the parser of nghttp3 that changes the calling pattern, or it is something else. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I found the underlying cause. I have drafted an issue #64035 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.