From nobody Thu Nov 10 08:07:08 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 4N7Dvq6Rxqz4V3m3 for ; Thu, 10 Nov 2022 08:07:19 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 4N7Dvl3QmXz3JSR for ; Thu, 10 Nov 2022 08:07:15 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=G+menxZW; spf=pass (mx1.freebsd.org: domain of zlei.huang@gmail.com designates 2607:f8b0:4864:20::429 as permitted sender) smtp.mailfrom=zlei.huang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pf1-x429.google.com with SMTP id v28so1227354pfi.12 for ; Thu, 10 Nov 2022 00:07:15 -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=zvMWvq4eW2XWlh3qBhiFRJV4rqZWv1ACvFi141yEMz8=; b=G+menxZWwkG0MNwG6ku1wBGL7VH8Wphagrynaba2BWNff0ROqN0v523wFt3hw+zxEn Nh8DzItc2w/feNHub6p6MVg/F+s61eAuKUrRjaUhW1XKAzIBr9s+mw/VrFTCFLdi0ecb LXY8Gurc6DzFbz/FZSuozvrgcz9x9ZOuAXk50kiFg9T1pZ2hFldjyM9aGr2kH0FF91ED iq9Y+4G0LapJSTLdbjxMNXq7q/AzkYEh5ItwUumog7wRkh63H1J4HovhtFsL34PwvQLX f4akB6BRwu21LTtb1CAAvJ6RbXULjMXZKyEO3LSMopiNqpzSJSlPz+SUnT45fGBvK5cY GdqQ== 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=zvMWvq4eW2XWlh3qBhiFRJV4rqZWv1ACvFi141yEMz8=; b=JxTT1qMNVZI4SkcOeeg9QrKK7zquk6F5aMYb9u9C8oQrWTo+xg0nr7r0K48STWmLuZ NhRKg4poLxL4QiMu/kAMh7fOsHRVkcNpkl77oV+15DUq2kI+kNOPICekM1MkKQ5sisRY MJFdJ9Xg4NfugQME6i315YUHRpNsG3HI+TYKKhnEzCj+YEuujWFx4NJc/XSX3LBaKuzh MeGdgTbUXkLhIzleY9J7yTLkAmp78PMNau1z7BJfYDLX7k7sfTv3Avbi6Ghs+mqgarBq +T5iCJ+q1OjTsIVbELd6wdkRcovs6F8KOccoGkndgiVGjANLJ4zHYe0RZmKfJAcNOIad xl9g== X-Gm-Message-State: ACrzQf1+yPBGGvJnV3hQNtF5cFE0+gigBAU9Dby+CTP104kWNtp3Z9Wn evg6pkEENsK1zMqBqyIxRna9vkWVPDjrqw== X-Google-Smtp-Source: AMsMyM7nwjMGnntlrFWqq9b0IexivU5dxrha6pAxXgCWYKGCOEyUCD/RtZpiLpU2J8ypodACJUbkOg== X-Received: by 2002:a63:eb04:0:b0:46f:5be0:feb9 with SMTP id t4-20020a63eb04000000b0046f5be0feb9mr1981000pgh.485.1668067634094; Thu, 10 Nov 2022 00:07:14 -0800 (PST) Received: from [172.17.252.129] (ns1.oxydns.net. [45.32.91.63]) by smtp.gmail.com with ESMTPSA id u10-20020a170902e5ca00b0017f64ab80e5sm10530214plf.179.2022.11.10.00.07.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Nov 2022 00:07:13 -0800 (PST) From: Zhenlei Huang Message-Id: <7EDD65B7-5FCD-42E1-A9E8-AA5139B0A81E@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_F4D23FB3-B3A1-4605-A3C4-410D8B3EDD26" 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: Thu, 10 Nov 2022 16:07:08 +0800 In-Reply-To: <5A501643-1E81-4A8C-8DDC-094371DC03D7@gmail.com> Cc: Michael Tuexen , freebsd-net@freebsd.org To: Hans Petter Selasky 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> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; URI_COUNT_ODD(1.00)[9]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::429:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; TAGGED_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org] X-Rspamd-Queue-Id: 4N7Dvl3QmXz3JSR X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_F4D23FB3-B3A1-4605-A3C4-410D8B3EDD26 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > 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 = Found the html / pdf / txt version of the draft RFC. https://datatracker.ietf.org/doc/draft-gomez-tcpm-ack-pull/ >=20 >>=20 >> --HPS >>=20 >>=20 >=20 > Best regards, > Zhenlei --Apple-Mail=_F4D23FB3-B3A1-4605-A3C4-410D8B3EDD26 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
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.



--HPS



Best = regards,
Zhenlei

= --Apple-Mail=_F4D23FB3-B3A1-4605-A3C4-410D8B3EDD26--