Index | Thread | Search

From:
Steffen Nurpmeso <steffen@sdaoden.eu>
Subject:
Re: Add sysctl to disable Nagle's algorithm (RFC 896 - Congestion Control)
To:
Job Snijders <job@sobornost.net>
Cc:
Alexander Bluhm <bluhm@openbsd.org>, Job Snijders <job@openbsd.org>, Otto Moerbeek <otto@drijf.net>, tech@openbsd.org
Date:
Wed, 15 May 2024 01:00:52 +0200

Download raw body.

Thread
Now that made me look...

Job Snijders wrote in
 <CACWOCC90kXY4Ergx_T2rQ99PoX3O00AfJBVMfM9J=edAeJm77Q@mail.gmail.com>:
 |On Wed, 15 May 2024 at 00:28, Steffen Nurpmeso <steffen@sdaoden.eu> wrote:
 |> Theo de Raadt wrote in
 |>  <19825.1715720446@cvs.openbsd.org>:
 |>|Stuart Henderson <stu@spacehopper.org> wrote:
 |>|
 |>|> On 2024/05/14 21:29, Otto Moerbeek wrote:
 |>|>> My worry is that disabling Nagla always will affect apps that are not
 |>|>> interactive but write quite a lot of data in relatively small chunks
 |>|>> into the socket, expecting the kernel to do the buffering and create
 |>|>> large packets.
 |>|>
 |>|> Linux has a specific TCP_CORK for those cases too..
 |>|
 |>|Awesome.  More #ifdef code.  No thanks...
 |>
 |> i thought that is a Linux alias for tcp_nopush.
 |
 |No

You know i had in my code

  tcp_nodelay    =  9,           //S, boolean
  tcp_nopush     = 10,           //S, boolean
  tcp_cork       = tcp_nopush,   // alias (Linux)

and FreeBSD as of now uses it that very way

  linux_to_bsd_tcp_sockopt()
  ...
        case LINUX_TCP_CORK:
                return (TCP_NOPUSH);

But Linux comments it like

  /usr/include/linux/tcp.h:#define TCP_CORK               3       /* Never send partially complete segments */

whereas FreeBSD says

  origin/main:sys/netinet/tcp.h:#define TCP_NOPUSH        4       /* don't push last block of write */

Well for a superficial high-protocol-level user space guy that
sounds pretty nearby each other, at least.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)