Re: HTB scheduler, problem with blocking high priority traffic

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I have worked more on analyzing my problem.

So I have captured TCP packets that are sent from the TCP user. And
thus the behavior is different than at the exit of home gateway (that
was quite misleading).

There is no ‘stairs’ trend, when the packets enter the home gateway.
However at some point(s) the TCP bitrate decreases or even stops and
later sends a huge burst of bytes. I believe it is cause by a packet
loss somewhere on the way and since congestion window is big (the
congestion window is big since TCP queue is very long so actually
packet loss is not that big). This burst of traffic probably takes
over the prioritized UDP traffic (it lasts about 13ms and sends 346 of
1516B packets).

However TCP takes over UDP for a good couple of seconds (3-4 seconds),
which seems to me a little longer than expected.

Do you have any suggestions why would HTB act like that in case of
such a big burst? Thus I thought it would be managed by burst/cburst
parameter.

Thanks in advance for any help.
Ewa

On Mon, Apr 18, 2016 at 11:31 AM, Ewa Janczukowicz
<janczukowicz.ewa@xxxxxxxxx> wrote:
> Hello,
> Thank you for your suggestions.
> @Andy
> I do not know if arp has anything to do here. Especially that the
> behaviour that I observe seems quite random. Sometimes it even works
> as expected.
>
> @Anton
> I have run the test again, and collected the statistics with tshark
> also before the enqueueing.
> So I do see a different behaviour than for outoing interface. Thus for
> incoming traffic TCP is close to zero for more than 40s, and later it
> increases.
> Whereas incoming udp traffic behaves as expected. Thus I observe the
> "stairs" trend.
>
> What suprises me is that I do not see any packet losses for udp on the
> outgoing interface.
> I share with you tc -s -d class show. However I do not know how to
> share tshark info on this mailing list.
>
> class htb 1:15 parent 1:1 leaf 50: prio 2 quantum 1000 rate 8bit ceil
> 1Mbit linklayer ethernet burst 225b/1 mpu 0b overhead 0b cburst
> 1600b/1 mpu 0b overhead 0b level 0
>  Sent 11912330 bytes 8133 pkt (dropped 749, overlimits 0 requeues 0)
>  rate 0bit 0pps backlog 0b 0p requeues 0
>  lended: 8 borrowed: 8125 giants: 0
>  tokens: -738824047 ctokens: 179250
>
> class htb 1:14 parent 1:1 leaf 20: prio 1 quantum 2550 rate 204Kbit
> ceil 1Mbit linklayer ethernet burst 1599b/1 mpu 0b overhead 0b cburst
> 1600b/1 mpu 0b overhead 0b level 0
>  Sent 11521440 bytes 7620 pkt (dropped 0, overlimits 0 requeues 0)
>  rate 0bit 0pps backlog 0b 0p requeues 0
>  lended: 2845 borrowed: 4775 giants: 0
>  tokens: 53919 ctokens: 11000
>
> class htb 1:1 root rate 1Mbit ceil 1Mbit linklayer ethernet burst
> 1600b/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 7
>  Sent 23433770 bytes 15753 pkt (dropped 0, overlimits 0 requeues 0)
>  rate 0bit 0pps backlog 0b 0p requeues 0
>  lended: 12900 borrowed: 0 giants: 0
>  tokens: 179250 ctokens: 179250
>
> Thank you in advance.
> Ewa
>
>
>
>
>
> On Fri, Apr 15, 2016 at 6:14 PM, Anton Danilov
> <littlesmilingcloud@xxxxxxxxx> wrote:
>> Hello, Ewa.
>>
>> Can you catch the traffic with NFLOG target and tcpdump before
>> enqueueing into device to investigate the original order of packets?
>> Also, it will be useful to check the statistics of classes (tc -s -s
>> -d class ls..). Can you share the some part of this data?
>>
>> 2016-04-12 16:17 GMT+03:00 Ewa Janczukowicz <janczukowicz.ewa@xxxxxxxxx>:
>>> 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
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe lartc" in
>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>>
>> --
>> Anton.
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux