You might also be interested in reviewing my fix for TCP buffer scaling too Michael.
https://reviews.freebsd.org/D9668

This fixes slow transfers due to no receive buffer scaling if TCP timestamps aren't negotiated.

Its still got debug stuff in it ATM and I'm toying with removing the different cases between estimated RTT and timestamps as there appears to be no difference in practice.

Tests here show jump from ~3MB/s @ 1Gbps and 17ms latency to 100MB/s, pretty much line rate, which is in line with Linux results.

Any feedback welcome.

    Regards
    Steve

On 23/02/2017 18:14, Michael Tuexen wrote:
Author: tuexen
Date: Thu Feb 23 18:14:36 2017
New Revision: 314155
URL: https://svnweb.freebsd.org/changeset/base/314155

Log:
   TCP window updates are only sent if the window can be increased by at
   least 2 * MSS. However, if the receive buffer size is small, this might
   be impossible. Add back a criterion to send a TCP window update if
   the window can be increased by at least half of the receive buffer size.
   This condition was removed in r242252. This patch simply brings it back.
   PR:                  211003
   Reviewed by:         gnn
   MFC after:           1 week
   Sponsored by:                Netflix, Inc.
   Differential Revision:       https://reviews.freebsd.org/D9475

Modified:
   head/sys/netinet/tcp_output.c

Modified: head/sys/netinet/tcp_output.c
==============================================================================
--- head/sys/netinet/tcp_output.c       Thu Feb 23 17:56:24 2017        
(r314154)
+++ head/sys/netinet/tcp_output.c       Thu Feb 23 18:14:36 2017        
(r314155)
@@ -696,6 +696,8 @@ after_sack_rexmit:
                     recwin <= (so->so_rcv.sb_hiwat / 8) ||
                     so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg))
                        goto send;
+               if (2 * adv >= (int32_t)so->so_rcv.sb_hiwat)
+                       goto send;
        }
  dontupdate:

_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to