From nobody Fri Nov 11 05:02:04 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N7mlm0J5Wz4dRxq for ; Fri, 11 Nov 2022 05:02:12 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N7mll5XHQz3ynd; Fri, 11 Nov 2022 05:02:11 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x52b.google.com with SMTP id e129so3528435pgc.9; Thu, 10 Nov 2022 21:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=NS8dLrC137xX650OcJBWXmVtGYe7v1cNykw7L9ed4jU=; b=Y2AkaR+LtgetuarLdp2GoBJ5Jjk6P7caihCz8tnZB/JDqJqW4axtEz0+pMz5EUjU7p wl/jlY5OHzUcdEzV4xdiirxyCfB8dfU3fJ4Zi7V5H4RmDs61AyquXCsvnRlK3LxFsY+v lhcfYcPTTM4mghMXMPhz1N0/Onf3xdZvW5qkKWTpR7LtgbHb9i8pykSAchjNBrcbSlCU //5V0rV3VAUW69Y8U0ZJGEhYv6ATXlx/3y+VxXzGvU15BANuSUBBHS7dZkqTBDAwpCA6 lOWwQV5zirssklBsAU76VkoSTZlIFx7YWLBYBEjk5vYFmrpzUU6dInJc+OFU2x0tD1NB I+Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NS8dLrC137xX650OcJBWXmVtGYe7v1cNykw7L9ed4jU=; b=XtMJRHdyNe9H/rQg2cEoVklD2KLbSXKzeQ4QLKtffXmYJOuN+9tGwCpCLVSB2KIEpd K5RD9xyup39oM6PJUrUJ3xhZCWeqlRlfrrYoy4i75XWvJ1t9LAUKoLABmqNdD5oIBPx9 aAvMxisazohSP4qO7g4oww64DuUFF03Yo+BuaEnQ4hoiJAiaw4wbvAyuCgP5AuZRQj7z HMZlYWaVZH27FibAPNJztZ+l/t4qbf3+m/7/r025fwvNo6pUlyq4QAUZYvZwlvfJWEFa nbMTQdpFrNbZxGosr0UreGQHDgtcMGUE6De8jGp2aEdKjTTi4Z+qAEhSs0uTsoTlQpqu XUZQ== X-Gm-Message-State: ANoB5pnhdX4iwtvJ1ndeRO27RIrcjC0R8hPqvaA9/BvjlPwyCNDVk2E9 +zpX/kMR+WMzggKstR+NGJfWfY2yN6/hq7XG X-Google-Smtp-Source: AA0mqf5fHW2AHrghjbTYDBnhGDJIoJnyjjqey0oBVPd78ZmOTVYBy7bdawoznSh8REt1PXIAMBgzZg== X-Received: by 2002:a05:6a00:1488:b0:53b:f208:d7db with SMTP id v8-20020a056a00148800b0053bf208d7dbmr965523pfu.42.1668142930048; Thu, 10 Nov 2022 21:02:10 -0800 (PST) Received: from [172.17.252.129] (ns1.oxydns.net. [45.32.91.63]) by smtp.gmail.com with ESMTPSA id h4-20020a170902680400b0017b264a2d4asm605704plk.44.2022.11.10.21.02.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Nov 2022 21:02:09 -0800 (PST) From: Zhenlei Huang Message-Id: <3911101F-3010-45F4-97C1-9E2D25149676@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_14863C5B-763C-4E1F-9ED6-5D1E38BD0372" List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Too aggressive TCP ACKs Date: Fri, 11 Nov 2022 13:02:04 +0800 In-Reply-To: <6FE15D58-D19F-4B7F-8548-40B9573A7F7F@freebsd.org> Cc: Hans Petter Selasky , freebsd-net@freebsd.org To: tuexen@freebsd.org References: <75D35F36-7759-4168-ADBA-C2414F5B53BC@gmail.com> <712641B3-5196-40CC-9B64-04637F16F649@lurchi.franken.de> <62A0DD30-B3ED-48BE-9C01-146487599092@gmail.com> <0FED34A9-D093-442A-83B7-08C06D11F8B5@lurchi.franken.de> <330A9146-F7CC-4CAB-9003-2F90B872AC3E@gmail.com> <1ed66217-5463-fd4d-7e7a-58d9981bc44c@selasky.org> <5A501643-1E81-4A8C-8DDC-094371DC03D7@gmail.com> <7EDD65B7-5FCD-42E1-A9E8-AA5139B0A81E@gmail.com> <6FE15D58-D19F-4B7F-8548-40B9573A7F7F@freebsd.org> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4N7mll5XHQz3ynd X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_14863C5B-763C-4E1F-9ED6-5D1E38BD0372 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Nov 10, 2022, at 5:28 PM, tuexen@freebsd.org wrote: >=20 >> On 10. Nov 2022, at 08:07, Zhenlei Huang = wrote: >>=20 >>> On Nov 9, 2022, at 11:18 AM, Zhenlei Huang = wrote: >>>=20 >>>=20 >>>> On Oct 22, 2022, at 6:14 PM, Hans Petter Selasky = wrote: >>>>=20 >>>> Hi, >>>>=20 >>>> Some thoughts about this topic. >>>=20 >>> Sorry for late response. >>>=20 >>>>=20 >>>> Delaying ACKs means loss of performance when using Gigabit TCP = connections in data centers. There it is important to ACK the data as = quick as possible, to avoid running out of TCP window space. Thinking = about TCP connections at 30 GBit/s and above! >>>=20 >>> In data centers, the bandwidth is much more and the latency is = extremely low (compared to WAN), sub-milliseconds . >>> The TCP window space is bandwidth multiply RTT. For a 30 GBit/s = network it is about 750KiB . I think that is trivial for a >>> datacenter server. >>>=20 >>> 4.2.3.2 in RFC 1122 states: >>>> in a stream of full-sized segments there SHOULD be an ACK for at = least every second segment=20 >>> Even if the ACK every tenth segment, the impact of delayed ACKs on = TCP window is not significant ( at most >>> ten segments not ACKed in TCP send window ). >>>=20 >>> Anyway, for datacenter usage the bandwidth is symmetric and the = reverse path ( TX path of receiver ) is sufficient. >>> Servers can even ACK every segment (no delaying ACK). >>>=20 >>>>=20 >>>> I think the implementation should be exactly like it is. >>>>=20 >>>> There is a software LRO in FreeBSD to coalesce the ACKs before they = hit the network stack, so there are no real problems there. >>>=20 >>> I'm OK with the current implementation. >>>=20 >>> I think upper layers (or application) have (business) information to = indicate whether delaying ACKs should be employed. >>> After googling I found there's a draft [1]. >>>=20 >>> [1] Sender Control of Delayed Acknowledgments in TCP: = https://www.ietf.org/archive/id/draft-gomez-tcpm-delack-suppr-reqs-01.xml >>=20 >>=20 >> Found the html / pdf / txt version of the draft RFC. >> https://datatracker.ietf.org/doc/draft-gomez-tcpm-ack-pull/ > Can you specify the problem you are facing or trying to solve? For me, no problems currently. > I think upper layers (or application) have (business) information to = indicate whether delaying ACKs should be employed. That is from my experience in software developing. In typical layered = architectures, Callers have more information than callee. To be flexible generally callee should not presume too much but instead = should have options to support (what callers intend). It is a little off-topic. For "Too aggressive TCP ACKs" if delaying ACK = every third or more full segments, it has known issue "Stretch ACK violation". See section 2.13 from RFC 2525. >=20 > Best regards > Michael >>=20 >>>=20 >>>>=20 >>>> --HPS >>>>=20 >>>>=20 >>>=20 >>> Best regards, >>> Zhenlei Best regards, Zhenlei --Apple-Mail=_14863C5B-763C-4E1F-9ED6-5D1E38BD0372 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Nov 10, 2022, at 5:28 PM, tuexen@freebsd.org = wrote:

On = 10. Nov 2022, at 08:07, Zhenlei Huang <zlei.huang@gmail.com> wrote:

On Nov 9, 2022, at 11:18 = AM, Zhenlei Huang <zlei.huang@gmail.com> wrote:


On Oct = 22, 2022, at 6:14 PM, Hans Petter Selasky <hps@selasky.org> = wrote:

Hi,

Some = thoughts about this topic.

Sorry= for late response.


Delaying ACKs means loss of performance when = using Gigabit TCP connections in data centers. There it is important to = ACK the data as quick as possible, to avoid running out of TCP window = space. Thinking about TCP connections at 30 GBit/s and above!

In data centers, the bandwidth is = much more and the latency is extremely low (compared to WAN), = sub-milliseconds .
The TCP window space is bandwidth = multiply RTT. For a 30 GBit/s network it is about 750KiB . I think that = is trivial for a
datacenter server.

4.2.3.2 in RFC 1122 states:
in a stream of full-sized segments there SHOULD = be an ACK for at least every second segment 
Even if the ACK every tenth segment, the impact = of delayed ACKs on TCP window is not significant ( at most
ten segments not ACKed in TCP send window ).

Anyway, for datacenter usage the bandwidth is symmetric and = the reverse path ( TX path of receiver ) is sufficient.
Servers can even ACK every segment (no delaying ACK).


I think the implementation should be exactly like it is.

There is a software LRO in FreeBSD to coalesce = the ACKs before they hit the network stack, so there are no real = problems there.

I'm OK with = the current implementation.

I think upper = layers (or application) have (business) information to indicate whether = delaying ACKs should be employed.
After googling I found = there's a draft [1].

[1] Sender Control of = Delayed Acknowledgments in TCP: https://www.ietf.org/archive/id/draft-gomez-tcpm-delack-suppr-r= eqs-01.xml


Found the html / pdf / txt version of the draft RFC.
https://datatracker.ietf.org/doc/draft-gomez-tcpm-ack-pull/=
Can you specify the problem you are facing or trying to = solve?

For = me, no problems currently.

> I = think upper layers (or application) have (business) information to = indicate whether delaying ACKs should be employed.

That is from my experience in software developing. = In typical layered architectures, Callers have more information than = callee.
To be flexible generally callee should = not presume too much but instead should have options to support = (what callers intend).

It is a = little off-topic. For "Too aggressive TCP ACKs" if delaying ACK every = third or more full segments, it has known issue
"Stretch ACK = violation". See section 2.13 from RFC 2525.



Best regards
Michael



--HPS



Best regards,
Zhenlei

Best regards,
Zhenlei

= --Apple-Mail=_14863C5B-763C-4E1F-9ED6-5D1E38BD0372--