From: Giovanni Bajo <rasky@develer.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Low-priority traffic
Date: Wed, 24 Oct 2007 17:47:45 +0000 [thread overview]
Message-ID: <471F8541.4010606@develer.com> (raw)
Hello,
I'm a total tc newbie, and I'm trying to tweak the wondershaper script
(http://lartc.org/wondershaper/) to get a slightly different result.
Excuse me if I will not use the correct technical terms, it's a whole
new world to me :)
wondershaper.htb creates 3 HTB classes; 1:10 is high prio, 1:20 is bulk
(default), and 1:30 is low priority. The classes are created as follows:
=============================
tc class add dev $DEV parent 1:1 classid 1:10 htb \
rate ${UPLINK}kbit \
burst 6k prio 1
tc class add dev $DEV parent 1:1 classid 1:20 htb \
rate $[9*$UPLINK/10]kbit ceil ${UPLINK}kbit \
burst 6k prio 2
tc class add dev $DEV parent 1:1 classid 1:30 htb \
rate $[1*$UPLINK/10]kbit ceil ${UPLINK}kbit \
burst 6k prio 2
=============================
What I would like to do is to always give priority to traffic in class
1:20 respect to class 1:30: basically, if there is a lot of traffic in
class 1:20, class 1:30 shouldn't have any bandwidth allocated beside its
minimum rate.
I'll try to clarify the above paragraph with an example; let's assume
that if I download file A from this server, the generated traffic goes
to class 1:20; if I download file B, the traffic goes to class 1:30.
Let's also say that UPLINK is 1Mbit/s.
0) Server does nothing.
1) I start downloading B. I begin downloading it a 1Mbit/s.
2) I then start download A while B is going. A's download totally
steals traffic from B's download, up to its minimum rate. So, after a
little while, I should see download B going to 10% = 100Kbit and
download A going to 90% = 900Kbit.
3) I stop download B. A goes up to 1Mbit.
4) I apply a client-side limit to A's download. Now A goes to 600Kbit.
5) I start downloading B again. B cannot steal any bandwidth to A, but
it will get all the available bandwidth. So A will stay at 600Kbit, and
B will go at 400Kbit.
I hope my explanation is clear.
Wondershaper does not seem to do this. In fact, when I start downloading
A and B, they seem to equally distribute the available bandwidth (I
verified that packets really go to the respective classes, so it's not a
filter problem). It's not clear to me how HTB decides to allocate the
bandwidth, and what the "rate" parameter really means.
I even tried the CBQ version of wondershaper, but I got the same results.
Do you have any suggestion about how can I achieve my expected
behaviour? How should I modify wondershaper?
Thanks!
--
Giovanni Bajo
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next reply other threads:[~2007-10-24 17:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 17:47 Giovanni Bajo [this message]
2007-10-24 21:53 ` [LARTC] Low-priority traffic Jens Thiele
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=471F8541.4010606@develer.com \
--to=rasky@develer.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.