Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] R2Q
Date: Thu, 29 Jan 2004 17:58:43 +0000	[thread overview]
Message-ID: <200401291858.43230.stef.coene@docum.org> (raw)
In-Reply-To: <marc-lartc-102179583208377@msgid-missing>

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@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

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

  parent reply	other threads:[~2004-01-29 17:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-19  8:09 [LARTC] r2q john huttley
2002-05-19  9:09 ` Martin Devera
2004-01-26 23:04 ` [LARTC] R2Q Mihai Vlad
2004-01-27 18:23 ` Stef Coene
2004-01-27 23:18 ` Mihai Vlad
2004-01-29 17:58 ` Stef Coene [this message]
2004-03-19 21:20 ` [LARTC] r2q ThE LinuX_KiD
2004-03-19 21:53 ` Roy
2004-03-20 20:17 ` ThE LinuX_KiD
2004-03-21  7:20 ` rubens
2004-03-21  8:21 ` Bikrant Neupane
2004-03-22 18:50 ` ThE LinuX_KiD
2004-03-23 15:13 ` Roy
2004-03-23 15:38 ` ThE LinuX_KiD
2004-03-28 17:59 ` Stef Coene

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401291858.43230.stef.coene@docum.org \
    --to=stef.coene@docum.org \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox