Page 1 of 1

simple queue fairness clarification

Posted: Thu Feb 22, 2007 9:01 am
by firebat
I need a quick clarification on simple queues. For an example, I have 10 simple queues rate limiting 10 users by IP in the network. All are set to approx the same max/min settings and all queues are at the same level. Will all of the users equally share the Bandwidth when they are simultaneosuly using their service? Or do I need to add a parent Simple queue for all of the users that rate limits all sub queues to the bandwidth of the outgoing (internet) interface?

Re: simple queue fairness clarification

Posted: Thu Feb 22, 2007 12:52 pm
by Diganet
I need a quick clarification on simple queues. For an example, I have 10 simple queues rate limiting 10 users by IP in the network. All are set to approx the same max/min settings and all queues are at the same level. Will all of the users equally share the Bandwidth when they are simultaneosuly using their service? Or do I need to add a parent Simple queue for all of the users that rate limits all sub queues to the bandwidth of the outgoing (internet) interface?
Every user will have a max bandwith of what you have setup in their respective queues. However if everybody uses their max bandwith and your connection is lower than that, you'll have to use PCQ for equal bandwith otherwise some users will have bad experience.

/Henrik

Posted: Fri Feb 23, 2007 5:38 am
by firebat
Do you mean that having a main simple queue limiting overall bandwidth and each user in a sub queue will not yield equal sharing amongst users?

Posted: Sat Feb 24, 2007 3:36 am
by firebat
? :D

Posted: Sat Feb 24, 2007 4:40 pm
by Diganet
? :D
You would have to make a Queuetree based on your WAN and LAN and make subqueues under that for both indcoming and outgoing. Easiest way to do this is to base the queues on mangled traffic from adress lists, otherwise you would need to make 2 queues for each user.

/Henrik

Posted: Sat Feb 24, 2007 11:32 pm
by firebat
So you are saying that there is no way to shape overall traffic on the outgoing interface (ingress/egress) for all users if you are using simple queues for limiting bandwidth for each users?

Posted: Sun Feb 25, 2007 9:22 am
by mneumark
Queue Tree can be used to totally manage bandwidth on a interface incoming or outgoing.

Posted: Sun Feb 25, 2007 9:58 am
by firebat
:cry: So what is my implementation going to accomplish that I proposed? Its not going to work? You can create simple queues as a PCQ type. I tried creating a queue tree on an interface in addition to simple queues limiting user BW but it didn't work.

Posted: Sun Feb 25, 2007 10:19 am
by mneumark
Can you share your settings that way we can see where you went wrong?

Posted: Sun Feb 25, 2007 10:49 am
by firebat
OK, This is what I was asking about originally:


I have a router with interfaces:

cloud: connected to internet (2MB connection)
ether1: connected to Access Point 1 (10MB Connection)
ether2: connected to Access Point 2 (10MB Connection)

I have created the following Simple Queues:

1. Cloud Queue using a defined PCQ Queue type limiting overall throughput on the Cloud interface to 2MB UP/Down:

name="cloud" dst-address=0.0.0.0/0 interface=Cloud parent=none \ direction=both priority=8 queue=My-PCQ/My-PCQ limit-at=2000000/2000000 \ max-limit=2000000/2000000 total-queue=default-small disabled=no


2. Ether1 queue for the ether1 interface connected to AP1. A PCQ type queue is used limiting overall BW to this port to 10MB up/down:

name="ether1" dst-address=0.0.0.0/0 interface=ether1 parent=none \ direction=both priority=8 queue=My-PCQ/My-PCQ limit-at=10000000/10000000 \ max-limit=10000000/10000000 total-queue=default-small disabled=no



3. Ether2 queue for the ether2 interface connected to AP2. A PCQ type queue is used limiting overall BW to this port to 10MB up/down:

name="ether2" dst-address=0.0.0.0/0 interface=ether2 parent=none \ direction=both priority=8 queue=My-PCQ/My-PCQ limit-at=10000000/10000000 \ max-limit=10000000/10000000 total-queue=default-small disabled=no



After completing this configuration, I am adding additional simple queues for users of AP1 and AP2 to limit Bandwidth for each user. For users of AP1, the parent queue is Ether1. For users of AP2, the parent queue is Ether2. Example of simple queue for AP1:

name="customer1" target-addresses=10.0.0.xx/32 dst-address=0.0.0.0/0 interface=all parent=ether1 direction=both priority=8 \ queue=default-small/default-small limit-at=0/0 max-limit=512000/1000000 burst-limit=512000/1000000 burst-threshold=512000/1000000 burst-time=10s/10s total-queue=default-small time=0s-1d,sun,mon,tue,wed,thu,fri,sat disabled=no


With this configuration, I am expecting the following to be true:

1. All traffic traversing the Cloud interface will be shaped to 2MB up/down and the Bandwidth will be equally shared across connections traversing this interface at times of congestion (due to the PCQ queue type of the cloud simple queue).

2. Traffic traversing either ether1 or ether2 interfaces will be shaped to 10MB up/down and all users will get equal shares of bandwidth through this interface at times of congestion (due to the PCQ queue type of the parent ether1/ether2 simple queue).



Folks are saying this will not work and I need to use a queue tree to shape and interface? What is the correct setting to add to the interfaces to shape them will still retaining simple queues to limit users bandwidth?

Posted: Sun Feb 25, 2007 8:33 pm
by marksx
to say that this will work or not you should paste mangle configuration...
There is catch with q simple & q tree in one box - yes that possible, but only in one (maybe there are more possibilites, but let assume that normal MT user don't want to know all the details regarding traffic flow, IMQ's, etc) specific case - you will take the _rest_ of that queue simple left to you.

I mean that you need to look at the traffic flow (in manual) diagram and prefectly set up chains in mangle and interfaces in queuetree to catch&queue _any_ packets.

Then there is another problem regarding to PCQ - yes it will make some "fair queueing" but only when your overbooking is low (you sell about what you have)
In situation (for example) where you have 2Mbps and 50 clients with 256Kbits - this will not work correctly in most cases
But if you have only 20-25 clients with 256Kbits - it shold work fine on 2Megabits

So...
I suggest you to make everything in Queue Tree, use SFQ instead od PCQ, try to guarantee traffic to provide "forced" fairness :-)
if you want i can help you little with this setup,
you can look into this thread and check my example setup of 2Mbits BM

http://forum.mikrotik.com/viewtopic.php?p=66062#66062

Posted: Mon Feb 26, 2007 3:22 am
by firebat
Thanks Marksx. For Simple Queues, you can specify the queue to be any type, just like Queue Trees. I still don't understand why you cant use hierarchial simple queues to achieve the same affect as queue trees? If I create a parent simple queue as type SFQ, shouldn't that work? The reason I was trying to avoid mangling using IP is I wanted to mangle for application type and use queue trees for application traffic prioritization. I don't think it is possible to mangle by user IP and application type at the same time.

I looked at your queue tree example in the thread you mentioned. You have to make separate queues for upload/downloan in the queue trees?

I'm just trying to understand how to continue to use simple queues for user BW limiting and then shape interfaces. I know you can use a combo of each but I can't make it work. :x

I'm about at the point of just sticking in another router and do the shaping on it.

Posted: Mon Feb 26, 2007 6:24 am
by sten
the answer to your question 'firebat' is yes, you need to put the queues into a parent queue (which is the ceiling) for there to be fairness. otherwise they would just be X number of independent queues with no specific fairness.

Posted: Mon Feb 26, 2007 9:07 am
by firebat
OK. Maybe no one is reading what i wrote above. I said I have a parent simple queue that all other queuse are a child of. The child queues are limited bandwidth for users. The parent queue is what I had a question about with fairness. I can make the parent queue a PCQ, SFQ, whatever type you want. Will this work or not?

If it won't, can someone help me with specifying the queue tree config for shaping an interface while still retaining simple quese for bandwidth limiting (I don't think you mangle both IP and applciation (VoIP, FTP,etc) type at the same time).

Posted: Mon Feb 26, 2007 10:08 am
by mrz
PCQ. SFQ or whatever type does not work on parent queues. It works only on child queue.

Posted: Mon Feb 26, 2007 7:01 pm
by marksx
the answer to your question 'firebat' is yes, you need to put the queues into a parent queue (which is the ceiling) for there to be fairness. otherwise they would just be X number of independent queues with no specific fairness.
yes, that was my point

You have to make separate queues for upload/downloan in the queue trees?
yes
I'm about at the point of just sticking in another router and do the shaping on it.
that's the good idea, especialy if you will make two different shapes type in these routers (like first for limit per user, and second one for QoS/services limit)

Posted: Tue Feb 27, 2007 7:00 am
by firebat
Thanks. OK..So can someone help with the queue tree config just to limit Bandwidth per interface while retaining the simple queues for user bandwidth limiting? I'll do the shaping elsewhere. Basically, I need to limit interfaces to 10mb/sec so as not to overload a backhaul.

Posted: Wed Feb 28, 2007 4:52 am
by firebat
PCQ. SFQ or whatever type does not work on parent queues. It works only on child queue.
So, you can specify a simple queue as PCQ.SFQ, etc. That will not have the same as a queue tree using SFQ?

Posted: Wed Feb 28, 2007 6:41 am
by jwcn
In your simple queues are you using "limit at" or "max limit"?

Posted: Wed Feb 28, 2007 7:16 am
by firebat
Max limit but I can set limit at also...at unlimited currently. I could set to the bare min in limit at for all users and set queue type as SFQ?

Posted: Sat Mar 03, 2007 7:37 am
by firebat
? :?