All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Priorizing bandwidth share
@ 2003-10-13  6:07 Nguyen Dang Phuoc Dong
  2003-10-13  8:16 ` Stef Coene
  0 siblings, 1 reply; 2+ messages in thread
From: Nguyen Dang Phuoc Dong @ 2003-10-13  6:07 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-13  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-13  6:07 [LARTC] Priorizing bandwidth share Nguyen Dang Phuoc Dong
2003-10-13  8:16 ` Stef Coene

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.