All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Soltys <soltys@ziu.info>
To: lartc@vger.kernel.org
Subject: Re: HFSC not working as expected
Date: Mon, 07 Jul 2014 09:54:25 +0000	[thread overview]
Message-ID: <53BA6E51.80901@ziu.info> (raw)
In-Reply-To: <53AC30A8.2080403@yescomputersolutions.com>

On 2014-07-06 17:34, Alan Goodman wrote:

> 
> Is it possible to iron this out, or is my unusual extreme test just too 
> much?
> 

Certainly, I have 24/7 torrent with uplink limits done solely by hfsc,
so it's certainly possible - I can't really tell if my torrent is even
on or off (core dumped ;) ). I have few extra patches, though
they should make little/no difference (at those speeds especially).

Suggestions about your uplink rules (disabled word wrapping to make it
more readable):

> tc class add dev ppp0 parent 1:0 classid 1:1 hfsc sc rate 100mbit ul rate 100mbit
> tc class add dev ppp0 parent 1:1 classid 1:2 hfsc sc rate 900kbit ul rate 900kbit

Unless the above is a typo, this makes no sense for ppp0 interface. You
should be covering the speed for what your uplink sync is. If it say
synchronizes at 1112248 bit/s (with some variation, but e.g. never lower
than 1100000), set

tc qdisc add dev ppp0 root handle 1:0 hfsc stab overhead 40 linklayer atm default 14 
tc class add dev ppp0 parent 1:0 classid 1:1 hfsc ls m2 1100000 ul m2 1100000 

Now why ls ? sc is shorthand for ls+rt, and rt functions only on leaf
classes with qdiscs attached (and outside class hierarchy). ul limits
the speed at which ls can send packets. ls is also relative only and
makes child classes send at ratio proportional to their values, e.g.

A 100mbit, B 200mbit on 10mbit interface would mean that hfsc would send
data from those classes in 1:2 ratio - not try to send 300 mbit total
there (that would happen /if/ it was 'rt' and A & B were leaves).

Remaining part (just an example):

tc class add dev ppp0 parent 1:1 classid 1:10 hfsc sc m2 100kbit #syn ack rst
tc class add dev ppp0 parent 1:1 classid 1:11 hfsc sc m1 500kbit d 20ms m2 300kbit # Time critical
tc class add dev ppp0 parent 1:1 classid 1:12 hfsc sc m2 200kbit #Interactive
tc class add dev ppp0 parent 1:1 classid 1:13 hfsc sc m2 100kbit #bulk
tc class add dev ppp0 parent 1:1 classid 1:14 hfsc sc m1 100kbit d 20ms m2 300kbit # torrent and not-classified junk

'rt' sums to 1mbit, implied 'ls' will cover remaining bandwidth
proportionally.

Unless you have special needs (aka killing speed for e.g. some customer
under some hierarchy subtree), avoid using 'ul' on anything but uppermost
class.

Note: you don't have to use sc - you can use rt and ls separately - as
long as they make sense w.r.t. each other. In many situations, you don't
really need that precise and large 'rt' values when 'ls' can nicely
cover the rest.

  parent reply	other threads:[~2014-07-07  9:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 14:39 HFSC not working as expected Alan Goodman
2014-07-01 12:25 ` Michal Soltys
2014-07-01 13:19 ` Alan Goodman
2014-07-01 13:30 ` Michal Soltys
2014-07-01 14:33 ` Alan Goodman
2014-07-03  0:12 ` Michal Soltys
2014-07-03  0:56 ` Alan Goodman
2014-07-06  1:18 ` Michal Soltys
2014-07-06 15:34 ` Alan Goodman
2014-07-06 16:42 ` Andy Furniss
2014-07-06 16:49 ` Andy Furniss
2014-07-06 16:49 ` Alan Goodman
2014-07-06 16:54 ` Alan Goodman
2014-07-06 20:42 ` Andy Furniss
2014-07-06 22:18 ` Alan Goodman
2014-07-06 22:24 ` Andy Furniss
2014-07-07  0:01 ` Alan Goodman
2014-07-07  9:54 ` Michal Soltys [this message]
2014-07-07  9:58 ` Michal Soltys
2014-07-07 10:08 ` Michal Soltys
2014-07-07 10:10 ` Michal Soltys
2014-07-07 10:59 ` Alan Goodman
2014-07-07 15:38 ` Alan Goodman

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=53BA6E51.80901@ziu.info \
    --to=soltys@ziu.info \
    --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.