Re: [tcpm] A question about PRR/loss recovery

Yuchung Cheng <ycheng@google.com> Mon, 19 April 2021 16:55 UTC

Return-Path: <ycheng@google.com>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9AF0C3A3AB6 for <tcpm@ietfa.amsl.com>; Mon, 19 Apr 2021 09:55:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.698
X-Spam-Level:
X-Spam-Status: No, score=-15.698 tagged_above=-999 required=5 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vlacd1bRwB6b for <tcpm@ietfa.amsl.com>; Mon, 19 Apr 2021 09:55:56 -0700 (PDT)
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD0FA3A3AAE for <tcpm@ietf.org>; Mon, 19 Apr 2021 09:55:56 -0700 (PDT)
Received: by mail-wr1-x432.google.com with SMTP id w4so31057304wrt.5 for <tcpm@ietf.org>; Mon, 19 Apr 2021 09:55:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AVoCEQ+8QsLuG+IHb66xnfHUWGXcIIq3yuLSoSg4s8c=; b=YFJH4iywIktdjZRv8Jfgtwm8yd7y6ify1e6037Gb4LzPgBvz4L5/iB8O7TvFlUdPKt W+Xln19Kj1TJDxpn3eux9pZ5oFhiZ2Qq+ZyuIjS1f44R+cUCv5mm6qWdPhKQ7rEI0KGp +la1jNFLPrFjZph9KA9ZpkVJ2vYycQwxahYybcLIV8Vtm4hC5n/HN5pnlxO/zG0sCMa+ 3gmh+UElEfs4v4qaGdbESUaOmxdRMa1Ml3DgliuKb+M5Ub5a3bzOlayY8QDP6F6+IALW HfMdxYUGzZ8t5rntyvQlrUDEElcSPATIBzwjt2JJz1IuOYW7Y45SLTgmHJ5lacdHC6mz q4Mg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AVoCEQ+8QsLuG+IHb66xnfHUWGXcIIq3yuLSoSg4s8c=; b=Otb3/qipNGbu9XJbnS5qMbo5hDyVNgwckgSyJmdvpCbzWl4xyfwoSFGL72Va0mwqaQ zr1zry4IKa7qJVLjPgrlFkq2/5MOL537qTUjYdJaOeA2YZ+ISyxPnbOhG2p5jGaj2kQJ tRiCwWmXMasOw10c+SmeWqwAs/Syhf87gFOhNggFXsXFgWVZbjDiFWdjAdpAfbLbwdve RIWh2LcWHiEU3iE8K0TBDjUz8PbWIrE5CCRKKQl6RAY7Hb4FjVxd5y162oBZD4/yEHgR arBODB4969VvrCtLUPkIm6lj32zMqvLxQA6xr4/fA6/Dvy3+8Xhuv4Ixla3mS+/r2gqC 6FFw==
X-Gm-Message-State: AOAM5322U9ixkER1e4jPk8+HcfkSBX3tLBLbiuvLhj1DTuyD9H6MhLCp rGnzuBJ0SmqwZVr9sDQy/q6DVv900oubFqIn+8jX4R1Qhqo=
X-Google-Smtp-Source: ABdhPJzAodU9bvqkrPiYWRH114PZqyeuyEuZrg2fnq+zUKyLyQylcY7YxR4VH4J9V1YDzHJyaIuy8HGacssF/wyY70E=
X-Received: by 2002:a5d:4f82:: with SMTP id d2mr15901968wru.228.1618851353639; Mon, 19 Apr 2021 09:55:53 -0700 (PDT)
MIME-Version: 1.0
References: <MN2PR00MB08779B864962711A2F35F2F4C34C9@MN2PR00MB0877.namprd00.prod.outlook.com> <CADVnQy=2rC4N84DDMV-Ovo8v_wNZ3i_fd4AkXzCYY2W0cdcqnQ@mail.gmail.com>
In-Reply-To: <CADVnQy=2rC4N84DDMV-Ovo8v_wNZ3i_fd4AkXzCYY2W0cdcqnQ@mail.gmail.com>
From: Yuchung Cheng <ycheng@google.com>
Date: Mon, 19 Apr 2021 09:55:16 -0700
Message-ID: <CAK6E8=cn=7=amNg93o=X9+jVSjXALetkgJM7q+dXQ2WLVORJNA@mail.gmail.com>
To: Neal Cardwell <ncardwell@google.com>
Cc: Yi Huang <huanyi=40microsoft.com@dmarc.ietf.org>, "tcpm@ietf.org" <tcpm@ietf.org>, Matt Mathis <mattmathis@google.com>, Nandita Dukkipati <nanditad@google.com>
Content-Type: multipart/alternative; boundary="000000000000e1085d05c05633fc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/-MKplwByjQCl_pGozSpckJf6hwg>
Subject: Re: [tcpm] A question about PRR/loss recovery
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Apr 2021 16:56:00 -0000

I think the current PRR RFC is fairly clear about cwnd computation and it
should be used for both retransmits and new data (so both implicitly use
sndcnt). Having limited-transmit (i.e. new-data) only follow the
(unmodified) cwnd would break PRR substantially -- the packet conservation
principle is not really implemented. I suppose it's easy to fix Windows
code?

On Fri, Apr 16, 2021 at 12:44 PM Neal Cardwell <ncardwell@google.com> wrote:

>
>
> On Fri, Apr 16, 2021 at 3:08 PM Yi Huang <huanyi=
> 40microsoft.com@dmarc.ietf.org> wrote:
>
>> Hi tcpm and PRR authors,
>>
>>
>>
>> We are revisiting PRR implementation in Windows and I noticed there might
>> be a problem in our implementation (and it is actually not specific to PRR).
>>
>>
>>
>> PRR algorithm computes a sndcnt on each ACK during loss recovery and thus
>> use it to accurately regulate bytes in-flight.
>>
>>
>>
>> In the RFC (6937 or bis), I see this statement and note “local” and
>> “response to each ACK”.
>>
>>    We introduce a local variable "sndcnt", which indicates exactly how
>>
>>    many bytes should be sent in response to each ACK.
>>
>>
>>
>> In Windows’ TCP implementation, new data can be also sent out inline
>> during loss recovery from app send context (app calling send()) and they
>> are not regulated by sndcnt/PRR. Instead, we just check if CWND allows us
>> to send in this case. So, effectively, we use two variables controlling the
>> number of bytes in flight during loss recovery, i.e. sndcnt and CWND. It
>> apparently seems a bad behavior because it ignores PRR’s sendcnt but I just
>> want to double check with the PRR authors and the community.
>>
>>
> Thanks for the note.
>
> I believe that approach runs contrary to the intent of the PRR
> spec/algorithm.
>
> Implicit in the end of the algorithm in
> https://tools.ietf.org/html/rfc6937#section-3 is the following line (in
> pseudocode):
>
>   cwnd = pipe + sndcnt
>
> That is what the Linux TCP implementation of the PRR algorithm does. That
> way there is only one variable (cwnd) controlling the number of bytes in
> flight during loss recovery. Effectively, this allows the PRR algorithm
> decision to persist, in case there is no data available to send at the
> instant the ACK arrives.
>
> Perhaps the update to the PRR RFC can make this explicit?
>
> best,
> neal
>
>