Re: [core] Typical TCP segment header size for CoAP over TCP

Achim Kraus <achimkraus@gmx.net> Sat, 21 January 2023 15:51 UTC

Return-Path: <achimkraus@gmx.net>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7FE68C14F744; Sat, 21 Jan 2023 07:51:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.798
X-Spam-Level:
X-Spam-Status: No, score=-2.798 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmx.net
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2M6HA_k4R34F; Sat, 21 Jan 2023 07:51:16 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8D683C14F727; Sat, 21 Jan 2023 07:51:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1674316262; bh=gTNPciGncU/s2ZhR2cI1SjHGuz+GSJqr3kmZln8omFk=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=GpbNaGEiNsgJ84DGHdpNJHPXwqJyx+3WvNnyLXojaEpjIxjHL7KSwoLD/KLJbtyat xfCVlLBVxle7G5pbbWEciezpHm/ftPTHS6nf2H+5vp6dG3ZBrngYZB/5imlfYfzCFM DwMgFSpBqNBb9bUe6oCEUq4tPxJSjuVXq8GA34K26du58eeYeK4IIF4Gj9d+j7oNGE BfD3WzwlvoATZH/XE3AkSbXy7guPh6ybCl/kYmsAr36qsplUe78bko86CaXpmxHHbd Qab85ZTj3XlH6pGcH6pgljsleMpjw1pb47J6bFmzzpFu8CZTPllWec4OvCZDtqVVDa C1c8PvuHGd/HA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.178.10] ([5.146.192.44]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MHGCu-1pWVgU0lIO-00DF4f; Sat, 21 Jan 2023 16:51:02 +0100
Message-ID: <6c7bec46-e24a-37b9-79e8-1adc911029e3@gmx.net>
Date: Sat, 21 Jan 2023 16:51:00 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2
Content-Language: de-AT-frami, en-US
To: Carsten Bormann <cabo@tzi.org>, John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>
Cc: "core@ietf.org" <core@ietf.org>
References: <HE1PR0701MB30508FA4A62D149371F80F5989CA9@HE1PR0701MB3050.eurprd07.prod.outlook.com> <9c5071e3-ef59-7280-92c1-eac44992c6d5@gmx.net> <7F4D6CA2-0AD2-4D39-9425-7A610C42FAB1@tzi.org>
From: Achim Kraus <achimkraus@gmx.net>
In-Reply-To: <7F4D6CA2-0AD2-4D39-9425-7A610C42FAB1@tzi.org>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: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RUy/WE7eO2HuD/UNpGcrphWcAT2hYzBvpczKaQu3KT3MKFEDPrIFLZfgmcUYUBKNYJ +hF+C6ZgFY/ka59K3a7iQsC67vS5Ig9q/epw/c2cSAxUr9L9JOrEOyQZ2duET4CLMarrWzsS5 o1P1QQ==
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/2lDQTmOO0Vt8DDjjilCKJtKQKrQ>
Subject: Re: [core] Typical TCP segment header size for CoAP over TCP
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Jan 2023 15:51:20 -0000

Hi Carsten,
Hi John,

proposing to add the udp/tcp headers was not done on order to have a
precise prediction of resulting traffic. It's done to have the DTLS
and TLS comparison more in balance. If DTLS requires 8 bytes more than
TLS, but TCP 12 bytes more than UDP, both variants are very close.
So that just doesn't make the difference.

If additional protocol messages are "injected" (e.g. TCP ACKs), then the
change of the number of bytes, is in my experience not that relevant.
Here it's more the number of resulting messages or flights.
For UDP some of that functions are also pushed to upper layers and would
then need to be considered there as well, e.g. CoAP ACKS for "CoAP
separate response". Never ending.

An next aspect would then be the additional messages for "connect".
TCP messages, (D)TLS handshakes and so on. That requires then a model,
how often that happens. Even more never ending.

My preference here would be to focus on the overhead of the application
data. And therefore that table is pretty well. Just add the udp/tcp
headers and it gets clear, that there is no big win nor loss.

My proposal for a "overall" statistic:
Better try to collect that data for that statistic with demos.

Here my contribution with CoAP/DTLS 1.2 CID:
https://github.com/boaks/zephyr-coaps-client

114-23:54:04 [d-hh:mm:ss], Thingy:91 v0.5.99, 0*2649, 1*109, 2*2, 3*0,
failures 1
3940 mV 66% battery (low-power)
Stat: tx 1384kB, rx 186kB, max 539B, avg 290B, searchs 176, PSM delays 0




best regards
Achim

Am 21.01.23 um 15:53 schrieb Carsten Bormann:
> On 2023-01-21, at 15:44, Achim Kraus <achimkraus@gmx.net> wrote:
>>
>> So 20 bytes.
>
> RFC 9006 notes that some TCP options (SACK, Timestamps) may not bring their full benefit to constrained environments, but may still be useful.
>
> E.g. [1]:
>
>     If a device with less severe memory and processing constraints can
>     afford advertising a TCP window size of several MSSs, it makes sense
>     to support the SACK option to improve performance.
>
>
> So the question really is which TCP options are in wide use in constrained environments.
>
> 20 bytes of course is the baseline value (for data packets; I’d expect MSS [2] to be in most SYN packets of implementations that consider IPv4).
>
> Grüße, Carsten
>
> [1]: https://www.rfc-editor.org/rfc/rfc9006#name-selective-acknowledgments-s
> [2]: https://www.rfc-editor.org/rfc/rfc9006#name-maximum-segment-size-mss