maskit opened a new pull request, #13554:
URL: https://github.com/apache/trafficserver/pull/13554
## Summary
Benchmarking qmux (HTTP/3-over-TCP) against H2 showed a throughput deficit
specific to large, single-stream responses, absent for small objects and
mostly recovered once multiple concurrent streams share a connection.
`QUICStream::send_data()` capped how much of one stream's data it sends
per write event to a fixed 16KB, regardless of contention. A large object
on a solo stream needs many separate event-loop round trips to drain,
each paying real per-event overhead (quiche iterator alloc/free, an FFI
crossing, a flush). This makes that per-event budget contention-aware:
it scales down toward the existing 16KB floor under real contention
(preserving today's fairness guarantee exactly), and grows toward a new
256KB ceiling when a stream has the connection's write path to itself.
The budget is sized from the writable-stream count observed during the
*previous* write event on that connection -- an intentional one-event-lag
tradeoff that avoids draining `quiche_conn_writable()` twice or
materializing a container just to count entries.
Also, while touching the HTTP/3 frame-handling path, removed some dead
code and per-request allocations found along the way:
- `Http3FrameDispatcher`'s per-type handler list moved from a
heap-allocated `std::vector` to fixed inline storage, since at most a
handful of handlers ever register per frame type and this dispatcher
is a per-transaction object.
- `Http3Transaction`'s five per-transaction helper objects (frame
generators/handlers) converted from heap-allocated pointers to value
members, removing five allocations/frees per HTTP/3 transaction.
- Removed `Http3UnknownFrame` and `Http3HeadersFrame`'s `ats_unique_buf`
constructor/factory overload, both fully dead code.
- Aligned `Http3HeadersFrame`'s send-path constructor to take
`IOBufferReader &` like `Http3DataFrame`'s equivalent, instead of `*`.
## Test plan
- [x] New unit test (`test_QUICStream.cc`) covers
`compute_fair_send_budget()`'s no-contention, heavy-contention,
mid-range, and floor-boundary cases.
- [x] `test_net` and `test_http3` pass against BoringSSL + quiche + qmux.
- [x] `test_net` and `test_http3` pass against OpenSSL's native QUIC
backend (a separate, non-quiche `NetVConnection` implementation
that also compiles this code).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]