From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 11 04:03:02 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 DD24616A4CE for ; Fri, 11 Mar 2005 04:03:02 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74BC743D48 for ; Fri, 11 Mar 2005 04:03:02 +0000 (GMT) (envelope-from jingmin.song@gmail.com) Received: by wproxy.gmail.com with SMTP id 70so829708wra for ; Thu, 10 Mar 2005 20:03:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=IxAGyUG3b28Ey9rBdupBtGJhgTICo64NMFGD5WB8YKeBYq0G1CDnEHMhWnq6quDvE/seN010kX5iYpV3iyCBQm6m9gqaOteoP55hbcTCOFTdrJcmqbDCGaq9egMstrS8GbhhMJbflsjQ5voE3cTg2/b7Xb6DzYNLWWVM+OmVq4E= Received: by 10.54.36.37 with SMTP id j37mr2248141wrj; Thu, 10 Mar 2005 20:03:01 -0800 (PST) Received: by 10.54.15.8 with HTTP; Thu, 10 Mar 2005 20:03:01 -0800 (PST) Message-ID: Date: Fri, 11 Mar 2005 12:03:01 +0800 From: jim song To: freebsd-ipfw@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: why my dummynet queue not work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jim song List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 04:03:03 -0000 Hi, I encounter a problem when using dummynet to test tcp throughputs. I used a freebsd box running dummynet as an router. And all my testing machines are attached to giga switch. On the router, I use dummynet to emulate a long-fat network which has high bandwidth but long delays. The setting is as attached. I have modified related configuration and source files and reinstall the kernel. The problem is that the tcp throughput through this router could not 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 bandwidth limitation. Could somebody tell me why? Thanks, --Jim -------------------------------------------------- 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 # 1. compiling Kernel Options # options IPFIREWALL # options IPFIREWALL_DEFAULT_TO_ACCEPT # options DUMMYNET # options HZ=1000 # options NMBCLUSTERS=131072 # options DEVICE_POLLING # 2. Add the following lines into /etc/sysctl.conf # kern.polling.enable=1 # kern.polling.user_frac=5 # kern.polling.burst_max=400 # kern.polling.each_burst=15 # net.inet.ip.intr_queue_maxlen=3000 # 3. Modify source code of ipfw and dummynet to support larger queue size # 4. Increase NIC buffer by setting EM_MAX_RXD to 4096 in /usr/src/sys/dev/em/if_em.h --------------------------------------------------------------------