Community discussions

MikroTik App
 
rodolfo
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Sat Jul 05, 2008 11:50 am

QOS: setmax-limit to full bandwidth ?

Wed Dec 30, 2009 10:43 pm

Hi all.
In my qos implemetation (I have a 30Mbit internet connection shared to 700 users) I mark different types of traffic then I give more or less priority to the different types.

The sum of Limit-At of all queues is = 30.
I have limited also max-limit for each queue but I don know if this is a good idea:
could it be better to set max-limit of each queue to 30Mbit (full bandwidth) ?

In this case, each queue could reach the maximum bandwidth, and each queue figth with its own priority.

Is this correct ?

thanks
rodolfo
IZ0UQV
 
rmichael
Forum Veteran
Forum Veteran
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: QOS: setmax-limit to full bandwidth ?

Thu Dec 31, 2009 4:33 am

Each queue, after satisfying limit-at will contend for bandwidth based on priority. You'll need to set max-at (at least in the root queue) for HTB to work. Btw, priority QOS only works on leaf queues.

More info here:
http://wiki.mikrotik.com/wiki/HTB
 
rodolfo
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Sat Jul 05, 2008 11:50 am

Re: QOS: setmax-limit to full bandwidth ?

Thu Dec 31, 2009 10:35 am

thanks rmichael.
do you think in my implementation there is something wrong ?
queue in.jpg
You do not have the required permissions to view the files attached to this post.
rodolfo
IZ0UQV
 
rmichael
Forum Veteran
Forum Veteran
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: QOS: setmax-limit to full bandwidth ?

Thu Dec 31, 2009 6:25 pm

I'm still learning this stuff, but it looks OK to me. Next, I would suggest that you look at your queues and see how many packets they drop.

Normally you want to drop as little as possible for down traffic and low priority traffic first for uploads.

To maximase bandwidth use for tcp traffic make sure that you don't drop ACK, SYN-ACK packets - you should propably put them in a separate, high priority queue. That way you can also monitor and act on SYN flood.

Michael
 
rodolfo
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Sat Jul 05, 2008 11:50 am

Re: QOS: setmax-limit to full bandwidth ?

Fri Jan 01, 2010 12:20 pm

I added this mangle rule:
add action=mark-connection chain=forward disabled=no \
new-connection-mark=SYSTEM-CONN passthrough=yes protocol=tcp  \
tcp-flags=syn,ack 
Then I mark the packets to fall in an high priority queue.

If a queue drops too many packets (and is a download queue), is a good idea to enlarge the buffer size ?

Thanks
rodolfo
IZ0UQV
 
rmichael
Forum Veteran
Forum Veteran
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: QOS: setmax-limit to full bandwidth ?

Fri Jan 01, 2010 8:09 pm

If a queue drops too many packets (and is a download queue), is a good idea to enlarge the buffer size ?
Yes for TCP flows, generally no for UDP flows. Try to tune so packets of low importance get dropped first.

EDIT:
To get a good starting point for queue size calculate bandwidth-delay-product * 2 / [avg packet size]

bdp calc can be found here:
http://www.speedguide.net/bdp.php
 
rodolfo
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Sat Jul 05, 2008 11:50 am

Re: QOS: setmax-limit to full bandwidth ?

Sat Jan 02, 2010 12:27 am

Is very clear, thank you.

Now I have a doubt: how fast is the queue tree system when all available bandwidth is used ?
Suppose all 30Mbit are used for download because no other users browse or voip.
At this moment, one sip incoming call begin its stream.
Does queue tree give immediately high priority to this connection ? (supposing cpu not at 100%)

If yes, all Limit-at coud be = 30Mbit.
In not, I must be aware to give all bandwidth to low priority connections.

thanks
rodolfo
IZ0UQV
 
rmichael
Forum Veteran
Forum Veteran
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: QOS: setmax-limit to full bandwidth ?

Sat Jan 02, 2010 4:30 am

If yes, all Limit-at coud be = 30Mbit.
In not, I must be aware to give all bandwidth to low priority connections.
I think you mean limit-at could be =0. If you assign 30Mbit to a queue it will act as if had the highest priority.

For downloads you're at the mercy of TCP or UDP backoff algorithm as packets arrive before HTB has a chance to work it's magic (or do what you told it to do :) ). To keep download stream ready you need to proactively try to shape flows by dropping packets, queuing (so you propably want the sum of your bulk traffic to be <30Mbit.
 
norocel
newbie
Posts: 29
Joined: Mon Sep 04, 2006 12:03 am

Re: QOS: setmax-limit to full bandwidth ?

Sun Jan 03, 2010 5:58 pm

thanks rmichael.
do you think in my implementation there is something wrong ?
queue in.jpg
rodolfo, can you post here your mangle and queue three ?
im interested,
10x in advance
 
magnavox
Member
Member
Posts: 344
Joined: Thu Jun 14, 2007 1:03 pm

Re: QOS: setmax-limit to full bandwidth ?

Sun Mar 21, 2010 10:02 am

+1, can you post your working mangle rules?

tnx ;)
Best Regards...
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3094
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: QOS: setmax-limit to full bandwidth ?

Thu Mar 25, 2010 1:36 am

I added this mangle rule:
add action=mark-connection chain=forward disabled=no \
new-connection-mark=SYSTEM-CONN passthrough=yes protocol=tcp  \
tcp-flags=syn,ack 
Then I mark the packets to fall in an high priority queue.

Thanks
Michael, Rodolfo: I have a question on this; I mangle on the prerouting chain since I mangle client traffic for shaping in the forward chain.
Should I now mangle these tcp flags in the public or the local interface? I only see traffic on the local interface though...

Then, would it not be enough to mark the packages only? The flags state belong to a connection I believe, by marking the connection are we now not marking the whole tcp connection? And thus ALL tcp traffic gets the mark and following queue. This would be unwanted?

I am still trying to fine tune my Qos and my eye fell on this topic with this new info.
Any further comment is very appreciated.

Who is online

Users browsing this forum: No registered users and 115 guests