All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Arcus <shop@open-t.co.uk>
To: lartc@vger.kernel.org
Subject: Egress bandwidth limiting not working?
Date: Tue, 07 May 2013 10:53:01 +0000	[thread overview]
Message-ID: <5188DD0D.4020708@open-t.co.uk> (raw)

I am trying to limit the bandwidth used by the egress leg as per the 
lartc cookbook here: 
http://www.lartc.org/howto/lartc.cookbook.ultimate-tc.html

The ingress works fine (well, it is a bit wobbly - but it limits the 
rate at roughly the expected level). However, the egress doesn't appear 
to be working. With no tc active, I get about 300mbs both ways (I'm 
testing in VMs). When it is on, the ingress is down to roughly 500kbs, 
but the egress is down to only about *150mbs*.

Interfaces on both sides use 1500 for MTU. Kernels on both sides are 
3.8.4. Has the syntax changed recently - or is the example at the link 
above incomplete? I appreciate any hints as to what I might be doing wrong.

For the purpose of testing, for egress, I've simplified everything down 
to one root qdisc, one class (to set the rate) and one filter (to catch 
everything):


##############################################
#  egress

# root cbq
tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 \
     bandwidth 1000Mbit

# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroy latency:
tc class add dev eth0 parent 1: classid 1:1 cbq rate 500kbit \
     allot 1500 prio 5 bounded isolated

# include everything in the filter
tc filter add dev eth0 protocol ip parent 1:1 prio 3 u32 match \
     ip dst 0.0.0.0/32 flowid 1:1


##############################################
#  ingress

tc qdisc add dev eth0 handle ffff: ingress

tc filter add dev eth0 parent ffff: protocol ip prio 50 u32 \
     match ip src 0.0.0.0/0 police rate 500kbps burst 10k drop flowid :1

             reply	other threads:[~2013-05-07 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 10:53 Sebastian Arcus [this message]
2013-05-08  6:10 ` Egress bandwidth limiting not working? Andrew Beverley
2013-05-08  7:03 ` Sebastian Arcus
2013-05-08 17:24 ` Andrew Beverley
2013-05-08 18:29 ` Sebastian Arcus
2013-05-14 19:38 ` Andrew Beverley

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=5188DD0D.4020708@open-t.co.uk \
    --to=shop@open-t.co.uk \
    --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.