Date: Tue, 21 Aug 2007 11:14:03 +0200 From: Max Laier <max@love2party.net> To: freebsd-net@freebsd.org Cc: andre@networx.ch, andre@freebsd.org, Kevin Oberman <oberman@es.net> Subject: Re: Unable to set socket size > 16MB Message-ID: <200708211114.09938.max@love2party.net> In-Reply-To: <20070820210858.326AE4506A@ptavv.es.net> References: <20070820210858.326AE4506A@ptavv.es.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2077998.fyJQ7MpuTd Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 20 August 2007, Kevin Oberman wrote: > I am trying to tune a FreeBSD system for ~100 ms. RTT at 10 Gbps. (I > posted another message about this back on 8/17). I am running current > of late July 31. > > I am using iperf and I have confirmed (with gdb) that it is passing > setsockopt a size of 67108864 and setsockopt is returning 0. When I > capture the SYN packets, I am seeing a window of 64K and a scale > factor of 8. For 64 MB, the scale factor should be 10. > > Is there some hidden limitation that would restrict this or is there a > bug involved? I have set net.inet.tcp.(send|recv)space to > 64m. kern.ipc.maxsockbuf=3D134217728. > > Here is the 3-way handshake: > 13:57:45.571614 IP lbl.52460 > perf-bnl.commplex-link: S > 4070670678:4070670678(0) win 65535 <mss 8960,nop,wscale > 8,sackOK,timestamp 345761341 0> 13:57:45.665645 IP > perf-bnl.commplex-link > lbl.52460: S 3909263475:3909263475(0) ack > 4070670679 win 65535 <mss 8960,nop,wscale 8,nop,nop,timestamp > 3623078172 345761341> 13:57:45.665683 IP lbl.52460 > > perf-bnl.commplex-link: . ack 1 win 65535 <nop,nop,timestamp 345761435 > 3623078172> > > Any reason for this? Any workaround or fix? Or am I missing something? =20 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/tcp_syncache.c#rev1.1= 04=20 seems to be the culprit: while (wscale < TCP_MAX_WINSHIFT && (0x1 << wscale) < tcp_minmss) /* 216 */ wscale++; It's obvious that the above will bound wscale to 8 with the default of 216= =20 for minmss. You should be able to set a higher minmss for a temporary=20 work around, but this calculation really seems wrong to me. Esp. given=20 the following comment for tcp_minmss: ... * with packet generation and sending. Set to zero to disable MINMSS * checking. This setting prevents us from sending too small packets. */ =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart2077998.fyJQ7MpuTd Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBGyqzhXyyEoT62BG0RAt0QAJ49D/Bp4kexw5zN0RaLl3UQEkLKkACeK9qJ 8Hv3z5udS7kzhNhL/HMjSzQ= =Iz8f -----END PGP SIGNATURE----- --nextPart2077998.fyJQ7MpuTd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708211114.09938.max>