Community discussions

MikroTik App
 
dzo
newbie
Topic Author
Posts: 27
Joined: Mon Feb 04, 2019 2:53 pm

Child Parent Queue example 4

Wed Jul 14, 2021 11:17 pm

Hello,

I can't understand one example I saw on some sites about QoS, here it is (https://wiki.mikrotik.com/wiki/Manual:H ... e_limit-at):
600px-HTB_Example4.png
The result might be:
  • Queue03 will receive ~3Mbps
  • Queue04 will receive ~1Mbps
  • Queue05 will receive ~6Mbps
Clarification: Only by satisfying all limit-ats HTB was forced to allocate 20Mbps - 6Mbps to Queue03, 2Mbps to Queue04, 12Mbps to Queue05, but our output interface is able to handle 10Mbps. As output interface queue is usually FIFO throughput allocation will keep ratio 6:2:12 or 3:1:6

OK so far, if there would be no parent queue02.

My considerations: The traffic for Queue01 is first devided between Queue03 with Limit-at 6M and Limit-at 4M for Queue02. This should work because of 10M Traffic in Queue01.
Queue04 and Queue05 should FIFO for the 4M of Queue02 (if Queue02 is type FIFO), and this might result in 4M/(12+2)M = 2/7M => 4/7M (~0.5Mbps) for Queue04 and 24/7M (~3.5Mbps) for Queue05. (And 6Mbps for Queue03, the consideration between Queue03 with Queue02 from Queue01)
Or is the Priority handeled with more weight as parent queue? Does FIFO of Queue01 not decide between Queues 03/02, only between Queues 03/04/05?

I do not understand, what is the meaning of Queue02, how are the limitations of Queue02 handled in this Example. In this example Queue02 is the only one who gets traffic more than the basic limit: Queue05 will receive 6Mbps, Queue04 will receive 1Mbps => Queue02 will transmit 7Mbps, more as its Limit-at!

What happens, if Queue02 also is Max-limit=4M?

Or, more interesting: If Queue02 would have Limit-at=2M, should Queue03 get 8M because Queue03 is priority=1 and Queue02 has with no priority the priority 8: Both limit-at are statisfied, and the rest comes to the higher priority.
You do not have the required permissions to view the files attached to this post.
 
dzo
newbie
Topic Author
Posts: 27
Joined: Mon Feb 04, 2019 2:53 pm

Re: Child Parent Queue example 4  [SOLVED]

Sat Aug 21, 2021 3:24 am

Hello everybody,

after a long study and experimentation I found an answer for the behavior of the system:
First, limit-at, the minimum speed of a queue, is priorized bevor any max-limit, the maximum speed.
On the wiki is a notification about it: https://wiki.mikrotik.com/wiki/Manual:H ... _Algorithm:
In case where limit-at is the highest value, extra tokens need to be issued to compensate for all missing tokens that were not borrowed from it's parent queue.
That means, normally a token (for bandwith) comes from the parents to the childs. It works with max-limit.
But in case of limit-at being bigger then max-limit, the tokens will not only be given to the childs - the parents got them also.
Here you see the behavior of the tokens as I expected, the example only with max-limit working:
Load Max.jpg
Here you can see, queue02 limits the traffic of queue04 and queue05. They share the tokens of the parent queue02.

But, and this is misleading, with limit-at none of the queues limits the bandwith. Only an external interface does, not queue01:
Load Example.jpg
You can see, none of the limits of queue02 nor queue01 does anything. The Avg. Rate of queue01 is 20Mbps, double the max-limit of 10Mbps. Same to Queue02, it means, the tokens are calculated from parent to child, and then the child produce more tokens for its limit-at - the child set the traffic. Or if you think, the traffic goes through every queue, you see that with a higher limit-at the parents get their tokens from the childs to fullfill the limit-at of the childs!!!
It surprised me, because the example implies for me queue01 would limit then, but it doesn't. Only if there is a hardware interface with limit 10Mbps, the example works. It does not work only with queues.

Now a test with queue02: It has a higher limit-at than the max-limit of its children, and with queue03 higher than the parent queue01:
parent queue.jpg
See:
  • The children queue04 and queue05 do not get the tokens produced from the parent queue02 (They are limited by their max-limit, so the limit-at of queue02 is not used - That is against the website's statement, the children would borrow their tokens from their parents "In case of a multi-level queue structure, tokens used in a child queue are also 'charged' to their parent queues. In other words - child queues 'borrow' tokens from their parent queues." - what they don't want to have, they do not get). If every limit-at would be fullfilled, the children would need to have more traffic. But they do not get tokens from their parents more than their own tokens.
  • Parent queue01 get the traffic of queue02 and queue03, so it has more traffic then queue01 max-limit.
I don't think this was new to the pros, but it was surprising to a newbie like me who just play with routerOS in his spare-time. Maybe it will help other people to understand the behavior of traffic-limits in the queues better.
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 62 guests