Queue Tree vs Simple Q's

Hello all I would like to thank you for your help in advance. I have a simple question. I am trying to both limit bandwith and utilize traffic shaping with 2.9.14 I have read my butt off on these forums and read through the manual several times and I need to clarify one item.

  1. If I create a simple Q (limiting bandwith and using bursting), and then create a Q tree (mangle certain ports for higher priority), when a connection is made to the router that matches both q’s what one takes priority? I am concerned with the bandwith limiting simple q’s being bypassed by the Q trees I have setup to accomidate traffic priority.

2.Also how does the Q type effect things? In this case the simple Q is a SFQ since I am using a wireless interface, however I have also setup a P2P mangle to limit the P2P traffic to 256k using a pcq type. When packets match the mangle for p2p is the SFQ no longer used? SFQ seems to be the best type for wireless medium however it cannot give the dynamic throttling like PCQ, does the router “wrap” one into the other?

Thanks for any light you can shine on this…

There are 4 place where queue can be placed

  1. global-in
  2. global-out
  3. global-total
  4. interface queue

Simple queue create 2 (3) queues one in global-in one in global-out (and if some “total” option is specified - in global-total).

So :

if simple queue and queue tree are in different places they both can shape this traffic

If simple queue and queue tree are in the same place traffic first will be taken by queue-tree

Can you show a simpe exampel of this? I tried several times, but cannot get it. Basicaly I have the same issue, i want to use simple queues for overall shaping of users, but aditionalu shape p2p for each of them to lower bandwidth/priority/number of connections.

I will give you main concept first:

|----------------------------1Mbps_total_limit------------------------------------|
|–p2p_traffic-----|--------------------other_traffic------------------------------|
(up to 128Kbps) (up to 1Mbps)


If you have only several users just use simple queue - create 1 parent queue with limitation 1Mbps and two child queues for p2p max-limit=128k for other traffic limit_at=768k max-limit=1M. So there will be 3 queues for each user


If you have more than 20 users you mshould create this kind of limitation using PCQ:

first in simple queue create 2 queues
a) for p2p_traffic create queue with priority=8 and pcq queue type with rate_limit=128k
b)for other_traffic create queue with priority=1 and pcq queue type with rate_limit=1M

So after this limitations (after globan-in and/or global-out queues) you have prioritize traffic - first is other_traffic only then goes p2p traffic.

At this point possible combinations are:

  1. 1M other + 128k p2p = 1128k total
  2. 0k other + 128k p2p = 128k total
  3. 1M other + 0k p2p = 1M total
  4. 845k other + 222k p2p = 1067k total … and so on…

So then we will use queue tree and on outgoing interface place a queue for all traffic with pcq rate of 1M. So the exceeded traffic will be droped from the p2p.