Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2015 11:04:33 -0800
From:      javocado <javocado@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Tuning net.inet.tcp.sendbuf_max
Message-ID:  <CAP1HOmRbOX7RGp-WZBhFZ7P4Os791c3W4oaj2hr6iQQUH%2BYfTA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
System: FreeBSD 8.3 amd64

I've been trying to tune my system to a long route (RTT 180ms) and I've
made 2 modifications and seeing some results which I cannot explain or
understand.

1. kern.ipc.maxsockbuf: 262144 -> 4194304

Speed improves from 85 Mbps -> 100 Mbps

I can run the test: iperf -c tserv20.hkg1.ipv6.he.net -t10 -P 10

all day long and consistently get 100Mbps


2. net.inet.tcp.sendbuf_max: 262144 -> 524288

1st run: 156Mbps

BUT, on subsequent runs, just moment later, I see the speed drop off
quickly with each successive run:

73 ... 50Mbps


Simply returning sendbuf_max to the original value of 262144 does not
return me to 100Mbps. Why is this?
Setting net.inet.tcp.sendbuf_max, net.inet.tcp.recvbuf_max
and kern.ipc.maxsockbuf to 4194304 also makes no difference.

I noticed that the speed returned to 100Mbps when I set it back to 262144
and re-ran the test ~12hrs later. Is there some kind of buffer that needs
to be cleared (or clears with enough time) so these changes have immediate
effect when returning these sysctls to original values?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP1HOmRbOX7RGp-WZBhFZ7P4Os791c3W4oaj2hr6iQQUH%2BYfTA>