[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CBQ rate



Hi !

I have the following script :
 

$TC qdisc add dev eth0 handle 2:0 parent 1:0 cbq \
        bandwidth 10Mbit allot 1514 avpkt 1000 \
        mpu 64 cell 8

##EF Setup (oura)

$TC class add dev $DEV parent 2:0 classid 2:1 cbq \
        bandwidth 10Mbit  rate ${EF_BANDWIDTH} weight 1 \
        avpkt 1000 allot 1514 maxburst 21 prio 7 \
 bounded isolated

$TC filter add dev eth0 parent 2:0 protocol ip pref 1 \
        handle 0xb8 tcindex classid 2:1

$TC qdisc add dev eth0 parent 2:1 pfifo limit 5



The variables EF_BANDWIDTH are 1Mbit and i tested this script with ftp between two machines.
This is just a part of the all script and the traffic for machine 1 goes throught classid 2:1.


I am testing how TC and CBQ behaves with the rates that i put.


I tested with a file with 74072576 bytes and sended it throught a conection of 1Mbit and
the final result that i get was : Time= 529.06s .  I know that the real amount of bytes
that ftp sends are not just the data bytes but also the bytes of TCP/IP and Ethernet, so
the total bytes that ftp send were 76812247 bytes.
I made the folowing calculation to get the rate :  76812247/(529.06*1024)= 141.73 KB/s
and
141.73 KB/s * 8 *1024 / ( 1024*1024) = 1.107 Mbit


What i dont understand is how could i get a rate superior than the rate that i configured
on CBQ of TC?


P.S: the number 76812247 bytes was calculated in the following way: if 74072576 bytes are for
1460 bytes of data in the TCP/IP packets, then X are for 1514 bytes that are the total lenght
of a TCP/IP packet (with Ethernet header)
 
-------------------------------------------------------
Joao Brandao Reis ,  email: ee94002@fe.up.pt
WWW: http://members.fortunecity.com/ee94002
Pagina Projecto: http://netlab.fe.up.pt/~ee94002