Re: [tcpm] More motivating scenarios for tcpm-ack-pull

Jonathan Morton <chromatix99@gmail.com> Sat, 07 December 2019 14:03 UTC

Return-Path: <chromatix99@gmail.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 B40B11200A4 for <tcpm@ietfa.amsl.com>; Sat, 7 Dec 2019 06:03:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.749
X-Spam-Level:
X-Spam-Status: No, score=-1.749 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 T6JufCO6Svdl for <tcpm@ietfa.amsl.com>; Sat, 7 Dec 2019 06:03:58 -0800 (PST)
Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (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 5ADFB120047 for <tcpm@ietf.org>; Sat, 7 Dec 2019 06:03:58 -0800 (PST)
Received: by mail-lj1-x243.google.com with SMTP id h23so10693278ljc.8 for <tcpm@ietf.org>; Sat, 07 Dec 2019 06:03:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=XXsEIaqKNMeAkf0+NROtHaeTOOrKuDnAN6NYBZfBaHo=; b=NJO5pGA3q3Pv+E7JvpOpHXeiFl+yKSTqN4OVZ+DletMJoFtkVChkHwPpXpUlkrpmxo gKL4tpuAMc7/u7RmmdByEYhMC2od/EKguSbnc+c9oyYAXvVQPRYqZLnNB3EyTE3hJz4a bkmJuKs/DqjlL7phahRWk7icvG00jwjcp8FJyKJe/xPJ7BzFD/JvHlCjQb8hfi9gvMry 2tqcC1Mwp6rZE3b4B2tJWj8XrW42l0Q1vHPSF7w+3V5z2SCQei5ruNXpLDMn9kMv1HTQ tLTuQsPagt04RcIsm/V20tknODJw7v0HC7YSClNZfYqiNr4J4/T4znbHEV73E/YzLx2F j8rw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=XXsEIaqKNMeAkf0+NROtHaeTOOrKuDnAN6NYBZfBaHo=; b=A0mmX6yyyKrfT8F6h+xYHNV4BwG+tUl+SO35w1/WpZ1QkgLXWJeFKezVOOLMx8d9rL nf47WqxbBqIEfltybRCx6M7dn/XF2++CNPbtivbFgSkLE7fdFYiDEdLYX9oakVDqIsUL qjuEnp0j+Nz9gLwX45aJzPm1jWNSsak6SgOPemkg6Xvo1PjSBWe6USrw/JJS2c7A7iGh jgOOBscScr1xmmVecbMRappxfC8CzGrluv/W/u4AtlXGMEueTHobC21rbzMe7miFSjta AI1BP3hQWXqrqQzODgOs/SzmsJql7UZ+R3x4IJ1S12vab1UsobvKX8qTe27sTCIAgNLi g0og==
X-Gm-Message-State: APjAAAWxaZnz0QOH8t/AClzn46re03+U5YQOGC5gtHu3zZV45piHV7hT VWifU8aAP7UbO536c2OjQng=
X-Google-Smtp-Source: APXvYqyL4cPx9Hzb7PtYMfgWkYaJuHxJimPbluQUhNRI8WjHIV7XXsaRTQjaX2b++Lt/OqYdX8AlAg==
X-Received: by 2002:a05:651c:1139:: with SMTP id e25mr11745862ljo.200.1575727436604; Sat, 07 Dec 2019 06:03:56 -0800 (PST)
Received: from jonathartonsmbp.lan (83-245-229-102-nat-p.elisa-mobile.fi. [83.245.229.102]) by smtp.gmail.com with ESMTPSA id i19sm8385557ljj.24.2019.12.07.06.03.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Dec 2019 06:03:55 -0800 (PST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Jonathan Morton <chromatix99@gmail.com>
X-Priority: 3 (Normal)
In-Reply-To: <ef6c55535a860b37056cd014ad178416.squirrel@webmail.entel.upc.edu>
Date: Sat, 07 Dec 2019 16:03:53 +0200
Cc: "Scheffenegger, Richard" <rs.ietf@gmx.at>, tcpm IETF list <tcpm@ietf.org>, Jon Crowcroft <jon.crowcroft@cl.cam.ac.uk>
Content-Transfer-Encoding: quoted-printable
Message-Id: <2BA84671-AF1A-40B0-A195-B64059B780CD@gmail.com>
References: <3326ed99-b077-592b-7913-aeb2286912c4@bobbriscoe.net> <13486113479ebcb344247daedda10467.squirrel@webmail.entel.upc.edu> <CAEeTejJC4KLbjLNWmVxPXwDtrC=rjrcOsVnwjEym2uEhJZq7cw@mail.gmail.com> <3f4d3d94-24a8-4ed8-a752-ae5242907d43@gmx.at> <ef6c55535a860b37056cd014ad178416.squirrel@webmail.entel.upc.edu>
To: Carles Gomez Montenegro <carlesgo@entel.upc.edu>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpm/A-OI02LPG_XIq3JdU5jGBOnAHmY>
Subject: Re: [tcpm] More motivating scenarios for tcpm-ack-pull
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: Sat, 07 Dec 2019 14:04:00 -0000

> On 7 Dec, 2019, at 1:30 pm, Carles Gomez Montenegro <carlesgo@entel.upc.edu> wrote:
> 
> A concern with these techniques is that they are limited to some extent.
> For example, some applications produce small segments with the PSH flag
> set and benefit from Delayed ACKs (e.g. to piggyback ACKs and replies). In
> those cases, even regardless of the CWR flag, triggering immediate ACKs
> will avoid achieving performance benefits of Delayed ACKs.
> 
> In contrast, a dedicated resource (e.g. a TCP header reserved bit, as we
> propose in the draft) will not suffer such limitations. However, that
> resource needs to be allocated.
> 
> Summarizing, there may be two approaches to enable ACK Pull:
> 
> 1.- Overloading semantics of existing TCP header fields.
> 2.- Dedicating a resource.
> 
> Then the question is, considering pros and cons of both approaches: which
> one do we prefer?

I note that the semantics of the AKP flag differ subtly from that of PSH, in that the former says "I want an ack immediately", while the latter says "I have temporarily run out of data to send, so the receiving application's buffer should be flushed now".  It would be just as easy to modify existing receivers to treat PSH as an immediate ack request as to implement handling of AKP, so this simple use doesn't seem very compelling for allocating a scarce bit.

One potentially interesting application that was suggested to me, and which could legitimately motivate the use of a new reserved flag bit, was to provide a hint as to the correct Delayed Ack ratio, for use as a congestion control mechanism for acks.  Presently an ack stream can be anti-responsive, in that dropping acks from a heavily congested reverse path can actually increase the ack arrival rate, by improving the throughput of an uncongested forward path that was limited by ack-clocking.  AckCC exists as an RFC to address this problem - and would tend to benefit from Generalised ECN - but its reliance on a TCP option is less than optimal, given the traversal problems often cited.

A way that such a hint could work is by spacing AKP flags at the desired ack ratio.  A receiver observing AKP flags could then infer that the usual Delayed Ack rule requiring an ack for every two MSS received is suspended, and thus only send acks when AKP is set, the Delayed Ack timer expires, or some other forcing condition occurs.

It might be wise to restore normal Delayed Ack rules if the AKP flags stop indicating a reasonable ratio, for example if the Delayed Ack timer expires twice without an AKP flag arriving.  A maximum ratio could be specified as a sanity check, eg. 1:64, at which the receiver generates an ack even if an AKP hasn't arrived yet.

The above hinting semantics would remain compatible with other use cases mentioned, as AKP still forces an ack.  However this is also a theoretical disadvantage because the segments marked with AKP generally won't coincide with the trailing end of bursts caused, for example, by link-layer aggregation or IRQ "optimisation" in NICs.  Those trailing segments are where you would optimally want to trigger an ack, but as currently specified, AKP removes the receiver's discretion to synchronise a sparse Delayed Ack ratio with those segments.

This could be addressed by pairing AKP with PSH.  Both flags set together would require an immediate ack of that particular segment, with the implication both that an ack is expected promptly and that no more data is immediately forthcoming.  PSH by itself would continue to permit a degree of latitude with respect to ack timing, and merely indicates that prompt delivery to the application is required.  AKP by itself then requests a prompt ack, but one that may reflect following segments that are already in receive buffers and will be processed immediately after this one, as well as the hinting described above.

I think that's a reasonable amount of new functionality to introduce for the cost of one bit.  The above suggestion addresses both the original problem and another long-standing one, with minimal newly allocated resources and relatively little risk of traversal problems.  And (importantly) TCP doesn't break if receivers ignore or fail to understand it.

 - Jonathan Morton