Regulator updates to further minimize unnecessary glitches#1464
Merged
Conversation
3cb764c to
ec4dff3
Compare
543f786 to
59ff4a7
Compare
This builds upon the refinement introduced by: #1437 That PR allowed us to use a good packet ignoring skips if the previous callback was serviced using a prediction (glitch). However, we were still effectively throwing out the next good packet whenever there were skips and the previous callback was not serviced using a prediction. This PR takes a slightly different approach by allowing us to stash and use the next good packet on the following callback. This also helps slow down jumping sequence numbers when there are multiple skipped packets in a row (which causes abrupt drops in latency). This also addresses a special case where we are only skipping a single good packet due to tolerance. Rather than returning a prediction, we allow it to use the packet. For this to work, we need to ease the tolerance restrictions slightly by allowing it to sometimes expand by the duration of an additional packet. Effectively, this also means that tolerance restrictions alone will only cause glitches when the skew exceeds at least one packet in duration. My initial testing indicates that these changes significantly reduce glitch counts, by as much as 2x, resulting in a slightly improved signal (at least to my ears). sudo tc qdisc add dev eth0 root netem slot distribution pareto 0.1ms 3.0ms loss 10% This also eliminates the use of "goto" statements in the regulator code and fixes a bug with auto headroom adjustments
59ff4a7 to
3a890f1
Compare
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.
This builds upon the refinement introduced by:
#1437
That PR allowed us to use a good packet ignoring skips if the previous callback was serviced using a prediction (glitch).
However, we were still effectively throwing out the next good packet whenever there were skips and the previous callback was not serviced using a prediction.
This PR takes a slightly different approach by allowing us to stash and use the next good packet on the following callback. This also helps slow down jumping sequence numbers when there are multiple skipped packets in a row (which causes abrupt drops in latency).
This also addresses a special case where we are only skipping a single good packet due to tolerance. Rather than returning a prediction, we allow it to use the packet.
For this to work, we need to ease the tolerance restrictions slightly by allowing it to sometimes expand by the duration of an additional packet. Effectively, this also means that tolerance restrictions alone will only cause glitches when the skew exceeds at least one packet in duration.
My initial testing indicates that these changes significantly reduce glitch counts, by as much as 2x, resulting in a slightly improved signal (at least to my ears).
sudo tc qdisc add dev eth0 root netem slot distribution pareto 0.1ms 3.0ms loss 10%