From nobody Wed Nov 9 03:18:21 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 4N6VY130Ppz4YYsK for ; Wed, 9 Nov 2022 03:18:29 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (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 4N6VY02cwFz4Cj7 for ; Wed, 9 Nov 2022 03:18:28 +0000 (UTC) (envelope-from zlei.huang@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=YxQ2xL+7; spf=pass (mx1.freebsd.org: domain of zlei.huang@gmail.com designates 2607:f8b0:4864:20::431 as permitted sender) smtp.mailfrom=zlei.huang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pf1-x431.google.com with SMTP id k15so15525600pfg.2 for ; Tue, 08 Nov 2022 19:18:28 -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=VhFtKFOjBi1zaeTyQ44LS6pdfOBshzkbq55EZgxKTAk=; b=YxQ2xL+7/ZlfkugrtUmRZhVO/ZJm20WZeu4tALsQ/M1qzTieBKrbelx/dxAs3dk2I7 /J2QmV39/jduVl1Ha39HhnqAS1wOMtVG6AouAp3yb+Ob9i2CY3VJ9AwjOeRr/Jezv0TU HSQzb9FCaIUYDTSSuo4o5mHgSz8jxZhghWZkN6s/wxzhmoHrPnUSUkBUUmmHUqpnsEdA 9bXfsQulyvecUJytNDMHPfC7mEDpX7TXkeKeM7Ob+qolXoX/7k08sBQE8HQSZDM4pDOM ctPGtVCHL/600Mb/3JBUpE6e0uXM0GsR5mQLKtPskQS+oij09SVgLe6YlgBG07xU1zdS 1MJA== 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=VhFtKFOjBi1zaeTyQ44LS6pdfOBshzkbq55EZgxKTAk=; b=mmhg0hPb6UD3oi08lZp0xwoNuU8MstEQ/LtD+f8Q/4lEaz6rIuLr9F5cYg0/Fzw2iT jQTybDSbgJyTNiAPEkatoI2qYKk3eZOwtgNgS/6H965wfIMnhRbW7d2i7Imcg8nBSYft ymLixbj/BsWWrs9byqGIU3JUA8dpAwAIiMKpwYnz9CSP2ExjvhldnhTH9MSSDnXjxMM9 YYDmeanYKk/eIhPwokIqng8lB25J8RTGae1eJcMkOnTuL+UqvqcKEJ7qBj1KRrFiMGg4 QoIK9oDEwH7srAmKVbOe6jgsSsqVS8I0Rb9b5eVNdVPcnfGjFPt8BLoRt4pM5cQJMFFn uqkw== X-Gm-Message-State: ACrzQf2CbqUebCxctTuhvb0USt5d5o+tnDt1Q+pmX3H/lhMNKF4hl70a BD4R0hEQ5Zbqr5jF/fpZtQAuSwB5nqcNNA== X-Google-Smtp-Source: AMsMyM4M+Eu+U8q+lmSMzDKC08HP9QRyB8REXtD91UImHR2ZcUhuVffvGA6NF4nXW23isaiwJdRHfg== X-Received: by 2002:a63:6cc2:0:b0:46f:cec6:c9b2 with SMTP id h185-20020a636cc2000000b0046fcec6c9b2mr40541224pgc.167.1667963907025; Tue, 08 Nov 2022 19:18:27 -0800 (PST) Received: from [172.17.252.129] (ns1.oxydns.net. [45.32.91.63]) by smtp.gmail.com with ESMTPSA id b16-20020a170902d51000b0017a0f40fa19sm7710849plg.191.2022.11.08.19.18.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2022 19:18:26 -0800 (PST) From: Zhenlei Huang Message-Id: <5A501643-1E81-4A8C-8DDC-094371DC03D7@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_E9272696-4607-444D-8AB0-78AE1A156DF7" 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: Wed, 9 Nov 2022 11:18:21 +0800 In-Reply-To: <1ed66217-5463-fd4d-7e7a-58d9981bc44c@selasky.org> 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> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; 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::431: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: 4N6VY02cwFz4Cj7 X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_E9272696-4607-444D-8AB0-78AE1A156DF7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Oct 22, 2022, at 6:14 PM, Hans Petter Selasky = wrote: >=20 > Hi, >=20 > Some thoughts about this topic. Sorry for late response. >=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! 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=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 ). 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 > 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. 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-reqs-01.xml >=20 > --HPS >=20 >=20 Best regards, Zhenlei= --Apple-Mail=_E9272696-4607-444D-8AB0-78AE1A156DF7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
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


--HPS



Best regards,
Zhenlei
= --Apple-Mail=_E9272696-4607-444D-8AB0-78AE1A156DF7--