Community discussions

MikroTik App
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

My Story with PCQ .. and high latency

Thu Apr 19, 2012 1:38 am

Hi Friends

i believe that most Mikrotik users depend on Megis QOS in Managing the networks QOS but for months of testing and using Megis policy "that i found it the best choice " the users faced haigh latency when they download files or browse normal web sites like youtube , facebook .. etc and this is affect on the over all performance of the service delivered to the end user , bellow my config


Mangle
3   ;;; Basic Conn
     chain=forward action=mark-connection new-connection-mark=Basic conn passthrough=yes src-address-list=hqbasic 

 4   ;;; Bussiness Conn
     chain=forward action=mark-connection new-connection-mark=Buss conn passthrough=yes src-address-list=hqbusiness 

 5   ;;; Super Conn
     chain=forward action=mark-connection new-connection-mark=Super conn passthrough=yes src-address-list=hqsuper 

 6   ;;; Std Conn
     chain=forward action=mark-connection new-connection-mark=Std conn passthrough=yes src-address-list=hqstd 

 7   ;;; Normal Conn
     chain=forward action=mark-connection new-connection-mark=Normal conn passthrough=yes src-address-list=hqnormal 

 8   ;;; Basic Packets
     chain=forward action=mark-packet new-packet-mark=Basic Packets NEW passthrough=no connection-mark=Basic conn 

 9   ;;; Normal Packets
     chain=forward action=mark-packet new-packet-mark=Normal Packets NEW passthrough=no connection-mark=Normal conn 

10   ;;; Std Packets
     chain=forward action=mark-packet new-packet-mark=Std Packets NEW passthrough=no connection-mark=Std conn 

11   ;;; Bussiness Packets
     chain=forward action=mark-packet new-packet-mark=Business Packets NEW passthrough=no connection-mark=Buss conn 

12   ;;; SUPER Packets
     chain=forward action=mark-packet new-packet-mark=Super Packets NEW passthrough=no connection-mark=Super conn

queue Types
 5   name="Basic Down" kind=pcq pcq-rate=80k pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s 
     pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

 6   name="Normal Down" kind=pcq pcq-rate=200k pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 
     pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

 7   name="Std Down" kind=pcq pcq-rate=500k pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=20000 pcq-burst-rate=700k pcq-burst-threshold=500k 
     pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

 8   name="Business Down" kind=pcq pcq-rate=700k pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=200000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s 
     pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

 9   name="Super Down" kind=pcq pcq-rate=1M pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=200000 pcq-burst-rate=0 pcq-burst-threshold=0 
     pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

10   name="Basic Up" kind=pcq pcq-rate=500k pcq-limit=50 pcq-classifier=src-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s 
     pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

11   name="Normal Up" kind=pcq pcq-rate=1M pcq-limit=50 pcq-classifier=src-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s 
     pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

12   name="Std Up" kind=pcq pcq-rate=2M pcq-limit=50 pcq-classifier=src-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s 
     pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

13   name="Business Up" kind=pcq pcq-rate=2M pcq-limit=50 pcq-classifier=src-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s 
     pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

14   name="Super Up" kind=pcq pcq-rate=5M pcq-limit=50 pcq-classifier=src-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s 
     pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64 

queue Tree
0   name="Total Down" parent=global-out packet-mark="" limit-at=0 priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

 1   name="Total Up" parent=ether1 packet-mark="" limit-at=0 priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 


 3   name="Basic UP" parent=Total Up packet-mark=Basic Packets NEW limit-at=0 queue=Basic Up priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

 4   name="normal_queue" parent=Total Down packet-mark=Normal Packets NEW limit-at=0 queue=Normal Down priority=6 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

 5   name="std_queue" parent=Total Down packet-mark=Std Packets NEW limit-at=0 queue=Std Down priority=4 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

 6   name="business_queue" parent=Total Down packet-mark=Business Packets NEW limit-at=0 queue=Business Down priority=2 max-limit=0 burst-limit=0 burst-threshold=0 
     burst-time=0s 

 7   name="super_queue" parent=Total Down packet-mark=Super Packets NEW limit-at=0 queue=Super Down priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

 8   name="Normal Up" parent=Total Up packet-mark=Normal Packets NEW limit-at=0 queue=Normal Up priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

 9   name="Std Up" parent=Total Up packet-mark=Std Packets NEW limit-at=0 queue=Std Up priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

10   name="Business up" parent=Total Up packet-mark=Business Packets NEW limit-at=0 queue=Business Up priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 

11   name="Super Up" parent=Total Up packet-mark=Super Packets NEW limit-at=0 queue=Super Up priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
 
0ldman
Forum Guru
Forum Guru
Posts: 1465
Joined: Thu Jul 27, 2006 5:01 am

Re: My Story with PCQ .. and high latency

Thu Apr 19, 2012 11:30 pm

I looked over your queues, didn't have a lot of time to go over it well.

This is what I use, probably an older version. Essentially, the first 2MB is priority of 4, after that it drops to 7. This keeps latency fairly level. Obviously, tune to your own requirements.

I did not include the L7 info. I can provide that if needed. This may be incomplete.
/ip firewall mangle add chain=forward protocol=tcp action=mark-connection new-connection-mark=new_conn passthrough=yes comment="mark all new connections" disabled=no
/ip firewall mangle add chain=forward protocol=tcp connection-mark=new_conn connection-bytes=0-2000000 action=mark-packet new-packet-mark=new_packet passthrough=no comment="mark packets" disabled=no
/ip firewall mangle add chain=forward protocol=tcp connection-mark=new_conn action=mark-packet new-packet-mark=old_packets passthrough=no comment="marking old packets" disabled=no

/queue type add name="PCQ_Upload" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
/queue type add name="PCQ_Download" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000 
/queue tree add name="Main_Upload" parent=global-in packet-mark="" limit-at=0 queue=PCQ_Upload priority=8 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="4 Up First 2Mbyte" parent=Main_Upload packet-mark=new_packet limit-at=256000 queue=PCQ_Upload priority=4 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="7 Up Rest Mbytes" parent=Main_Upload packet-mark=old_packets limit-at=256000 queue=PCQ_Upload priority=7 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="Main_Download" parent=global-out packet-mark="" limit-at=0 queue=PCQ_Download priority=8 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="4 Down First 2Mbyte" parent=Main_Download packet-mark=new_packet limit-at=256000 queue=PCQ_Download priority=4 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="7 Down Rest Mbytes" parent=Main_Download packet-mark=old_packets limit-at=256000 queue=PCQ_Download priority=7 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="ICMP" parent=APBridge packet-mark=icmp_pack limit-at=0 queue=default priority=3 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="8 Down P2P" parent=Main_Download packet-mark=p2p_pack limit-at=64000 queue=PCQ_Download priority=8 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="8 Up P2P" parent=Main_Upload packet-mark=p2p_pack limit-at=64000 queue=PCQ_Upload priority=8 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="1 SIP Down" parent=Main_Download packet-mark=sip_pack limit-at=256000 queue=PCQ_Download priority=1 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
/queue tree add name="1 SIP Up" parent=Main_Upload packet-mark=sip_pack limit-at=256000 queue=PCQ_Download priority=1 max-limit=50000000 burst-limit=0 burst-threshold=0 burst-time=0s 
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: My Story with PCQ .. and high latency

Sun Apr 29, 2012 5:28 pm

i have tried same QOS already , i even make firs 1 Mbyte go as free without limit but this is didn't fix the latency and poor performance problem.
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: My Story with PCQ .. and high latency

Wed May 02, 2012 4:03 pm

nothing :)
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: My Story with PCQ .. and high latency

Thu May 03, 2012 1:12 pm

and still nothing :)
 
0ldman
Forum Guru
Forum Guru
Posts: 1465
Joined: Thu Jul 27, 2006 5:01 am

Re: My Story with PCQ .. and high latency

Fri May 04, 2012 1:49 am

It works for me.

The only time I have a latency issue now is if I have poor signal somewhere.

Have you adjusted the max speeds per queue to prevent the latency issues?
 
hel
Member Candidate
Member Candidate
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: My Story with PCQ .. and high latency

Fri May 04, 2012 1:51 am

Mikrotik doesn't have low latency prioritization. To be honest, I didn't see any effectiveness of the current prioritization system.
You could show your interest in the LLQ (Low Latency Queueing) feature implementation here: http://wiki.mikrotik.com/wiki/MikroTik_ ... e_Requests
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: My Story with PCQ .. and high latency

Fri May 04, 2012 3:36 am

i'm testing on LAN network so nothing releated to the signal

regarding to max speed per queue i didn't get you , can you pls more explain .

It works for me.

The only time I have a latency issue now is if I have poor signal somewhere.

Have you adjusted the max speeds per queue to prevent the latency issues?
 
0ldman
Forum Guru
Forum Guru
Posts: 1465
Joined: Thu Jul 27, 2006 5:01 am

Re: My Story with PCQ .. and high latency

Fri May 04, 2012 9:25 am

You have PCQ Down main, then 4 sub queues below that.

Say you have 10Mb, you want to set the main down at 10Mb, SIP traffic to whatever is appropriate, if you have lot of users, probably 7Mb. For your first down or up, set it to 9500k, for the down rest set it to 8Mb or so, P2P set whatever you wish. Do the same for your upload, say main is 1Mb, first is 900k, rest is 800k, etc.

You can tweak this to your network and your specific needs. Basically you want to never quite use all of your bandwidth. You can set the "rest" down and up higher or lower, just make sure one sub queue can never fill the main queue.
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: My Story with PCQ .. and high latency

Mon May 07, 2012 11:12 am

i'm talking on different scenario , what i'm doing is limit the users into classes , "Economy class , Standard Class , business and super "each user will get the rate "Speed" of the specific class , and the Total Queue in tree is unlimited so the priority u talk about will not work .


Regards
You have PCQ Down main, then 4 sub queues below that.

Say you have 10Mb, you want to set the main down at 10Mb, SIP traffic to whatever is appropriate, if you have lot of users, probably 7Mb. For your first down or up, set it to 9500k, for the down rest set it to 8Mb or so, P2P set whatever you wish. Do the same for your upload, say main is 1Mb, first is 900k, rest is 800k, etc.

You can tweak this to your network and your specific needs. Basically you want to never quite use all of your bandwidth. You can set the "rest" down and up higher or lower, just make sure one sub queue can never fill the main queue.
 
0ldman
Forum Guru
Forum Guru
Posts: 1465
Joined: Thu Jul 27, 2006 5:01 am

Re: My Story with PCQ .. and high latency

Tue May 08, 2012 7:19 pm

Your current config is not going to improve ping times once they saturate their connection.
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: My Story with PCQ .. and high latency

Tue Jun 05, 2012 3:57 pm

Your current config is not going to improve ping times once they saturate their connection.

i do understand that my config will not improve that , and even all other QOS standard and optimized config will not do , i believe it related to Mikrotik QOS standards , i think Queues need some big changes by mikrotik to give better performance .


Regards
 
cmoegele
newbie
Posts: 35
Joined: Tue Nov 29, 2011 7:44 pm

Re: My Story with PCQ .. and high latency

Mon Sep 17, 2012 12:15 pm

Any progress on this issue ?
I saw, that even a long Filter list causes latency. ( tried it on different RB-Hardware upto RB1100AHx2)
@engineertote: do you use other hardware ?

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

Re: My Story with PCQ .. and high latency

Tue Oct 09, 2012 9:39 pm

Thanks for pointing this out
Same issue here http://forum.mikrotik.com/viewtopic.php ... 87#p336987

I believe I can come up with a Queue Tree that has PCQ for user max-limit just in its low priority part so that we achieve QoS for some of users packets while treating the rest "download" packets in an equal (PCQ) best-effort (discard as we see fit) way. I will publish it here http://wiki.mikrotik.com/wiki/NetworkPr ... of_Service in the coming days

Thank you.
 
engineertote
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: My Story with PCQ .. and high latency

Wed Oct 17, 2012 12:23 pm

i tried all RB models and also on X86 its still same issue ,, lets wait ROS V6 hope will fix the issue

Any progress on this issue ?
@engineertote: do you use other hardware ?

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

Re: My Story with PCQ .. and high latency

Wed Oct 17, 2012 12:32 pm

the queue-ing delay is because of the current configuration

v6 will not "fix the issue" I bet 10 levas. You can on the other hand "fix the issue" now.


instead of like this
name="Basic Down" kind=pcq pcq-rate=80k pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=20000 pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s
pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

try like this: pcq-rate=0 (turn off) and/or pcq-limit=5 pcq-total-limit=111

and read my article about QoS I mention this stuff there

Who is online

Users browsing this forum: No registered users and 18 guests