Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Andrew Leiserson <lartc@leiserson.org>
To: lartc@vger.kernel.org
Subject: [LARTC] problem with wrr+prio
Date: Mon, 19 Jan 2004 22:05:32 +0000	[thread overview]
Message-ID: <20040119220532.GD15991@breakaway.mit.edu> (raw)

I have set up wrr successfully on my bridge/shaper machine. That much
works fine. I originally used sfq in the inner classes. However, there
was a problem with high-bandwidth connections (web downloads,
bittorrent) starving low-bandwidth low-latency connections like ssh. I
would like to use prio or similar to prioritize the interactive traffic,
but it does not seem to work. I have tested with "ping -Q 0x10" and
qualitative evaluation of ssh latency. Both tests get very bad (~ 0.5-1
sec) as soon as I start a web download. I have checked with tcpdump that
the TOS is set to 0x10. The machine is 2.4.23, with ebtables and wrr
patches. Any ideas?

Thanks.

Here is my script:

shape () {

   DEV=$1
   WRR_DIRECTION=$2

   # clean existing down- and uplink qdiscs, hide errors
   tc qdisc del dev $DEV root 2> /dev/null > /dev/null

   # install root HTB
   tc qdisc add dev $DEV root handle 8000: htb default 1

   tc class add dev $DEV parent 8000:0 classid 8000:1 htb \
      rate ${RATE}kbit prio 2

   # add wrr for correct direction, matching ip, # classes, no proxy
   # remap
   tc qdisc add dev $DEV parent 8000:1 handle 8001: \
      wrr $WRR_DIRECTION ip $WRR_MAX_CLASSES 0

   declare -i NUM=$WRR_MAX_CLASSES;
   while [ $NUM -ge 1 ]; do
      HNUM=$(printf %X $NUM)
      tc qdisc add dev $DEV parent 8001:$HNUM handle $HNUM: prio
      NUM=$NUM-1
   done

   tc class add dev $DEV parent 8000:0 classid 8000:2 htb prio 1 \
      rate ${RATE}kbit
   tc filter add dev $DEV parent 8000: protocol ip pref 10 \
      u32 match ip src $LOCAL_ADDR flowid 8000:2
   tc filter add dev $DEV parent 8000: protocol ip pref 10 \
      u32 match ip dst $LOCAL_ADDR flowid 8000:2
   tc qdisc add dev $DEV parent 8000:2 handle 8002: pfifo

   tc qdisc change handle 8001 dev $DEV wrr qdisc \
      wmode1=3 wmode2=0

   declare -i NUM=$WRR_MAX_CLASSES;
   while [ $NUM -ge 1 ]; do
      HNUM=$(printf %X $NUM)
      tc class change classid 8001:$HNUM dev $DEV \
         wrr min1=0.5 max1=1.0 decr1=0.0000000254 \
                incr1=0.00083333333 weight1=1.0 \
             min2=0.1 max2=1.0 decr2=0 incr2=0 weight2=1.0
      NUM=$NUM-1
   done

}

shape $IFACE_IN dest
shape $IFACE_OUT sour


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

                 reply	other threads:[~2004-01-19 22:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040119220532.GD15991@breakaway.mit.edu \
    --to=lartc@leiserson.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