Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2004 14:05:08 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        "Fisch, Matthew" <mfisch@kaz.com>
Cc:        questions@freebsd.org
Subject:   Re: TCP Inflight Debug
Message-ID:  <20041117200508.GE3342@dan.emsphone.com>
In-Reply-To: <B2031B1FF0FEAF48B557C4CC7E20B7841885FB@pluto.corp.kaz.com>
References:  <B2031B1FF0FEAF48B557C4CC7E20B7841885FB@pluto.corp.kaz.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 16), Fisch, Matthew said:
> Im trying to debug slow tcp transfers on a 100mbit link with a large
> variable bandwidth delay product. Can someone describe the meaning of
> the inflight debugging output?
>  
> net.inet.tcp.inflight_debug: 1
>  
> 0xca2702e0 bw 885887956 rttbest 10 srtt 7 bwnd 2217615
> 0xc8394170 bw 840998588 rttbest 10 srtt 7 bwnd 2105392
> 0xc836ab80 bw 842026536 rttbest 10 srtt 7 bwnd 2107962
> 0xca270a10 bw 232052 rttbest 84 srtt 109 bwnd 9657
> 0xc87fb450 bw 902405694 rttbest 10 srtt 7 bwnd 2258910
> 0xc8394170 bw 880116973 rttbest 10 srtt 11 bwnd 2753261
> 0xca270a10 bw 300922 rttbest 84 srtt 163 bwnd 14262
> 0xca270000 bw 988204579 rttbest 12 srtt 11 bwnd 3399849
> 0xca270a10 bw 170910 rttbest 84 srtt 145 bwnd 8784
> 0xca270a10 bw 202413 rttbest 84 srtt 193 bwnd 11425
> 0xc8394a10 bw 983212216 rttbest 10 srtt 7 bwnd 2460926
> 0xca270a10 bw 179225 rttbest 84 srtt 127 bwnd 8576
> 0xca270a10 bw 150860 rttbest 84 srtt 132 bwnd 7787
> 0xc87fb2e0 bw 917529420 rttbest 11 srtt 11 bwnd 3156903
> 0xca270cf0 bw 969682982 rttbest 13 srtt 11 bwnd 3639207

The first number is the socket address (match it up with netstat -a).
bw is the estimated bandwidth of the link; those large values are
probably from localhost sockets, so you can ignore them.  Printing the
destination IP address here would probably be useful.  rttbest is the
lowest round-trip time seen, srtt is an average of recent rtt values,
and bwnd is the window size the inflight code wants to use (which may
be capped by other settings).

The 0xca270a10 socket, for example, looks like it's doing around
175KB/sec to a host with an 84ms ideal ping time (although the current
average is 150ms), and the inflight code is limiting the window to
between 8 and 16KB.

There are lots of comments in tcp_subr.c explaining the inflight code.
The idea is to limit the window to prevent too many packets from
getting buffered/dropped at intermediate routers.  Graphing the window
size on both ends of the link (with ethereal or tcptrace) may help
also.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041117200508.GE3342>