From owner-freebsd-net@FreeBSD.ORG Fri Feb 29 22:41:50 2008 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 7832E1065674 for ; Fri, 29 Feb 2008 22:41:50 +0000 (UTC) (envelope-from juri_mian@yahoo.com) Received: from n56.bullet.mail.sp1.yahoo.com (n56.bullet.mail.sp1.yahoo.com [98.136.44.52]) by mx1.freebsd.org (Postfix) with SMTP id 600B28FC1C for ; Fri, 29 Feb 2008 22:41:50 +0000 (UTC) (envelope-from juri_mian@yahoo.com) Received: from [216.252.122.219] by n56.bullet.mail.sp1.yahoo.com with NNFMP; 01 Mar 2008 06:19:34 -0000 Received: from [69.147.65.158] by t4.bullet.sp1.yahoo.com with NNFMP; 29 Feb 2008 22:28:04 -0000 Received: from [127.0.0.1] by omp406.mail.sp1.yahoo.com with NNFMP; 29 Feb 2008 22:28:04 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 957160.53180.bm@omp406.mail.sp1.yahoo.com Received: (qmail 92846 invoked by uid 60001); 29 Feb 2008 22:28:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=VE0nvuDcH120emovUbKdkVnLVt0L54GmiyLPW8qKF/LmkcJxPyZAW/8BmE5TRgroUn4m43oMY9yuU+eUCwneLYbB+xng53hRdJZL5ow4f+EtD64Aa643faW6JvnMtRiuxoaoha4fr8udAjmLE7CgvQD3SXKdISH3O2KSAB3RlWk=; X-YMail-OSG: D4fRwKcVM1n.PbCXdz4UGwv6o56oiSwj8_g9oLg0H..xZTqITulsGI15h8hQfeoLU3o1LygH218q0RGca1kLUUtR1g-- Received: from [71.63.232.32] by web45601.mail.sp1.yahoo.com via HTTP; Fri, 29 Feb 2008 14:28:04 PST Date: Fri, 29 Feb 2008 14:28:04 -0800 (PST) From: Juri Mianovich To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <754299.92112.qm@web45601.mail.sp1.yahoo.com> Subject: simple, adaptive bandwidth throttling with ipfw/dummynet ? 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: Fri, 29 Feb 2008 22:41:50 -0000 I do simple limiting of bandwidth with dummynet. Very simple, in fact - one inbound rule and one outbound rule. Easy. Sometimes people hit the limit I have in place, but if they only hit it on a short transfer, I don't care - they can live with being throttled for 30 mins. BUT, sometimes people have a big massive transfer that maxes out the limit for a long time. Not only do they get throttled too hard, but then other users are throttled as well - very hard. So, I am wondering if anybody knows of a simple way to do something like: "after 30 minutes of maxed dummynet rule, add X mbps to the rule for every active TCP session, with a max ceiling of Y mbps" and: "after 30 minutes of less than max usage, subtract X mbps from the rule every Y minutes, with a minimum floor of Z" Make sense ? Is there an easy way to do this ? If I wanted to do this myself with a shell script, is there any way to test a particular dummynet rule for its current "fill rate" - OR - a simple way to test if a particular dummynet rule is currently in enforcement ? Thanks. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ