On Mon, Feb 08, 2021 at 03:42:54PM +0100, Alexander Bluhm wrote: > On Wed, Feb 03, 2021 at 11:20:04AM +0100, Claudio Jeker wrote: > > Just commit it. OK claudio@ > > If people see problems we can back it out again. > > This has huge impact on TCP performance. > > http://bluhm.genua.de/perform/results/2021-02-07T00%3A01%3A40Z/perform.html > > For a single TCP connection between to OpenBSD boxes, througput > drops by 77% from 3.1 GBit/sec to 710 MBit/sec. But with 100 > parallel connections the througput over all increases by 5%.
For single connections our kernel is limited to send out 4 max TCP segments. I don't see that, because I just measured with 10 and 30 streams in parallel. FreeBSD disabled it 20 yeas ago. https://github.com/freebsd/freebsd-src/commit/d912c694ee00de5ea0f46743295a0fc603cab562 I would suggest to remove the whole feature. bye, Jan Index: tcp.h =================================================================== RCS file: /cvs/src/sys/netinet/tcp.h,v retrieving revision 1.21 diff -u -p -r1.21 tcp.h --- tcp.h 10 Jul 2019 18:45:31 -0000 1.21 +++ tcp.h 8 Feb 2021 17:52:38 -0000 @@ -105,8 +105,6 @@ struct tcphdr { #define TCP_MAX_SACK 3 /* Max # SACKs sent in any segment */ #define TCP_SACKHOLE_LIMIT 128 /* Max # SACK holes per connection */ -#define TCP_MAXBURST 4 /* Max # packets after leaving Fast Rxmit */ - /* * Default maximum segment size for TCP. * With an IP MSS of 576, this is 536, Index: tcp_output.c =================================================================== RCS file: /cvs/src/sys/netinet/tcp_output.c,v retrieving revision 1.129 diff -u -p -r1.129 tcp_output.c --- tcp_output.c 25 Jan 2021 03:40:46 -0000 1.129 +++ tcp_output.c 8 Feb 2021 17:53:07 -0000 @@ -203,7 +203,6 @@ tcp_output(struct tcpcb *tp) int idle, sendalot = 0; int i, sack_rxmit = 0; struct sackhole *p; - int maxburst = TCP_MAXBURST; #ifdef TCP_SIGNATURE unsigned int sigoff; #endif /* TCP_SIGNATURE */ @@ -1120,7 +1119,7 @@ out: tp->last_ack_sent = tp->rcv_nxt; tp->t_flags &= ~TF_ACKNOW; TCP_TIMER_DISARM(tp, TCPT_DELACK); - if (sendalot && --maxburst) + if (sendalot) goto again; return (0); }