LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-02-2005, 09:29 AM   #1
lez
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Rep: Reputation: 0
Angry 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
 
Old 09-02-2005, 03:29 PM   #2
frostschutz
Member
 
Registered: Apr 2004
Distribution: Gentoo
Posts: 95

Rep: Reputation: 28
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.
 
Old 09-05-2005, 04:00 AM   #3
lez
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Original Poster
Rep: Reputation: 0
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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTB as a child of another HTB - doesn't work ddaas Linux - Networking 5 07-25-2005 03:21 AM
How To HTB linuxcolor Fedora 1 02-15-2005 07:46 AM
Looking for Shaped Window Tutorial raxxor Programming 1 08-12-2004 09:17 PM
And now it goes pear shaped Jongi Linux - Newbie 1 02-21-2004 07:58 PM
Red Hat installation gone Pear Shaped troopship 7 Linux - General 2 10-10-2003 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration