All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Furniss <adf.lists@gmail.com>
To: lartc@vger.kernel.org
Subject: Re: Why are my cburst settings ignored?
Date: Tue, 09 Jul 2013 19:38:33 +0000	[thread overview]
Message-ID: <51DC66B9.3010304@gmail.com> (raw)
In-Reply-To: <1988904.abTyuc7JXo@morgaine>

maillinglistredcap@gmx.de wrote:
> Hi Andy,
>
>
> Am Montag, 8. Juli 2013, 22:27:03 schrieb Andrew Beverley:
>> On Sat, 2013-07-06 at 18:23 +0200, maillinglistredcap@gmx.de wrote:
>>> Hi there,
>>>
>>> I'm new to this list and new to traffic control as well. I want to do some
>>> traffic shaping on my home network and over the past few days I've
>>> studied the subject quite a lot. Today I decided to some first
>>> experiments on my network using the HTB queueing discpline which seems to
>>> suit my purposes best. Well the first results were disappointing... most
>>> likely due to my lack of knowledge.
>> You're not sending any traffic into your single leaf class.
>
> Yes, I'm aware of that. I posted only a part of my configurations to illustrate
> the fact, that cburst settings are ignored. But maybe it's more useful if I
> give the whole configuration.
>
> My qdisc tree is as follows:
>
> tc qdisc del dev eth0 root 2>/dev/null
> tc qdisc add dev eth0 root handle 1: htb default 110

arp will go here and because you don't specify a child qdisc on 110 it 
could hypothetically get stuck in a very long and slow draining queue 
which could cause the eth to effectively stop working.

> tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit cburst 1602b

Fast eth is only 100mbit if you take into account overheads - I can't 
remember the number, but this won't shape.

The cburst here is ignored - burst may work but I wouldn't use it as it 
may just cause pointless work at 100mbit.

In fact when I shaped for slow wan on eth I didn't bother including lan 
traffic - if your lan is not maxed a lot then I would just use default 0 
(or not specify default) and only classify wan traffic to htb so lan/arp 
isn't shaped at all.

> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 99780kbit
> tc class add dev eth0 parent 1:1 classid 1:11 htb rate 220kbit
>
> tc class add dev eth0 parent 1:11 classid 1:110 htb rate 180kbit ceil 220kbit
> tc class add dev eth0 parent 1:11 classid 1:111 htb rate  40kbit ceil 220kbit
>
>
> This tree is on a machine in my network that has only one NIC. There is also a
> router on my network with a 224 kbit uplink internet connection.

As Andrew has said - being too close to 224 without allowing for 
overheads will cause failiure. You can allow for the overheads and then 
220kbit would be OK. What and how to allow for the overheads depends on 
the precice details of your link - eg. dsl and also how you connect eg, 
pppoa, pppoe and even within those there are variants that have 
different overheads.

  I run some
> services on the machine (e.g. bittorrent) that tend to clog up my internet
> connection. My approach is to direct all local traffic to the class with minor
> ID 10. Other traffic should be handled by class 1:11. In this class I have two
> subclasses. One for services were responsiveness is crucial ( classid 1:110)
> and a class (classid 1:111) that should handle other traffic (e.g. bittorrent).
> Here is my iptables configuration:
>
> iptables -t mangle -N lantraffic
> iptables -t mangle -A lantraffic -j CLASSIFY --set-class 1:10
> iptables -t mangle -A lantraffic -j ACCEPT
>
> iptables -t mangle -N wantraffic
> iptables -t mangle -A wantraffic -o eth0 -p tcp -m length --length :64 -j
> CLASSIFY --set-class 1:110
> iptables -t mangle -A wantraffic -o eth0 -m owner --uid-owner torrent -j
> CLASSIFY --set-class 1:111
> iptables -t mangle -A wantraffic -j ACCEPT
>
> iptables -t mangle -A POSTROUTING -o eth0 -d 192.168.2.0/24 -j lantraffic
> iptables -t mangle -A POSTROUTING -o eth0 ! -d 192.168.2.0/24 -j wantraffic
>

If there is bulk upload traffic in 110 then things will still be slow as 
your dns/acks are being mixed in. Putting sfq on will help.


  parent reply	other threads:[~2013-07-09 19:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-06 16:23 Why are my cburst settings ignored? maillinglistredcap
2013-07-08 21:27 ` Andrew Beverley
2013-07-09 16:58 ` maillinglistredcap
2013-07-09 17:31 ` Andrew Beverley
2013-07-09 19:11 ` Andy Furniss
2013-07-09 19:38 ` Andy Furniss [this message]
2013-07-14 17:33 ` maillinglistredcap
2013-07-14 19:25 ` Andrew Beverley
2013-07-14 20:52 ` Andy Furniss

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=51DC66B9.3010304@gmail.com \
    --to=adf.lists@gmail.com \
    --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.