Community discussions

MikroTik App
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 886
Joined: Mon Jun 06, 2005 6:48 am

PCQ limit & total limit settings

Sat Mar 03, 2007 8:35 am

Hello

By default when you specify a queue type pcq limit is 50 and total limit is 2000

What pipe size/number of customers is this tuned for?

I don't limit my customers but want to have fair sharing.

What would be good for 500 customers & a 4 Meg pipe? (running flat-out all the time)

Thanks :-)
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Fri Dec 12, 2008 11:25 am

Bump. All need extended maximum explanation to pcq-limit and pcq-total-limit. In WiKi. By Janis & Normis preferably.
 
mknnoc
Trainer
Trainer
Posts: 229
Joined: Thu Feb 28, 2008 6:40 am
Location: cambodia

Re: PCQ limit & total limit settings

Fri Dec 12, 2008 12:01 pm

 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Fri Dec 12, 2008 1:00 pm

It's not explained in maximum detail. All possible scenarios must be covered. PCQ behavior is much more complex than what is talked about in the PDF as I have tested. :)
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: PCQ limit & total limit settings

Fri Dec 12, 2008 1:50 pm

what else you need? (check slide 26 in janism presentation)

if you have question - then ask direct question - not overall - need to look for more detail...
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26368
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: PCQ limit & total limit settings

Fri Dec 12, 2008 1:52 pm

It's not explained in maximum detail. All possible scenarios must be covered. PCQ behavior is much more complex than what is talked about in the PDF as I have tested. :)
The week before MUM Europe 2009, Janis M. will teach the Bandwidth Management training class for 4 days, You are welcome to join us there: http://www.mikrotik.com/training.php

P.S: only note! Attendance of previous Training Class either by MikroTik or our Certified Trainers is required to sign up for this class
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Fri Dec 12, 2008 6:14 pm

Please, if someone attends training, post useful material in WiKi afterward. Some PDFs + a little explanation would be great. :) he he.

P.S. I am planning to become a certified consultant but now is too early for these classes. Thanks.
 
sandman
newbie
Posts: 37
Joined: Sat Apr 07, 2007 2:13 am

Re: PCQ limit & total limit settings

Fri Dec 12, 2008 9:52 pm

You shouldn't have to attend a training seminar to understand PCQ or other parts of Mikrotik RouterOS. Better documentation is all that is needed. But for whatever reason, Mikrotik would rather charge you for a training seminor and not answer your questions.....
 
User avatar
samsoft08
Long time Member
Long time Member
Posts: 613
Joined: Sat Nov 26, 2005 10:52 pm

Re: PCQ limit & total limit settings

Sun Dec 14, 2008 2:48 am

I think training is good ONLY for people who dont have free time to read the manual , wiki and whts going on in this forum ..

what else except repeating the manual ?

I have a question about simple Q :

as you know simple q's are processed acording to thier order , but they got priority value also , so what if rule No 1 got priority =8 , last rule lets say No 200 got priority = 1 ? which is the important here ? order or priority ?
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Sun Dec 14, 2008 3:39 am

My current understanding (untested) is that: In the case of Simple Queues, the order is for 'catching traffic' (mangle) and the priority is for packet rearrangement in the HTB.
 
sandman
newbie
Posts: 37
Joined: Sat Apr 07, 2007 2:13 am

Re: PCQ limit & total limit settings

Mon Dec 15, 2008 1:47 am

I understand that PCQ Limit sets how many packets each dynamic queue can hold. The default is 50, so each dynamic queue created can hold up to 50 packets before dropping new packets. What affect (good and bad) does adjsuting the PCQ Limit Up or Down have? I understand it uses more memmory if you increase it, but performance differences is what I'm curious about.

Also what happens if you max your PCQ Total Limit out? PCQ Total Limit is set to 2000 by default. If I understand the information I read, PCQ Total Limit defines the TOTAL number of packets that set of PCQ queues can handle. So, if you do the math, the default PCQ Limit of 50 and Total Limit of 2000 is good for up to 40 concurrent users, assuming they are all being queued at the same time. So what happens if you max your PCQ Total Limit setting out? Are all new packets dropped until there is less then PCQ Total Limit packets in the queue? I would assume this would cause some bad performance in that queue?
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Mon Dec 15, 2008 2:14 am

I guess they are not dropped but queued with the next pcq cycle and the first ones are sent up the tree/out to interface.

But why waste energy guessing when MIKROTIK IS RESPONSIBLE FOR documenting it !!!

Normis, Janis, Sergej, please.

PCQ---> "MikroTik prorietary"


TELL US HOW IT WORKS.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: PCQ limit & total limit settings

Mon Dec 15, 2008 11:57 am

you know everything you should know.

and apply your networking knowledge - what happens if queue is full - packets are dropped, because, there is no place to put them.

so, TCP traffic is important one, and as you know, when tcp packet is dropped, it is resend again, after some time, therefore, TCP knows, that you have to send packets at slower rate.

and if you check out manual and articles, and presentations - you get all the information we can give you about PCQ.

while some say - that mikrotik is pushing for training - well, it is not so, because in training you get a lot of additional experience that lecturer has. And of course, we are working to improve our manual, that you can find on wiki.
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Mon Dec 15, 2008 12:03 pm

...what happens if queue is full - packets are dropped, because, there is no place to put them.

so, TCP traffic is important one, and as you know, when tcp packet is dropped, it is resend again, after some time, therefore, TCP knows, that you have to send packets at slower rate....
Thank you for answering our question :)

I hope you can help with some much more complex questions in the future, in the forum.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26368
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: PCQ limit & total limit settings

Wed Dec 17, 2008 4:25 pm

maybe this new article will give you some insight:
http://wiki.mikrotik.com/wiki/Queue_Size
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Wed Dec 17, 2008 9:20 pm

Thanks :) Give us more! Maybe some PCQ diagrams and charts?
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: PCQ limit & total limit settings

Thu Dec 18, 2008 8:44 am

 
mknnoc
Trainer
Trainer
Posts: 229
Joined: Thu Feb 28, 2008 6:40 am
Location: cambodia

Re: PCQ limit & total limit settings

Thu Dec 18, 2008 9:01 am

maybe this new article will give you some insight:
http://wiki.mikrotik.com/wiki/Queue_Size
Queue Size=Unlimited, Is it good for UDP or Voice?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: PCQ limit & total limit settings

Thu Dec 18, 2008 9:08 am

how it can be good?

how huge queue size - resulting in high latency, if there is a lot of traffic and queues are heavily used, will improve your VoIP?

it goes like this - bigger the queue, more packets queued, more latency, more latency.

out of order udp AFAIK is dropped
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Thu Dec 18, 2008 2:09 pm

That is there yes, but this discussion is about limit and total limit.

There is just a little in janism.pdf about it, but what we really want NOW is results of experiments with pcq-limit and pcq-total limit presented in color graphic + short explanations. Thank you.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1764
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: PCQ limit & total limit settings

Mon Dec 22, 2008 12:36 pm

tatal-limit= limit*<number of PCQ substreams>

400 client, and limit=50 ---> total-limit=20000

More info on limit (or queue size) is here:
http://wiki.mikrotik.com/wiki/Queue_Size
 
cartes
newbie
Posts: 41
Joined: Fri Oct 12, 2007 12:23 am

Re: PCQ limit & total limit settings

Thu Jan 01, 2009 4:54 pm

Hi,

This is an interesting discussion. To answer Janisk about a more specific requirement, my scenario is as follows:

Total BW is 10 Mbps, and total 500 customers

3 Classes of Shared Clients (kbps down / kbps up)
SC1 => 512 / 128
SC2 => 256 / 64
SC3 => 128 / 64

2 Classes of Dedicated Clients (kbps down / kbps up)
DC1 => 512 / 256
DC2 => 256 / 128

From your excellent PDF attachment, I can understand how max-limit works when I've got only one PCQ defined. But, how do I make sure that my 10 Mbps is always fully utilized in this scenario? I would like to use the "unused" BW of when the DCs are not using it. And, I would also like to keep the 10 Mbps to a Flat Line if possible. Am I asking for too much?

Thank you in advance for your valuable input.
 
dot-bot
Member Candidate
Member Candidate
Posts: 164
Joined: Tue Oct 11, 2005 7:05 pm

Re: PCQ limit & total limit settings

Fri Jan 02, 2009 4:27 am

Yeah my scenario is similar, I need to know as well, please.
 
cartes
newbie
Posts: 41
Joined: Fri Oct 12, 2007 12:23 am

Re: PCQ limit & total limit settings

Fri Jan 02, 2009 4:49 am

I just found another post in the forum:
http://forum.mikrotik.com/viewtopic.php?f=2&t=27555
which has some interesting suggestions. I'll try to get my hands wet using these principles in the coming days and let you know how it goes. In the meantime, if you do get around doing these things, I would be ever grateful if you could please post your partial configs on the forum.
 
Benik3
newbie
Posts: 49
Joined: Thu Apr 04, 2013 11:41 am

Re: PCQ limit & total limit settings

Sun Feb 23, 2014 1:58 pm

OK, I get how Limit and Total-Limit works, but I have one question.
Are the limits calculated for each queue (simple/tree) or for whole type?

I mean, If I will create queue type PCQ_Up and PCQ_Down with Limit 2000
And then in queue simple or tree I will make queue for 10.0.1.0/24 and 10.0.2.0/24 (each has also own mangle) both with same PCQ_Up and PCQ_Down, will the Limit be for both together or 2000 for each?

Thanks :)
 
User avatar
NetworkPro
Forum Guru
Forum Guru
Posts: 1376
Joined: Mon Jan 05, 2009 6:23 pm
Location: bit.ly/the-qos
Contact:

Re: PCQ limit & total limit settings

Tue Feb 25, 2014 1:32 pm

should be 2000 for each bro
 
Joseph79
newbie
Posts: 43
Joined: Thu Aug 22, 2013 11:36 am

Re: PCQ limit & total limit settings

Tue Feb 25, 2014 7:27 pm

I think I have a problem with my simple queues too. I have a hotspot with users coming in which goes forwarded to squid.
what happens is that theres an allocated queue per user from radius as every one knows. my allocated profiles are 20mb down 512up

after a few minutes logging it is fast then it all slows down to a trickle then nothing. then I remove the queue it speeds up to normal.

what am i doing wrong ???

Need this to work correctly
 
wispwest
Member
Member
Posts: 479
Joined: Tue May 19, 2009 3:48 am

Re: PCQ limit & total limit settings

Fri Mar 27, 2015 12:01 am

I've spent the whole afternoon trying to understand this, I opened tabs on all the links supplied in THIS thread, but before that I was stuck with the mikrotik WiKi, which doesn't fully explain the Limit and Total Limit and if it applies to 'each' sub-stream or the total substreams.

We have a rb1100ah that I just had to upgrade to a 1100AHx2, because CPU is pegged at 100% during peak hours.

There's about 600 simple queues, most of which are now converted to PCQ's, about 4 different /24 private IP blocks, and a few /28 and /27's. We setup 10 different PCQ for down/up, and I'm wondering now if leaving the default Limit:50 and Total Limit: 2000 is the problem?

Let's say your creating a PCQ for 7Mb Download rate, and you figure you'll set this to about 300 simple queues. Does the Limit and Total Limit need to be increased??
 
Benik3
newbie
Posts: 49
Joined: Thu Apr 04, 2013 11:41 am

Re: PCQ limit & total limit settings

Fri Mar 27, 2015 12:48 am

Try this:
The pcq-limit you can leave 50 and the pcq-total-limit is pcq-limit multiplied by number of connections (so e.g. for /24 it's 12700).
Works fine for me :)
 
manuelm
newbie
Posts: 36
Joined: Sat Feb 15, 2014 10:37 pm

Re: PCQ limit & total limit settings

Tue Nov 22, 2016 10:14 pm

Hi Everyone,

I'm also trying to understand the PCQ limit and Total-limit options. What should I do in the following scenario?

Internet Service. Max Download 100Mbps and max Upload 10Mbps. 50 Daily users watching youtube.

The following Queue Types are applied to the Queue Tree. On this case we are limiting each users to 10Mbps down\1Mbps up.
PCQ_Down rate 10M, limit 50, total-limit 2000
PCQ_Up rate 1M limit 50, total-limit 2000

1. Should I increase the limit and total-limit to prevent the packets from been drop and queue them instead?
2. How do I calculate the limit and total-limit for this scenario?
 
Benik3
newbie
Posts: 49
Joined: Thu Apr 04, 2013 11:41 am

Re: PCQ limit & total limit settings

Tue Nov 22, 2016 11:21 pm

I don't know exactly the impact of PCQ-limit, but PCQ-total-limit can be set as I mentioned above - limit*numbers of connection to limit.
So with limit 50 and 50 users I would set total-limit to 2500.

Try and watch :)
 
manuelm
newbie
Posts: 36
Joined: Sat Feb 15, 2014 10:37 pm

Re: PCQ limit & total limit settings

Tue Nov 22, 2016 11:59 pm

pcq-limit (number) : queue size of single sub-stream (in KiB)
pcq-total-limit (number) : maximum amount of queued data in all sub-streams (in KiB)

Why 50KiB and not more. I still see a high packet dropped if I leave the limit at 50. The Total-Limit doesn't seem to make a difference on this case maybe because I'm not reaching the total-limit.
If I change the limit to 2000KiB, the packet dropped decreases.
I'm trying to figure out how to calculate the limit and total limit. I really don't like the guessing game, because I don't know if what I set will be right or not.
 
hjf
newbie
Posts: 27
Joined: Sun Feb 10, 2008 9:32 pm

Re: PCQ limit & total limit settings

Mon Dec 19, 2016 4:27 pm

pcq-limit (number) : queue size of single sub-stream (in KiB)
pcq-total-limit (number) : maximum amount of queued data in all sub-streams (in KiB)

Why 50KiB and not more. I still see a high packet dropped if I leave the limit at 50. The Total-Limit doesn't seem to make a difference on this case maybe because I'm not reaching the total-limit.
If I change the limit to 2000KiB, the packet dropped decreases.
I'm trying to figure out how to calculate the limit and total limit. I really don't like the guessing game, because I don't know if what I set will be right or not.
Packet dropping IS how you shape bandwidth. It means your client is sending too fast so you are dropping to throttle him. You WANT dropped packets. Don't change the queue size.
 
manuelm
newbie
Posts: 36
Joined: Sat Feb 15, 2014 10:37 pm

Re: PCQ limit & total limit settings

Thu Dec 22, 2016 5:25 am

pcq-limit (number) : queue size of single sub-stream (in KiB)
pcq-total-limit (number) : maximum amount of queued data in all sub-streams (in KiB)

Why 50KiB and not more. I still see a high packet dropped if I leave the limit at 50. The Total-Limit doesn't seem to make a difference on this case maybe because I'm not reaching the total-limit.
If I change the limit to 2000KiB, the packet dropped decreases.
I'm trying to figure out how to calculate the limit and total limit. I really don't like the guessing game, because I don't know if what I set will be right or not.
Packet dropping IS how you shape bandwidth. It means your client is sending too fast so you are dropping to throttle him. You WANT dropped packets. Don't change the queue size.
Rate limitation consist of two things: dropping and delaying.
I know that dropping is how you rate limit, but I'm trying to understand rate equalizing. The limit and total limit will delay the packets instead of dropping them. I'm just trying to find the balance between the two.
 
Rhobro
just joined
Posts: 5
Joined: Thu Dec 22, 2016 10:18 am

Re: PCQ limit & total limit settings

Tue Jan 17, 2017 10:11 am

Packet dropping IS how you shape bandwidth. It means your client is sending too fast so you are dropping to throttle him. You WANT dropped packets. Don't change the queue size.
First , you queue the packets before dropping them, that's what the limit is there for.
If the queue is too big, you get a higher latency, if it's too small you get a high rate of packet loss


Personally, I would try to solve this via trial and error
If the default 50KiB aren't sufficient and you get a high rate of packetloss, you should consider raising your limit (and total-limit based on your network ofc)

That's at least my understanding
 
anil
newbie
Posts: 42
Joined: Sun Feb 26, 2017 5:48 pm
Location: Nepal
Contact:

Re: PCQ limit & total limit settings

Sun Sep 15, 2019 11:37 am

what else you need? (check slide 26 in janism presentation)

if you have question - then ask direct question - not overall - need to look for more detail...
Hello, How to find out what value to put on set limit and total limit on QOS
You do not have the required permissions to view the files attached to this post.
 
ted834r
just joined
Posts: 1
Joined: Wed Nov 06, 2019 7:38 am

Re: PCQ limit & total limit settings

Wed Nov 06, 2019 7:41 am

I guess they are not dropped but queued with the next pcq cycle and the first ones are sent up the tree/out to interface.

But why waste energy guessing when MIKROTIK IS RESPONSIBLE FOR documenting it !!!

Normis, Janis, Sergej, please.

PCQ---> "MikroTik prorietary"


TELL US HOW IT WORKS.
Two thumbs up ---- In a closet waiting for response

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], ldyte1 and 69 guests