All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Priorizing bandwidth share
Date: Mon, 13 Oct 2003 08:16:46 +0000	[thread overview]
Message-ID: <marc-lartc-106603518606234@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106602718431912@msgid-missing>

On Monday 13 October 2003 08:07, Nguyen Dang Phuoc Dong wrote:
> 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?
Yes.  You said yourself that your link is 450K, so limit all traffic to 445K 
so YOU are the bottleneck and not your ADSL router.
Also, your r2q setting is too low.
And for more htb tests, info and a faq, see www.docum.org.

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/

      reply	other threads:[~2003-10-13  8:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-13  6:07 [LARTC] Priorizing bandwidth share Nguyen Dang Phuoc Dong
2003-10-13  8:16 ` Stef Coene [this message]

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-106603518606234@msgid-missing \
    --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 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.