Re: R2Q

Linux Advanced Routing and Traffic Control

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

 



On Wednesday 28 January 2004 00:18, Mihai Vlad wrote:
> Here is a quote from docum.org:
>
> -------------------------------------------------------------------------
> Counting packets with quantum can be strange. If we have a low rate class
> (rate = 5kbit), default quantum = 5000 / 10 = 500 bytes. But most packets
> are more then 500 bytes. Htb version 1 and 2 uses DRR, so a packet larger
> then 1000 bytes will be sent and it will remember how much it sent and wait
> until the packet is paid back before another packet is send. So if you send
> 1000 byte, next time the class is polled, you will not be allowed to send.
>
> Htb3 uses the WRR scheduler. When a packet with size > quantum is sent, it
> will be sent and an error that the quantum is too small will be logged. But
> there is no pay back. The WRR scheduler is faster then the DRR scheduler.
> So make sure quantum is bigger then the default packet size. For 15 kbyte/s
> and default r2q, quantum is 1500 and this is exactly the maximum packet
> size. If you want to tune htb for rates smaller then 15 kbyte/s, you can
> manually set the r2q and/or quantum.
> ---------------------------------------------------------------------------
>
> Assuming the 5kbit example (kbit not kbytes) and that the R2Q is 10, we can
> compute the quantum like this:
> 5 kbit = 5000 bit
> 5000 bit / 10 = 500 byte
>
> Is it bytes or bits?
bytes

> I guess the first term (the rate) is measured in bits and the quantum in
> bytes.
Indeed.

> Taking into account the second example (15 kbyte), we compute the quantum
> like this:
> 15 kbyte = 15000 byte
> 15000 byte / 10 = 1500 byte
>
> Is it bytes or bits?
bytes

> So, in order to have a fully functional HTB 3 script I need to have each of
> my class rates bigger than 15 kbyte? This is about 120 kbit.
Indeed.

> What happens if I need lower rates like 8 kbit?
You can specify a lower r2q if you add the htb qdisc.  And/or you can specify 
quantum when you add a class.

> Do I need to set up the quantum manually?
If you don't find a good r2q, yes.

Stef

-- 
stef.coene@xxxxxxxxx
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux