Tighten Mux SRT pacing lead and log ACK counters#1091
Merged
Conversation
Production traces with last party's 900ms PACING_LEAD_MS still showed ~50% of packets TLPKTDROP'd and Mux dropping the connection after ~26s. Send buffer hovers at ~800ms (close to libsrt's ~1020ms drop threshold), so any ACK-arrival jitter pushes packets over the edge. Drop the lead to 250ms to keep the buffer aged well under the threshold even when ACKs are slow. Also log byteSent, pktRecvACK, and pktSentACK from srt_bstats so the next trace can confirm or rule out the slow-ACK theory directly instead of inferring it from msSndBuf. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
PACING_LEAD_MSfrom 900 → 250. The previous fix in Fix Mux SRT streaming and reconnect bugs #1090 still left only 120ms of headroom against libsrt's ~1020ms TLPKTDROP threshold; production traces show ACKs from Mux arriving ~800ms late, so routine jitter pushes packets past the threshold and ~50% get TLPKTDROP'd. Mux then drops the connection after ~26s of gappy audio.byteSent,pktRecvACK, andpktSentACKto the SRT stats log so the next production trace can confirm or rule out the slow-ACK theory directly instead of inferring it frommsSndBuf.Test plan
mise run lintpasses locally (✓)[mux/srt] statsentries:msSndBufshould sit comfortably below 500ms instead of ~800ms, andpktSndDropshould be near 0pktRecvACKis non-zero (we are receiving ACKs); if it's still ~0, the diagnosis was wrong and we need to investigate the receive path next🤖 Generated with Claude Code