From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 04:39:36 2005 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC74B16A4CE for ; Fri, 11 Mar 2005 04:39:35 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E5C143D2D for ; Fri, 11 Mar 2005 04:39:34 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j2B4dYdm030590; Thu, 10 Mar 2005 20:39:34 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j2B4dYWP030589; Thu, 10 Mar 2005 20:39:34 -0800 Date: Thu, 10 Mar 2005 20:39:33 -0800 From: Brooks Davis To: jim song Message-ID: <20050311043933.GA28686@odin.ac.hmc.edu> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-ipfw@freebsd.org Subject: Re: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 04:39:36 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 11, 2005 at 12:03:01PM +0800, jim song wrote: > Hi,=20 > I encounter a problem when using dummynet to test tcp throughputs. >=20 > I used a freebsd box running dummynet as an router. And all my testing > machines are attached to giga switch. >=20 > On the router, I use dummynet to emulate a long-fat network which has=20 > high bandwidth but long delays. The setting is as attached. I have modifi= ed > related configuration and source files and reinstall the kernel. >=20 > The problem is that the tcp throughput through this router could not=20 > reach reasonable value. I can only get 5Mbps throughputs. (I have set the= tcp > window to 5MBytes already). It seems like that the queue parameter > doesnot work. Because if it works, the throughputs will go up to the=20 > bandwidth limitation. Why are you using the queue parameter at all? If you just want to emulate a pipe there is usually no need to do that. Have you adjusted your socket buffers in addition to your max TCP window size? -- Brooks > Could somebody tell me why? >=20 > Thanks, > --Jim >=20 >=20 >=20 > -------------------------------------------------- > ipfw -f -q flush > ipfw -f -q pipe flush > ipfw add pipe 1 ip from any to any in recv em0 > ipfw add pipe 2 ip from any to any out xmit em0 > ipfw pipe 1 config bw 200Mbit/s delay 25ms queue 1000 > ipfw pipe 2 config bw 200Mbit/s delay 25ms queue 1000 >=20 > # 1. compiling Kernel Options > # options IPFIREWALL > # options IPFIREWALL_DEFAULT_TO_ACCEPT > # options DUMMYNET > # options HZ=3D1000 > # options NMBCLUSTERS=3D131072 > # options DEVICE_POLLING >=20 > # 2. Add the following lines into /etc/sysctl.conf > # kern.polling.enable=3D1 > # kern.polling.user_frac=3D5 > # kern.polling.burst_max=3D400 > # kern.polling.each_burst=3D15 > # net.inet.ip.intr_queue_maxlen=3D3000 >=20 > # 3. Modify source code of ipfw and dummynet to support larger queue size >=20 > # 4. Increase NIC buffer by setting EM_MAX_RXD to 4096 in > /usr/src/sys/dev/em/if_em.h >=20 > -------------------------------------------------------------------- > _______________________________________________ > freebsd-ipfw@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw > To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCMSEFXY6L6fI4GtQRAjBQAJ4rXKZqzNH59uNEyAOCns//crx0NACg0jrz kGEUzzaVKQx3K6DlAcTsEb4= =/lNG -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--