From owner-freebsd-net Mon Aug 19 15:41:47 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C681237B400 for ; Mon, 19 Aug 2002 15:41:42 -0700 (PDT) Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5568E43E42 for ; Mon, 19 Aug 2002 15:41:42 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: from iguana.icir.org (localhost [127.0.0.1]) by iguana.icir.org (8.12.3/8.11.3) with ESMTP id g7JMfgIb041112; Mon, 19 Aug 2002 15:41:42 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: (from rizzo@localhost) by iguana.icir.org (8.12.3/8.12.3/Submit) id g7JMfgS6041111; Mon, 19 Aug 2002 15:41:42 -0700 (PDT) (envelope-from rizzo) Date: Mon, 19 Aug 2002 15:41:42 -0700 From: Luigi Rizzo To: Carlos Carnero Cc: freebsd-net@FreeBSD.ORG Subject: Re: Bandwidth throttling with dummynet(4) Message-ID: <20020819154141.A41050@iguana.icir.org> References: <20020819203323.25886.qmail@web21411.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020819203323.25886.qmail@web21411.mail.yahoo.com>; from zopewiz@yahoo.com on Mon, Aug 19, 2002 at 01:33:23PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org dummynet pipes use timers heavily, and i suspect that the timer granularity in vmware might not be as good as you would want, resulting in a throughput which is a fraction of what you have configured in the pipes. Also, 5Kbytes/s is a very low bandwidth, which coupled with 50 queue slots (~75Kbytes with large packets) will result in very large RTTs which could in turn trigger useless retransmissions and timeouts. I would first check if timing is accurate by setting a delay-only pipe and seeing if ping times correspond to what you have configured. Secondly, i would reduce the queue size to something reasonable e.g. 10Kbytes to avoid the potentially huge RTTs. cheers luigi On Mon, Aug 19, 2002 at 01:33:23PM -0700, Carlos Carnero wrote: > Hi, > > I have a "lab" here where I'm testing (and learning) > traffic shaping with dummynet(4). I have a Windows XP > host computer and a couple of VMware virtual > computers: one running FreeBSD 4.5-RELEASE-p18, with > two virtual Ethernet adapters and other running NetBSD > 1.5.2 with one adapter. My FreeBSD "box" is the > router/gateway for the NetBSD box, providing > firewalling and NAT. Pretty much a standard setup, and > it works OK (you should see the double NATting ;) > > Anyway, I have compiled into the kernel both IP Filter > and FreeBSD's own ipfw, with the purpose of traffic > shaping/bandwidth throttling. But the numbers I get > are not what I expect. For instance, my ipfw rules are > like: > > pipe 1000 config bw 5KByte/s queue 50 > pipe 1001 config bw 5KByte/s queue 50 > > add 50000 pipe 1000 tcp from 192.168.250.3/32 to any > add 50001 pipe 1001 tcp from any to 192.168.250.3/32 > > (192.168.250.3 being the NetBSD "box") But when I > transfer a file using FTP from the Windows host I get > _almost_ 1 KByte. Note that I remove the pipes speeds > reach ~800-900 KByte/s, almost saturating the > "virtual" Ethernet interfaces. Changing the pipe > bandwidth to, say 25KByte/s in both pipes yield an FTP > speed of ~5-6 KByte/s. Is this OK or FTP is that > inefficient? What other tests can I run to check the > bandwidth _not_ using FTP? > > IP Filter's ruleset is currently set to pass > everything as quickly as it can :) > > Thanks a lot, > Carlos. > > PS. Posting from Yahoo! until I solve some reverse DNS > bugs I inherited :| > > __________________________________________________ > Do You Yahoo!? > HotJobs - Search Thousands of New Jobs > http://www.hotjobs.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message