All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyen Dang Phuoc Dong" <dong@sunyard.net.tw>
To: lartc@vger.kernel.org
Subject: [LARTC] Priorizing bandwidth share
Date: Mon, 13 Oct 2003 06:07:37 +0000	[thread overview]
Message-ID: <marc-lartc-106602718431912@msgid-missing> (raw)

Hi folks,

I have tested Priorizing bandwidth share feature of HTB and it results very
bad.

My test environment is something like below. There only 2 PCs on my LAN

Internet
    |
ADSL
    | eth1
Linux box (iptables + HTB)
    | eth0 (192.168.1.254)
----------------------------
    |        LAN          |
PC1                      PC2
(192.168.1.1)     (192.168.1.2)

My ADSL is 512K up/down. Infact, the real bandwidth is about 450K in almost
time.

Below is my tc script:

/bin/tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 2: htb r2q 1
tc class add dev eth0 parent 2: classid 2:1 htb rate 512Kbit ceil 512Kbit

iptables -t mangle -A POSTROUTING -o eth0 -d 192.168.1.1 -j MARK --set-mark
12
iptables -t mangle -A POSTROUTING -o eth0 -d 192.168.1.2 -j MARK --set-mark
14

tc class add dev eth0 parent 2:1 classid 2:12 htb rate 400Kbit ceil 512Kbit
prio 0
tc qdisc add dev eth0 parent 2:12 sfq
tc filter add dev eth0 parent 2:0 protocol ip prio 0 handle 12 fw classid
2:12

tc class add dev eth0 parent 2:1 classid 2:14 htb rate 100Kbit ceil 512Kbit
prio 7
tc qdisc add dev eth0 parent 2:14 sfq
tc filter add dev eth0 parent 2:0 protocol ip prio 7 handle 14 fw classid
2:14

Firstly, I start downloading an iso image from PC1, it can reach 448K. Then
I start downloading from PC2, then the bandwidth of class 12 (PC1) is down
to about 216K and bandwidth of class 14 (PC2) is about 220K.
So it's not what I've expected. Since I set the priority of class 12 ( = 0 )
higher than priority of class 14 ( = 7 ). In addition, the bandwidth of
class 12 is assigned 4 time bigger than class 14. As I've expect, class 12
should be assigned enough bandwidth (400K), and class 14 only get about 50K.

I've tried with both HTB2 (I've removed HTB3 code from kernel 2.4.22, and
patched it with HTB2 source code from HTB home page) and HTB3 (used original
kernel 2.4.22). The result above is of HTB2. The result of HTB3 even worse.

Any idea?

regards,

Dong

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

             reply	other threads:[~2003-10-13  6:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-13  6:07 Nguyen Dang Phuoc Dong [this message]
2003-10-13  8:16 ` [LARTC] Priorizing bandwidth share 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=marc-lartc-106602718431912@msgid-missing \
    --to=dong@sunyard.net.tw \
    --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.