fix: reject degenerate RTT predictions in adaptive concurrency - #960
Open
MuhammadMaazA wants to merge 1 commit into
Open
fix: reject degenerate RTT predictions in adaptive concurrency#960MuhammadMaazA wants to merge 1 commit into
MuhammadMaazA wants to merge 1 commit into
Conversation
Collaborator
|
I'm not sure if the referenced issue is valid or needs fix. Will double check. Low priority. |
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.
Fixes #875.
This change makes the RTT regression reject near-singular fits using a relative conditioning check instead of an absolute determinant threshold. This prevents very small variation in transfer sizes from producing unstable slopes and unrealistic extrapolated RTTs.
It also prevents a clamped zero RTT from being converted into a synthetic ~9.5 TiB/s bandwidth estimate by returning None for non-positive predicted RTTs.
Tests cover both the near-singular regression case and the zero-RTT bandwidth case.
Note
Medium Risk
Changes numeric guards in the RTT regression path used by adaptive concurrency; behavior shifts from extreme bogus estimates to
None/zero bandwidth when fits are degenerate.Overview
Tightens adaptive concurrency RTT modeling so unstable or meaningless predictions do not drive concurrency decisions.
Online regression (
ExpWeightedOnlineLinearRegression) now treats the normal equations as ill-conditioned whendeltais tiny relative tosw * sxx, not only when|delta|is below a fixed absolute floor. Near-collinear x values (e.g. transfer sizes that barely differ) no longer produce extrapolated slopes/RTTs;predictandcoefficientsreturnNonein those cases.Bandwidth from RTT (
RTTPredictor::predicted_bandwidth) returnsNonewhen the predicted RTT at the probe size is ≤ 0, instead of dividing by a clamped zero viamin_rtt.max(1e-6)and reporting a huge synthetic throughput. Downstream, the controller already maps missing bandwidth to0.New unit tests cover near-singular x rejection and the zero/clamped-RTT bandwidth case.
Reviewed by Cursor Bugbot for commit 9dfcc24. Bugbot is set up for automated code reviews on this repo. Configure here.