Repository navigation
Limit pacer burst size at high bitrates - #1058
Merged
Merged
Conversation
The leaky bucket pacer lets media debt grow to a full PACING interval (40 ms) before it waits. At 50 Mbps that is a 250 kB burst, which risks overfilling socket buffers. Cap the burst interval at MAX_BURST_SIZE / adjusted_bitrate, with MAX_BURST_SIZE = 63 kB as in libwebrtc's PacingController::kMaxBurstSize. Below ~12.6 Mbps PACING is still the smaller of the two, so behaviour there is unchanged. Probing and padding timing are not affected. Closes algesten#827
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #827
As suggested by @k0nserv in #823, cap paced media bursts so high bitrates do
not overfill socket buffers.
The leaky bucket pacer previously let media debt grow to a full 40 ms pacing
interval before waiting, or about 250 kB at 50 Mbps. Set MAX_BURST_SIZE to
63,000 bytes, as in libwebrtc's PacingController, and use the smaller of the
40 ms interval and MAX_BURST_SIZE / adjusted_bitrate. Wait when debt reaches
that interval, matching libwebrtc's NextSendTime() boundary.
Below about 12.6 Mbps, the 40 ms interval remains the limit. At an exact
interval boundary, the pacer now stops one packet earlier. Padding and probe
timing are unchanged.