Skip to content

Bug in cubic.rs #1848

Duplicate
Duplicate

Description

@WernerDrasche

I think that the following code passage can be removed from cubic.rs as it causes unnecessary packet loss and tanks performance when combined with qdisc pacing.

// Detecting spurious congestion events.
// <https://tools.ietf.org/id/draft-ietf-tcpm-rfc8312bis-00.html#section-4.9>
//
// When the recovery episode ends with recovering
// a few packets (less than cwnd / mss * ROLLBACK_THRESHOLD_PERCENT(%)), it's
// considered as spurious and restore to the previous state.
if r.congestion_recovery_start_time.is_some() {
  let new_lost = r.lost_count - r.cubic_state.prior.lost_count;

  let rollback_threshold = (r.congestion_window / r.max_datagram_size) *
      ROLLBACK_THRESHOLD_PERCENT /
      100;

  let rollback_threshold = rollback_threshold.max(MIN_ROLLBACK_THRESHOLD);

    if new_lost < rollback_threshold {
        let did_rollback = rollback(r);
        if did_rollback {
            return;
        }
    }
}

Activity

  1. holzingk commented on Dec 18, 2025

    @holzingk

    c.f. #1411

  2. added
    type: performance
    area: recovery
    on Nov 24, 2026
  3. ghedo commented on Nov 25, 2026

    @ghedo
    Member

    Closing as a duplicate of #1411, which tracks the same spurious-congestion rollback heuristic in cubic.rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: recoverytype: performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions