[GLLUG] traffic throtling - follow-up

Mark Szidik/mlc SzidikM at mlcnet.org
Wed Apr 4 11:37:54 EDT 2007


Thanks to all responses to my question.  Here is what I ended up doing:

This page (specifically section 9.2.2) gave me the info I needed to 
understand it:
http://lartc.org/howto/lartc.qdisc.classless.html

The tc-tbf man page filled in the rest of the info and has a very clear 
example.  (Why don't more man pages have examples?)

Here is the rule I ended up creating:
/sbin/tc qdisc add dev eth0 root tbf rate 1.0mbit latency 70ms burst 5kb 
peakrate 1.3mbit minburst 1540

This supposedy throttles all traffic to 1 mbit/s but allow peaks of 1.3 
provided the token bucket is not depleted. 

It does seem to work.  I copied an 11MB file over 100mbit ethernet and my 
throughput is considerably lower that what I would expect:
$ scp testhost:testfile .                           100%   11MB  72.7KB/s  
02:36

Compare that to copying a bigger file over Gbit on the other interface of 
the same machine with no throttling:
testfile                                                          100% 
66MB  22.1MB/s   00:03



---
Mark Szidik, CIO
Michigan Library Consortium
1407 Rensen Street, Suite 1,  Lansing, MI 48910-3657
Ph:800.530.9019 x117   Fax:517.492.3881
Ph:517.492.3817
MLC - Partnerships. Solutions. Excellence.




Marshal Newrock <marshal at idealso.com> 
Sent by: linux-user-bounces at egr.msu.edu
04/03/2007 04:18 PM

To
linux-user at egr.msu.edu
cc

Subject
Re: [GLLUG] traffic throtling






On Tue, 3 Apr 2007 15:33:37 -0400
Mark Szidik/mlc <SzidikM at mlcnet.org> wrote:

> Any doing traffic shaping?  I want to limit outbound http traffic on
> one host to 1Mbps.  My research led me to /sbin/tc, but I don't
> really understand it.  Assuming this is the right tool, the examples
> I find online are more complex than what I need (making it hard to
> understand). Anyone able to help with this? 

Do you want to do this on the box itself or on a separate
firewall/router box?  If the latter, m0n0wall (freebsd-based) or
pfsense (m0n0wall-based) can do this without too much difficulty. 

-- 
Marshal Newrock
Ideal Solution, LLC - http://www.idealso.com
_______________________________________________
linux-user mailing list
linux-user at egr.msu.edu
http://mailman.egr.msu.edu/mailman/listinfo/linux-user


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.egr.msu.edu/mailman/public/linux-user/attachments/20070404/35c87c66/attachment.html


More information about the linux-user mailing list