Projet

Général

Profil

Buffer Bloat » Historique » Version 28

« Précédent - Version 28/98 (diff) - Suivant » - Version actuelle
Laurent GUERBY, 15/02/2013 21:35


Buffer Bloat

Conferences

Tomas Hruby:

http://linuxplumbers.ubicast.tv/videos/byte-queue-limits/

Eric Dumazet:

http://linuxplumbers.ubicast.tv/videos/codel-and-fq_codel-fighting-the-delays/

The whole conference:

http://linuxplumbers.ubicast.tv/channels/#lpc-2012

QoS

Partage de bande passante ADSL

# Version du 20111207
function do_qos {
  tc qdisc add dev $DEV root handle 1: htb default 1
  tc class add dev $DEV parent 1: classid 1:1 htb rate $RATE
  for IP in $IP_LIST; do
    tc class add dev $DEV parent 1:1 classid 1:$IP htb rate 1kbit ceil $RATE
    tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip $DIR 91.224.148.$IP flowid 1:$IP
  done
}

DIR=dst #on gw then RATE= ADSL download speed
#DIR=src #on local machine then RATE= ADSL upload speed

DEV=tapstg
RATE=11000kbit # src 700kbit
IP_LIST=$(seq 129 144)
do_qos

DEV=tapthd
RATE=5500kbit # src TODO
IP_LIST=$(seq 194 207)
do_qos

DEV=tapmon
RATE=480kbit # src 96kbit
IP_LIST=$(seq 114 115)
do_qos

Pour supprimer un qdisc :

tc qdisc del dev tapxxx root

Pour afficher :

tc -p -s -d qdisc show dev tapxxx
tc -p -s -d class show dev tapxxx
tc -p -s -d filter show dev tapxxx

Documentation :

# tc qdisc add htb help
What is "help"?
Usage: ... qdisc add ... htb [default N] [r2q N]
 default  minor id of class to which unclassified packets are sent {0}
 r2q      DRR quantums are computed as rate in Bps/r2q {10}
 debug    string of 16 numbers each 0-3 {0}

... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
                      [prio P] [slot S] [pslot PS]
                      [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
 rate     rate allocated to this class (class can still borrow)
 burst    max bytes burst which can be accumulated during idle period {computed}
 mpu      minimum packet size used in rate computations
 overhead per-packet size overhead used in rate computations
 linklay  adapting to a linklayer e.g. atm
 ceil     definite upper class rate (no borrows) {rate}
 cburst   burst but for ceil {computed}
 mtu      max packet size we create rate map for {1600}
 prio     priority of leaf; lower are served first {0}
 quantum  how much bytes to serve from leaf at once {use r2q}

TC HTB version 3.3

=> Version basée sur le script ttnn incluant la v6 (même mode de calcul IPv4->IPv6 que ttnn) : http://orga.rhizome-fai.net/projects/rhizome-sysadmin/repository/entry/script/router/launchQoS

ATM

From: Sebastian Moeller <>
To: e-t172 <>
Cc:
Subject: Re: tc htb + prio = very slow link
Date: Sun, 27 May 2012 22:46:50 -0700 (05/28/2012 07:46:50 AM)
Mailer: Apple Mail (2.1278)

Hi Etienne,

while I have no real inside for your actual problem; but I do have to add something else. Back when I was using DSL I used the following addition to the definition of the root disc (for egress and ingress), to deal with the peculiarities of ATM based ADSL:
stab overhead 18 mtu 2048 mpu 53 linklayer atm
(there is a tc-stab manpage (http://manpages.ubuntu.com/manpages/precise/man8/tc-stab.8.html) to help you select the right value for overhead, mtu here only concerns the size table and not the interface mtu)
If your DSL connection uses an underlaying ATM carrier (most old DSL connections do to my knowledge) this will help a lot, as due to ATM small packages will often carry a lot of padding that eats considerable portions of you bandwidth. the stab invocation will not change that bandwidth use, but will take it into account while shaping from your root disc. Otherwise you will a) overload your DSL link in spite of your plan to avoid that and b) the system will think and report a lower used bandwidth than true. Note should you opt to take hub inbuilt link layer atm options see (http://kerneltrap.org/mailarchive/linux-netdev/2010/7/7/6280676)
Now some modern DSL variants do not use ATM as carrier anymore, notably some VDSL/VDSL2 use PTM-TC which does not have the same interesting structure as ATM (see http://www.ethernetinthefirstmile.com/articles/WTC2002.pdf)
Also if you use hub people typically seem to use hub children as well (http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm) so maybe that causes the issues you have (see http://linux.die.net/man/8/tc-htb for amore current overview of the parameters)?

hoping this helps somewhat
Sebastian