From owner-freebsd-net@FreeBSD.ORG Tue Aug 21 09:14:25 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A2F116A41B for ; Tue, 21 Aug 2007 09:14:25 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.174]) by mx1.freebsd.org (Postfix) with ESMTP id 2734613C494 for ; Tue, 21 Aug 2007 09:14:25 +0000 (UTC) (envelope-from max@love2party.net) Received: from dslb-088-066-022-164.pools.arcor-ip.net [88.66.22.164] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis), id 0ML31I-1INPoU0Qqh-0001gC; Tue, 21 Aug 2007 11:14:21 +0200 From: Max Laier Organization: FreeBSD To: freebsd-net@freebsd.org Date: Tue, 21 Aug 2007 11:14:03 +0200 User-Agent: KMail/1.9.7 References: <20070820210858.326AE4506A@ptavv.es.net> In-Reply-To: <20070820210858.326AE4506A@ptavv.es.net> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2077998.fyJQ7MpuTd"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200708211114.09938.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+SbQop6jnE8Tf2cN/yab0A4Kw5RBCcQ4w2sgh q0vm2+BKaR4uyxjdTKH1D4L+ffkXNdBH8yBxDi15Mxe8V7M319 SMDy871zuJfW3TQpFC1IksAMicqWYXxtPyhnhxuwPg= Cc: andre@networx.ch, andre@freebsd.org, Kevin Oberman Subject: Re: Unable to set socket size > 16MB X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 09:14:25 -0000 --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 8,sackOK,timestamp 345761341 0> 13:57:45.665645 IP > perf-bnl.commplex-link > lbl.52460: S 3909263475:3909263475(0) ack > 4070670679 win 65535 3623078172 345761341> 13:57:45.665683 IP lbl.52460 > > perf-bnl.commplex-link: . ack 1 win 65535 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--