Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-02-2005, 09:29 AM
|
#1
|
LQ Newbie
Registered: Sep 2005
Posts: 2
Rep:
|
HTB shaped bandwitch runs over the ceiling!
Hey folks,
I find this VERY funny.
What I wanted is a SIMPLE HTB traffic shaper with a single class, that shapes http traffic.
So I set up the following scenario:
tc qdisc add dev eth0 root handle 1: htb default 0
tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps burst 2000 #for WWW traffic
I sent all www traffic to class 1:1 by the means of iptables, and started downloading from another machine with wget. The first strange effect was: Wget started downloading with 100kbps, and over 10 seconds, it slowly went up to 300kbps download speed, which is 3 times as much as I defined in the htb rules.
You can imagine, I didn't believe to wget. So I listed the classes with tc -s show classes dev eth0:
What I saw:
class htb 1:1 root prio 0 rate 800000bit ceil 800000bit burst 1999b cburst 1699b
Sent 28822401 bytes 4074 pkt (dropped 0, overlimits 0 requeues 0)
rate 1912Kbit 33pps backlog 0b 0p requeues 0
lended: 4074 borrowed: 0 giants: 7926
tokens: 3361 ctokens: 289
I guess these five lines are what should not happen. Ever. Actual rate is 1912Kbit, while the ceiling is 800Kbit. Anyone else has run into this crazy situation so far?
Thank you in advance for your answers.
lez
|
|
|
09-02-2005, 03:29 PM
|
#2
|
Member
Registered: Apr 2004
Distribution: Gentoo
Posts: 95
Rep:
|
You specified a default class that does not even exist. So if you don't have additional filter rules, all packets will go out without being shaped. Check the direct_packets_stat (tc -s qdisc show), it should be zero, otherwise there is an error in your setup. Just use default 1 instead of default 0, with only one class you don't need any additional filter rules then.
|
|
|
09-05-2005, 04:00 AM
|
#3
|
LQ Newbie
Registered: Sep 2005
Posts: 2
Original Poster
Rep:
|
I have the appropriate filters that send all http packets to class 1:1. You can see this if you take a glance at 1:1 class's statistics what I've pasted, too. The default class is zero, because I don't want ssh traffic to be shaped. (I start the wget's through ssh).
My problem was:
- The documentation says "rate" can never go over the "ceil"
- It did and stayed there
More interesting fact:
I've experienced a bit more, and I find, if I apply a tbf filter with ANY BIG rate, (I used 10Mbit/s), It works properly and htb does not go over the ceiling. Strange.
I do all the experiments on a Fedora Core 4, default tc binary, and its default kernel (2.6.11-1.1369_FC4)
|
|
|
All times are GMT -5. The time now is 12:10 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|