All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ewa Janczukowicz <janczukowicz.ewa@gmail.com>
To: lartc@vger.kernel.org
Subject: Re: HTB scheduler, problem with blocking high priority traffic
Date: Fri, 15 Apr 2016 14:34:57 +0000	[thread overview]
Message-ID: <CAPTuX4qectkxttvCHdMuV3Tn216RUeRhP6+p_pAKvRa2gde+Ew@mail.gmail.com> (raw)
In-Reply-To: <CAPTuX4qcK23dvd-Cd1=wX8TyHR5AUMZanLAwV4mfMetfgpd3Dg@mail.gmail.com>

Hello again,
Just to give you an update.
I have tried different options, changing burst, cburst, ceil, rate and
quantums, but I could not see any improvement.
Different configurations only changes when and how many times my high
priority traffic gets starved by the low priority one (sometimes the
priority traffic is blocked up to three times in random moments
sometimes only once).

I am using the following configuration now:
tc qdisc add dev br0 handle 1: root htb default 15
tc class add dev br0 parent 1: classid 1:1 htb rate 1000kbit ceil 1000kbit
tc class add dev br0 parent 1:1 classid 1:14 htb rate 200kbit ceil
1000kbit prio 1
tc class add dev br0 parent 1:1 classid 1:15 htb rate 10bit ceil 1000kbit prio 2
tc filter add dev br0 parent 1: protocol ip u32 match ip tos 0xb8 0xff
flowid 1:14 (UDP)
tc filter add dev br0 parent 1: protocol ip u32 match ip tos 0x00 0xff
flowid 1:15 (TCP)
tc qdisc add dev br0 parent 1:14 handle 20: sfq limit 40
tc qdisc add dev br0 parent 1:15 handle 50: pfifo limit 1000

I still think it has something to do with HTB scheduling and blocking
high priority traffic for some reason. Thus when rate is calculated
for my high priority traffic, it somehow is higher than its ceil.
I have found some information that burst/cburst is used for rate
calculation, however leaving it to default seems the best option, thus
that way it is the lowest possible.

So I still have some questions:
- Why could low priority traffic block the other one for several
seconds, even though its assured rate is close to zero? Probably
because priority rate used all its tokens, that leads to the next
question:
- Why would high priority traffic reach its ceil if the bitrate is
lower than 1Mbit/s?

Thank you in advance for any help.
Have a nice day,
Ewa


On Tue, Apr 12, 2016 at 3:17 PM, Ewa Janczukowicz
<janczukowicz.ewa@gmail.com> wrote:
> Hello,
>
> I would like to ask a question about a weird (at least for me J) HTB
> behavior that I get, while prioritizing one type of traffic.
>
> I am working on assuring low delay for UDP traffic at the home gateway
> level. At this home gateway I have two types of traffic, TCP and UDP,
> and I assure differentiated treatment by using HTB.
> The bandwidth I am testing equals 1Mbit/s.
>
>  Thus, I have to types of leaf classes:
> - UDP leaf class with:
>     - the highest priority,
>     - a short queue length (SFQ qdisc),
>     - assured rate 200kbit/s and ceil rate 1Mbit/s,
>      - quantum = 3 x MTU.
>
> - TCP leaf class with:
>     - lowest priority,
>     - default queue length (pFIFO qdisc),
>     - minimum assured rate (8bit/s – to force it to stay in yellow mode
> most of the time)  and ceil rate 1Mbit/s,
>     - quantum = MTU.
>
> In order to see how the traffic interacts, for UDP I have a stairs
> type of traffic, thus I start at 0bit/s and I increase the traffic
> every ten seconds by 100kbit/s. When I reach 1Mbit/s I decrease every
> 10s by 100kbit/s until I reach zero.
>
> Alongside, I have TCP traffic, either a file upload, either a simple
> iperf (without any influence on observed behavior).
>
> Normally, most of the time, I get an expected behavior. Thus I can see
> perfectly the traffic separation and the “stairs” trend of the UDP.
> Additionally, UDP traffic takes over TCP (but TCP can still send – and
> the trend is the opposite of UDP, thus first decreasing, later
> increasing).
>
> However when the UDP bitrate is already decreasing (about 30 seconds
> before reaching 0), TCP traffic completely takes over for a couple of
> seconds. I can’t really understand this behavior, because it seems
> that UDP traffic cannot send, but it shouldn’t be in “red” mode since
> its bitrate is already decreasing.
>
> I think it has something to do with HTB scheduling and blocking UDP
> traffic for some reason.
>
> I hope my question is clear, but I can also provide wireshark bitrate graphs.
>
> I will continue to test different configurations but I will appreciate
> any suggestions.
>
> Thank you in advance for your help.
>
> Ewa

  reply	other threads:[~2016-04-15 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 13:17 HTB scheduler, problem with blocking high priority traffic Ewa Janczukowicz
2016-04-15 14:34 ` Ewa Janczukowicz [this message]
2016-04-15 15:51 ` Andy Furniss
2016-04-15 16:14 ` Anton Danilov
2016-04-18  9:31 ` Ewa Janczukowicz
2016-04-21  9:33 ` Ewa Janczukowicz

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=CAPTuX4qectkxttvCHdMuV3Tn216RUeRhP6+p_pAKvRa2gde+Ew@mail.gmail.com \
    --to=janczukowicz.ewa@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.