From owner-freebsd-ipfw@FreeBSD.ORG Fri Jun 4 08:19:34 2010 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE1221065677 for ; Fri, 4 Jun 2010 08:19:34 +0000 (UTC) (envelope-from bored_to_death85@yahoo.com) Received: from n13.bullet.mail.ac4.yahoo.com (n13.bullet.mail.ac4.yahoo.com [74.6.228.93]) by mx1.freebsd.org (Postfix) with SMTP id 576CB8FC19 for ; Fri, 4 Jun 2010 08:19:34 +0000 (UTC) Received: from [76.13.12.66] by n13.bullet.mail.ac4.yahoo.com with NNFMP; 04 Jun 2010 08:19:33 -0000 Received: from [74.6.228.82] by t7.bullet.mail.ac4.yahoo.com with NNFMP; 04 Jun 2010 08:19:33 -0000 Received: from [127.0.0.1] by omp1003.mail.ac4.yahoo.com with NNFMP; 04 Jun 2010 08:19:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 643718.9500.bm@omp1003.mail.ac4.yahoo.com Received: (qmail 40248 invoked by uid 60001); 4 Jun 2010 08:19:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1275639573; bh=xk8/IRwDNXmkKTLMItrD8UlcprVSoqJNIU01tsqh1dc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=6lBP1SJ2AwHgcBU/9I8IFj6O4AIFDHPZ6kt1MMekSdCoHKIhgtTDltrg1CP9k1LtxAhphAbzhMUom2qoZlio0XQ017bLWDhwJ2m3OZ3tNmVhKPH+y7YkPJBBhxAmXGZkv8wvcBZK7yQHPtcnKbXdQhNAquDMqTrXRuF3V0nSnRc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=yLg2wh4gh+eKN3flhhwAJ2JwbpFC76nR0DxG9HvNCgmI7cI26UGFiMyL56dhHJEqJFIo4L8iymJR7jwMthFItilZ8+2rdzveMpN4/A6KnLZKD3d94YdKIhHi1u4/JFf1MA+0ilWzW2QDcRy9RQxqzSK41JkVUpPUqRFR1CQNjBA=; Message-ID: <360703.24596.qm@web59711.mail.ac4.yahoo.com> X-YMail-OSG: TmowvuEVM1mGaPBqMc1I_yi8zIIR.6lluU2C8wiiZot1FLh BtczeKJQmaxzJmkMepPDS6wszyES7SRD4aoSUnjkxL6pO09wtJIZA4D1XGGx OpWAm9btg48xKIkM6UjXosqEGsatYj1Zm9T._3y48r8auXkSkwqq5haIS9QT 0iQUX3nZZqHI9gg5jEU6Pz5rU18kpTu5zIeXt6k_MwtCQ7hRDYK15JEuXipu 1zOFtQRLwUcBfZRr3RhewbGyPdnI_ttgCINdyKQbp_el2yUcTLPb7DChwr67 8R2VdCZg- Received: from [89.165.120.190] by web59711.mail.ac4.yahoo.com via HTTP; Fri, 04 Jun 2010 01:19:32 PDT X-Mailer: YahooMailRC/397.8 YahooMailWebService/0.8.103.269680 References: <247123.29322.qm@web59713.mail.ac4.yahoo.com> <20100603172733.GA16454@onelab2.iet.unipi.it> Date: Fri, 4 Jun 2010 01:19:32 -0700 (PDT) From: bored to death To: Luigi Rizzo In-Reply-To: <20100603172733.GA16454@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-ipfw Subject: Re: traffic bandwidth limit with dummynet X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2010 08:19:34 -0000 thank you luigi for your reply, it helped. i changed the hz parameter to 1000 and then 4000 and then 8000 in my /boot/loader.conf. the result got much better. i configured my system as a router and i send 1GB traffic rate passing by it and set an 800MBytes bandwidth limit on input traffic with dummynet. this was the result: with hz=1 (default) between 200MBytes/s and 300MBytes/s with hz=1000 between 200MBytes/s and 300MBytes/s with hz=4000 between 350MBytes/s and 450MBytes/s with hz=8000 between 250MBytes/s and 550MBytes/s the maximum traffic rate is got so much better, but 2 problems still remain: 1- the maximum rate is still not high enough. 2- the rate variation range is high (250-550) and it's not a steady enough. i've also tried setting different "queue" and "burst" values for the pipe. the result is a little better when i set "queue" to a value between 80MBytes and 90MBytes and "burst" to a big number. any other ideas? ________________________________ From: Luigi Rizzo To: bored to death Cc: freebsd-ipfw Sent: Thu, June 3, 2010 9:57:33 PM Subject: Re: traffic bandwidth limit with dummynet On Thu, Jun 03, 2010 at 09:29:20AM -0700, bored to death wrote: > hello, > > i'm trying to limit my input traffic bandwidth on freebsd. i used > ipfw+dummynet. without limitation, i have almost 1Gbit/s input traffic > on my system. when i try to limit the bandwidth, it works fine on low > to normal limitation number (up to 450 Mbit/s). > but when i limit my traffic to an amount bigger than 500MBit/s, my > input traffic lowers down to average of 430 MBit/s. no matter what > limitations i set(from 500MBit/s to 1000MBit/s) my input traffic rate > is getting stucked at 430MBit/s. try to run the kernel with higher value of HZ (in /boot/loader.conf kern.hz=4000 and see if the situation improves. I think the symptoms you are seeing depend on the fact that packets are released every 1/HZ seconds probably causing some queue overflow at high packet rates and [relatively] low HZ values. cheers luigi > i suspected low hardware performance, so i tried this on 2 different > systems with freebsd-8.0 and the result is exactly the same. > > my ipfw rules are: > > Code: > ipfw -q flush > ipfw -q add 500 set 1 pipe 1 all from any to any in > ipfw pipe 1 config bw 700Mbit/s > ipfw add 1000 allow all from any to anyso my question is: > 1- is ipfw+dummynet traffic limit control, has performance problem that > cannot limit traffic correctly if limitation number is bigger than > 500MBit/s? > 2- is there any other way (other than ipfw+dummynet) to limit input bandwidth in freebsd? > > thank you. > > > > _______________________________________________ > 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" _______________________________________________ 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"