Community discussions

MikroTik App
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

PCQ, high ping

Wed Jun 15, 2011 10:41 pm

After I understand how QoS is working - next thing I need to do is to limit each user by their tarrifs limitations.

So I used PCQ.

Currently I'm doing it on a test-workground with 2 servers.

First I added mangle rules:
add action=mark-connection chain=forward comment="servers marking" disabled=no new-connection-mark=servers_client_conn_up passthrough=yes src-address-list=servers
add action=mark-packet chain=forward connection-mark=servers_client_conn_up disabled=no new-packet-mark=servers_client_traffic_up passthrough=no src-address-list=servers
add action=mark-connection chain=forward disabled=no dst-address-list=servers new-connection-mark=servers_client_conn_down passthrough=yes
add action=mark-packet chain=forward connection-mark=servers_client_conn_down disabled=no dst-address-list=servers new-packet-mark=servers_client_traffic_down passthrough=no
After that I added queue types for the servers:
add kind=pcq name=PCQ_up_Servers pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-classifier=src-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=1024k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=PCQ_down_Servers pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=1024k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
And last one I did is added queue tree:
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=4096k name=users-total parent=global-out priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=4096k name=users-down parent=users-total priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name=servers-down packet-mark=servers_client_traffic_down parent=users-down priority=8 queue=PCQ_down_Servers
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=4096k name=users-up parent=users-total priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name=servers-up packet-mark=servers_client_traffic_up parent=users-up priority=8 queue=PCQ_up_Servers
And now there is a problem:
Server1 is downloading 1Gb file from internet at 1024kbits/sec, pings goes to about 200-500msec (normal is 40ms), online game launched on Server2 show latencies from 100 to 700. Ping success 60%. So one PCQ queue alone can almost ruin stable internet connection.

What I tried to do:
I tried to change queue sizes, and seen very unhappy results.

queue size 10 packets - ping success 100%, 47-80ms, not affecting performance of other PCQ queues, pioritization not working.
queue size 20 packets - ping success 90% (with torrents 70%), 150-300ms, affecting performance of other PCQ queues, prioritization not working.
queue size 50 packets - ping success 70% (with torrents 50%), 250-500ms, highly affecting performance of other PCQ queues, prioritization not working.
queue size 100 packets - ping success 95%, 400-670ms, greatly affecting performance of other PCQ queues, prioritization not working.
queue size 150 packets - ping success 100%, 400-800ms, performance of all PCQ queues are same, prioritization not working.

I don't know why qos(with prioritization) not working. I'm doing it correct. Well, I hope I do... Anyway first I need to do is understand where I go wrong with PCQ.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: PCQ, high ping

Wed Jun 15, 2011 10:54 pm

Priority works only between queues with the same parent, and only on queues that don't have children themselves. First every queue gets traffic up to limit-at. Then priority is used to fill the queue from limit-at to max-limit. Therefore you need rate limit ICMP and other server traffic in children attached to the same queue. You should set limit-at and max-limit on all the child queues. The "other traffic" qeueu should have a very low limit-at. That way there's always enough space to fill the ICMP and other traffic queue to limit-at and ICMP goes through. Then the other traffic queue is filled to max-limit afterwards.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Wed Jun 15, 2011 11:48 pm

fewi, thanks for reply. Now prioritization seems to be working when PCQ queues disabled. But when I enable PCQ queues ping goes high again and priorities doesn't working.

I thought prioritization will work better... when I gave icmp traffic high priority, set it's limit-at to 32k, max-limit to 4096k (is this ok?) and stable ping 40msec goes up to 80msec under torrent load (CPU 3%, 470mb RAM free). Not so good...

Here's my full configs:
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4096k name=qos-up parent=global-in priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4096k name=qos-down parent=global-in priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=4096k name=qos-icmp-down packet-mark=qos-icmp-down parent=qos-down priority=1 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-httpreq-down packet-mark=qos-httpreq-down parent=qos-down priority=2 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-httpreq-up packet-mark=qos-httpreq-up parent=qos-up priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-p2preq-down packet-mark=qos-p2preq-down parent=qos-down priority=5 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-p2preq-up packet-mark=qos-p2preq-up parent=qos-up priority=8 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-httpdata-down packet-mark=qos-httpdata-down parent=qos-down priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-httpdata-up packet-mark=qos-httpdata-up parent=qos-up priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=4096k name=qos-dns-tcp packet-mark=qos-dns-tcp-down parent=qos-down priority=1 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=4096k name=qos-dns-udp-down packet-mark=qos-dns-udp-down parent=qos-down priority=1 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=4096k name=qos-dns-tcp-up packet-mark=qos-dns-tcp-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=4096k name=qos-dns-udp-up packet-mark=qos-dns-udp-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-unmarked-down packet-mark=users-download parent=qos-down priority=8 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-unmarked-up packet-mark=users-upload parent=qos-up priority=8 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-cs16-down packet-mark=qos-cs16-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-wow-down packet-mark=qos-wow-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-la2-down packet-mark=qos-la2-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-cs16-up packet-mark=qos-cs16-down parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-wow-up packet-mark=qos-wow-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=4096k name=qos-la2-up packet-mark=qos-la2-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=64k max-limit=4096k name=qos-sshreq-down packet-mark=qos-sshreq-down parent=qos-down priority=1 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=64k max-limit=4096k name=qos-sshreq-up packet-mark=qos-sshreq-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=256k max-limit=4096k name=qos-skypetoskype-down packet-mark=qos-skypetoskype-down parent=qos-down priority=1 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=256k max-limit=4096k name=qos-skypetoskype-up packet-mark=qos-skypetoskype-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=4096k name=qos-icmp-up packet-mark=qos-icmp-up parent=qos-up priority=1 queue=default-small
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4096k name=users-total parent=global-out priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4096k name=users-down parent=users-total priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=servers-down packet-mark=servers_client_traffic_down parent=users-down priority=8 queue=PCQ_down_Servers
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4096k name=users-up parent=users-total priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=servers-up packet-mark=servers_client_traffic_up parent=users-up priority=8 queue=PCQ_up_Servers
/ip firewall mangle
add action=mark-connection chain=forward comment="servers marking" disabled=no new-connection-mark=servers_client_conn_up passthrough=yes src-address-list=servers
add action=mark-packet chain=forward connection-mark=servers_client_conn_up disabled=no new-packet-mark=servers_client_traffic_up passthrough=no src-address-list=servers
add action=mark-connection chain=forward disabled=no dst-address-list=servers new-connection-mark=servers_client_conn_down passthrough=yes
add action=mark-packet chain=forward connection-mark=servers_client_conn_down disabled=no dst-address-list=servers new-packet-mark=servers_client_traffic_down passthrough=no
add action=mark-packet chain=prerouting comment="qos icmp" disabled=no in-interface=ether9 new-packet-mark=qos-icmp-down passthrough=no protocol=icmp
add action=mark-packet chain=prerouting disabled=no in-interface=!ether9 new-packet-mark=qos-icmp-up passthrough=no protocol=icmp
add action=mark-packet chain=prerouting comment="qos dns" disabled=no in-interface=ether9 new-packet-mark=qos-dns-tcp-down passthrough=no protocol=tcp src-port=53
add action=mark-packet chain=prerouting disabled=no dst-port=53 in-interface=!ether9 new-packet-mark=qos-dns-tcp-up passthrough=no protocol=tcp
add action=mark-packet chain=prerouting disabled=no in-interface=ether9 new-packet-mark=qos-dns-udp-down passthrough=no protocol=udp src-port=53
add action=mark-packet chain=prerouting disabled=no dst-port=53 in-interface=!ether9 new-packet-mark=qos-dns-udp-up passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment="qos skype to skype" disabled=no in-interface=ether9 layer7-protocol=skypetoskype new-packet-mark=qos-skypetoskype-down passthrough=no protocol=udp
add action=mark-packet chain=prerouting disabled=no in-interface=!ether9 layer7-protocol=skypetoskype new-packet-mark=qos-skypetoskype-up passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment="qos sip" disabled=no dst-port=5060 in-interface=ether9 new-packet-mark=qos-sip-down passthrough=no protocol=udp src-port=5060
add action=mark-packet chain=prerouting disabled=no dst-port=5060 in-interface=!ether9 new-packet-mark=qos-sip-up passthrough=no protocol=udp src-port=5060
add action=mark-packet chain=prerouting comment="qos ssh requests" disabled=no in-interface=ether9 new-packet-mark=qos-sshreq-down packet-size=0-1400 passthrough=no protocol=tcp src-port=22
add action=mark-packet chain=prerouting disabled=no dst-port=22 in-interface=!ether9 new-packet-mark=qos-sshreq-up packet-size=0-1400 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos http(s) request" connection-bytes=0-500000 disabled=no in-interface=ether9 new-packet-mark=qos-httpreq-down passthrough=no protocol=tcp src-port=80,443
add action=mark-packet chain=prerouting connection-bytes=0-500000 disabled=no dst-port=80,443 in-interface=!ether9 new-packet-mark=qos-httpreq-up passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos lineage2" disabled=no in-interface=ether9 new-packet-mark=qos-la2-down passthrough=no protocol=tcp src-port=2106,7777
add action=mark-packet chain=prerouting disabled=no dst-port=2106,7777 in-interface=!ether9 new-packet-mark=qos-la2-up passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos counter strike1.6" disabled=no in-interface=ether9 new-packet-mark=qos-cs16-down passthrough=no protocol=udp src-port=27000-27150
add action=mark-packet chain=prerouting disabled=no dst-port=27000-27150 in-interface=!ether9 new-packet-mark=qos-cs16-up passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment="qos world of warcraft" disabled=no in-interface=ether9 new-packet-mark=qos-wow-down passthrough=no protocol=tcp src-port=8015
add action=mark-packet chain=prerouting disabled=no dst-port=8015 in-interface=!ether9 new-packet-mark=qos-wow-up passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos http(s) data" connection-bytes=500000-0 disabled=no in-interface=ether9 new-packet-mark=qos-httpdata-down passthrough=no protocol=tcp src-port=80,443
add action=mark-packet chain=prerouting connection-bytes=500000-0 disabled=no dst-port=80,443 in-interface=!ether9 new-packet-mark=qos-httpdata-up passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos ssh data" disabled=no in-interface=ether9 new-packet-mark=qos-sshdata-down packet-size=1400-1500 passthrough=no protocol=tcp src-port=22
add action=mark-packet chain=prerouting disabled=no dst-port=22 in-interface=!ether9 new-packet-mark=qos-sshdata-up packet-size=1400-1500 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos p2preq" disabled=no in-interface=ether9 new-packet-mark=qos-p2preq-down p2p=all-p2p passthrough=no
add action=mark-packet chain=prerouting disabled=no in-interface=!ether9 new-packet-mark=qos-p2preq-up p2p=all-p2p passthrough=no
add action=mark-packet chain=prerouting comment="qos other packets" disabled=no in-interface=ether9 new-packet-mark=users-download passthrough=no
add action=mark-packet chain=prerouting disabled=no in-interface=!ether9 new-packet-mark=users-upload passthrough=no
/queue type
set default kind=pfifo name=default pfifo-limit=50
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
add kind=pcq name=PCQ_up_Servers pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-classifier=src-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=30 pcq-rate=2048k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=PCQ_down_Servers pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=30 pcq-rate=2048k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
set default-small kind=pfifo name=default-small pfifo-limit=10
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Thu Jun 16, 2011 4:43 pm

Config and problem above is actual. Please help!

QoS and prioritization works when I disable PCQ, just latencies is a bit longer than I expect on torrent load (80msec against 40msec in idle).
Real problem is when I enable PCQ even with disabled QoS and prioritization. Ping goes up to 200-600msec on torrent or http load.
When I enable QoS. prioritization and PCQ - only PCQ are working - pings are same - 200-600msec.

I don't know where to dig...
 
User avatar
martini
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Dec 21, 2004 12:13 am

Re: PCQ, high ping

Thu Jun 16, 2011 4:49 pm

priority in PCQ not work, only in simple queue or queue tree without PCQ classifier.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Thu Jun 16, 2011 4:58 pm

So there is no way to make prioritization AND speed limitations per user ?
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Thu Jun 16, 2011 7:16 pm

Anyone ?
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Thu Jun 16, 2011 11:09 pm

priority in PCQ not work, only in simple queue or queue tree without PCQ classifier.
I think you are wrong here. Priority works with PCQ.

@Hel, at first glance the problem with your configuration is that you have attached both queues, up and down,
in the same interface, so they do interfere with each other.
Rather than attaching queues on global-in interface you should try to attach the down queue at your local interface
and the up queue at the WAN interface.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Fri Jun 17, 2011 12:43 am

fcto, I have 3 local interfaces.
Must each interface have their own queue ? Is this correct ?
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Fri Jun 17, 2011 4:06 pm

You can attach the download queue on the global-in interface
and the upload queue on the global-out interface.
 
User avatar
martini
Member Candidate
Member Candidate
Posts: 296
Joined: Tue Dec 21, 2004 12:13 am

Re: PCQ, high ping

Sat Jun 18, 2011 12:02 am

you cannot create priority rule in PCQ substream, you only can create priority rule to Parent queue that have PCQ inside.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Sat Jun 18, 2011 1:06 am

you cannot create priority rule in PCQ substream, you only can create priority rule to Parent queue that have PCQ inside.
Nope, I don't want to prioritize one user over another in PCQ queue. All I want is to apply speed limitation to my internet users AND make QoS for them... by QoS I mean prioritization of http, online games and conferences over downloads and p2p traffic. I need to do it before PCQ speed limitation.
You can attach the download queue on the global-in interface
and the upload queue on the global-out interface.
That not seems right, here's what I found:

http://wiki.mikrotik.com/wiki/Manual:Queue
Queue Tree

Submenu level: /queue tree

Queue tree creates only one directional queue in one of the HTBs. It is also the only way how to add queue on the separate interface. This way it is possible to ease mangle configuration - you don't need separate marks for download and upload - only upload will get to Public interface and only download will get to Private interface.

Also it is possible to have double queuing (example:prioritization of traffic in global-in or global-out, limitation per client on the outgoing interface) If you have simple queues and queue tree in the same HTB - simple queues will get traffic first.
What I have now:

QoS - upload/download on global-in.
Users limitations (using PCQ) - upload queue on wan interface and download queue on lan interface.

QoS works a bit. but pings are 80-200ms while http downloading (user limit 100% full). That's very very bad.

Is it even posible to make ping nearly realtime? -in my case they are 40ms when internet more than 1% free.
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Sat Jun 18, 2011 11:42 am

@Martini, I got it wrong. Of course you are right, it is not possible to prioritize within PCQ substreams.

@Hel, it is normal to have a high ping when one is consuming the whole bandwidth available while downloading.
The ICMP packet does not have a high priority, it will be the last one to pass, unless you do specify
a higher priority in queues, but what's the point of it?
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Sat Jun 18, 2011 1:05 pm

@Hel, it is normal to have a high ping when one is consuming the whole bandwidth available while downloading.
The ICMP packet does not have a high priority, it will be the last one to pass, unless you do specify
a higher priority in queues, but what's the point of it?
Yes, I'm trying to make icmp priority to the max. How else I'll test, if shaper working or not?
 
MRMISSY
newbie
Posts: 44
Joined: Sun Mar 07, 2010 3:26 pm

Re: PCQ, high ping

Sat Jun 18, 2011 11:10 pm

i don't know could this do the trick
by setting icmp inside the bandwidth in higher priority
please keep it before any managle rule that can not be passthough

add action=set-priority chain=prerouting comment=ICMP disabled=no new-priority=1 passthrough=yes protocol=\
icmp
add action=set-priority chain=postrouting comment=ICMP disabled=no new-priority=1 passthrough=yes protocol=\
icmp


the power of mikrotik is in it's flexibility
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Sun Jun 19, 2011 3:21 am

I tried to put mangle rule to prioritize icmp traffic with passthru=yes on top of all rules.

Ping are same bad as before...

I researched some more.
When I enable speed limitations(pcq) on RB - I see that PCQ queues does queue packets and bytes but all QoS nodes doesn't queue bytes and packets - they are 0 everytime.
When I disable speed limitations - I see that QoS starting to queue bytes and packets.

What can be a problem here? :?
scrn1.png
You do not have the required permissions to view the files attached to this post.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Mon Jun 20, 2011 1:30 am

Priority and limit-at isn't working. Absolutely. I just lost in here. For the novice like me it's hell. One week of smoking manuals and I'm wondering now, if it is RouterOS 5.4 bug or something, didn't tried it on 4.17... Will check it. (UPD: Checked, same problem)

When I cut PCQ queue type to 30 packets - ping success becomes no greater than 50%... But ping have limit-at = 10K! have priority = 1! Why torrent traffic is passing, but pings are not all? Tell me please... Ping MUST pass first completely no matter what because of higher priority and limit-at, and only then torrents must pass, because the are priority=8 and no limit-at. When I disable QoS queue, and leave PCQ queues enabled - the result are much the same as with QoS.
/ip firewall mangle
add action=set-priority chain=prerouting disabled=yes new-priority=1 passthrough=yes protocol=icmp
add action=set-priority chain=postrouting disabled=yes new-priority=1 passthrough=yes protocol=icmp
add action=mark-packet chain=prerouting comment="qos icmp" disabled=no in-interface=ether9 new-packet-mark=qos-icmp-down passthrough=no protocol=icmp
add action=mark-packet chain=postrouting disabled=no new-packet-mark=qos-icmp-up out-interface=ether9 passthrough=no protocol=icmp
add action=mark-packet chain=prerouting comment="qos dns" disabled=no in-interface=ether9 new-packet-mark=qos-dns-tcp-down passthrough=no protocol=tcp src-port=53
add action=mark-packet chain=postrouting disabled=no dst-port=53 new-packet-mark=qos-dns-tcp-up out-interface=ether9 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting disabled=no in-interface=ether9 new-packet-mark=qos-dns-udp-down passthrough=no protocol=udp src-port=53
add action=mark-packet chain=postrouting disabled=no dst-port=53 new-packet-mark=qos-dns-udp-up out-interface=ether9 passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment="qos skype to skype" disabled=no in-interface=ether9 layer7-protocol=skypetoskype new-packet-mark=qos-skypetoskype-down passthrough=no protocol=udp
add action=mark-packet chain=postrouting disabled=no layer7-protocol=skypetoskype new-packet-mark=qos-skypetoskype-up out-interface=ether9 passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment="qos http(s) request" connection-bytes=0-500000 disabled=no in-interface=ether9 new-packet-mark=qos-httpreq-down passthrough=no protocol=tcp src-port=80,443
add action=mark-packet chain=postrouting connection-bytes=0-500000 disabled=no dst-port=80,443 new-packet-mark=qos-httpreq-up out-interface=ether9 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos lineage2" disabled=no in-interface=ether9 new-packet-mark=qos-la2-down passthrough=no protocol=tcp src-port=2106,7770-7779
add action=mark-packet chain=postrouting disabled=no dst-port=2106,7770-7779 new-packet-mark=qos-la2-up out-interface=ether9 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos counter strike1.6" disabled=no in-interface=ether9 new-packet-mark=qos-cs16-down passthrough=no protocol=udp src-port=27000-27150
add action=mark-packet chain=postrouting disabled=no dst-port=27000-27150 new-packet-mark=qos-cs16-up out-interface=ether9 passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment="qos world of warcraft" disabled=no in-interface=ether9 new-packet-mark=qos-wow-down passthrough=no protocol=tcp src-port=8015
add action=mark-packet chain=postrouting disabled=no dst-port=8015 new-packet-mark=qos-wow-up out-interface=ether9 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos http(s) data" connection-bytes=500000-0 disabled=no in-interface=ether9 new-packet-mark=qos-httpdata-down passthrough=no protocol=tcp src-port=80,443
add action=mark-packet chain=postrouting connection-bytes=500000-0 disabled=no dst-port=80,443 new-packet-mark=qos-httpdata-up out-interface=ether9 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting comment="qos p2preq" disabled=no in-interface=ether9 new-packet-mark=qos-p2preq-down p2p=all-p2p passthrough=no
add action=mark-packet chain=postrouting disabled=no new-packet-mark=qos-p2preq-up out-interface=ether9 p2p=all-p2p passthrough=no
add action=mark-packet chain=prerouting comment="qos other packets" disabled=no in-interface=ether9 new-packet-mark=users-download passthrough=yes
add action=mark-packet chain=postrouting disabled=no new-packet-mark=users-upload out-interface=ether9 passthrough=yes
add action=mark-connection chain=forward comment="servers marking" disabled=no new-connection-mark=servers_client_conn_up passthrough=yes src-address-list=servers
add action=mark-packet chain=forward connection-mark=servers_client_conn_up disabled=no new-packet-mark=servers_client_traffic_up passthrough=no src-address-list=servers
add action=mark-connection chain=forward disabled=no dst-address-list=servers new-connection-mark=servers_client_conn_down passthrough=yes
add action=mark-packet chain=forward connection-mark=servers_client_conn_down disabled=no dst-address-list=servers new-packet-mark=servers_client_traffic_down passthrough=no
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4096k name=qos-up parent=global-out priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4096k name=qos-down parent=global-in priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name=users-down parent=ether1 priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name=users-up parent=ether9 priority=8
/queue type
set default kind=pfifo name=default pfifo-limit=70
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
add kind=pcq name=PCQ_up_Servers pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-classifier=src-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=2048k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=500
add kind=pcq name=PCQ_down_Servers pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=3k pcq-rate=2048k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=50
add kind=sfq name=SFQ sfq-allot=1500 sfq-perturb=5
set default-small kind=pfifo name=default-small pfifo-limit=10
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10k max-limit=100k name=qos-icmp-up packet-mark=qos-icmp-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10k max-limit=100k name=qos-icmp-down packet-mark=qos-icmp-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=1M name=qos-httpreq-down packet-mark=qos-httpreq-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=1M name=qos-httpreq-up packet-mark=qos-httpreq-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-p2preq-down packet-mark=qos-p2preq-down parent=qos-down priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-p2preq-up packet-mark=qos-p2preq-up parent=qos-up priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-httpdata-down packet-mark=qos-httpdata-down parent=qos-down priority=7 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-httpdata-up packet-mark=qos-httpdata-up parent=qos-up priority=7 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10k max-limit=100k name=qos-dns-tcp packet-mark=qos-dns-tcp-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10k max-limit=100k name=qos-dns-udp-down packet-mark=qos-dns-udp-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10k max-limit=100k name=qos-dns-tcp-up packet-mark=qos-dns-tcp-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10k max-limit=100k name=qos-dns-udp-up packet-mark=qos-dns-udp-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-unmarked-down packet-mark=users-download parent=qos-down priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=qos-unmarked-up packet-mark=users-upload parent=qos-up priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=500k name=qos-cs16-down packet-mark=qos-cs16-down parent=qos-down priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=1M name=qos-wow-down packet-mark=qos-wow-down parent=qos-down priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=1M name=qos-la2-down packet-mark=qos-la2-down parent=qos-down priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=500k name=qos-cs16-up packet-mark=qos-cs16-up parent=qos-up priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=1M name=qos-wow-up packet-mark=qos-wow-up parent=qos-up priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k max-limit=1M name=qos-la2-up packet-mark=qos-la2-up parent=qos-up priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=100k max-limit=1M name=qos-skypetoskype-down packet-mark=qos-skypetoskype-down parent=qos-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=100k max-limit=1M name=qos-skypetoskype-up packet-mark=qos-skypetoskype-up parent=qos-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=4096k name=servers-down packet-mark=servers_client_traffic_down parent=users-down priority=5 queue=PCQ_down_Servers
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=4096k name=servers-up packet-mark=servers_client_traffic_up parent=users-up priority=5 queue=PCQ_up_Servers
/queue interface
set ether12 queue=ethernet-default
set ether13 queue=ethernet-default
set ether11 queue=ethernet-default
set ether6 queue=ethernet-default
set ether7 queue=ethernet-default
set ether8 queue=ethernet-default
set ether9 queue=ethernet-default
set ether10 queue=ethernet-default
set ether1 queue=ethernet-default
set ether2 queue=ethernet-default
set ether3 queue=ethernet-default
set ether4 queue=ethernet-default
set ether5 queue=ethernet-default
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Thu Jun 23, 2011 7:30 pm

And not only PCQ makes good-quality connection unstable. Even properly configured (by manual at mikrotik's wiki) QoS alone increase latency in games.
I used mikrotik's wiki manual to setup QoS, then by Sheriff's manual from youtube, and then I tried some examples at russian forums, they didn't work too...

So I wrote a message to reseller's support and waiting for assistance.


But before that. Even if no one want to help or don't know how to help. Could anyone even post an answer to these questions?

1. Can QoS prioritize ping as much, that it'll show same good latencies on 30% and 100% of internet connection no matter what?
2. Can PCQ (for client's speed limitation) work with case above?
3. Is it possible to shape synchronous xDSL 4 MBit (IN+OUT) in PCQ queues?
 
User avatar
Zeeester
just joined
Posts: 14
Joined: Mon Apr 24, 2006 8:28 am
Location: Osijek, Croatia

Re: PCQ, high ping

Thu Jun 23, 2011 9:05 pm

You need something called Low Latency Queuing.
That is not yet implemented in Mikrotik.
I need that too.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Thu Jun 23, 2011 9:32 pm

You need something called Low Latency Queuing.
That is not yet implemented in Mikrotik.
I need that too.
That make sense. I've now searched "Low Latency Queuing" on this forum and it gives me threads with exactly the same trouble as mine.
Priority doesn't work with low (but 100%) internet usage and yes, I have only 2 test users. But why is there so few mikrotik users with priority problems?
 
engineertote
Member Candidate
Member Candidate
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: PCQ, high ping

Sat Sep 10, 2011 2:35 am

hel , i have faced same issue with my routers , buts its goes bit better with 5.6 SW , try to upgrade and see

Regards


You need something called Low Latency Queuing.
That is not yet implemented in Mikrotik.
I need that too.
That make sense. I've now searched "Low Latency Queuing" on this forum and it gives me threads with exactly the same trouble as mine.
Priority doesn't work with low (but 100%) internet usage and yes, I have only 2 test users. But why is there so few mikrotik users with priority problems?
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Mon Feb 06, 2012 7:41 am

Sorry for waking old thread, but it's actual even for more than half year after my first post.

Prioritization + PCQ still doesn't work.
Without PCQ, prioritization seems to be working. But I need bandwidth control AND prioritization together.
Would it be supported in near future?

Dear support.
I sent 2 emails to you, but sadly, I have recieved very inaccurate answers. None of which I can understand, it's even was written in translit russian, making understanding a lot harder. But all I understand in the answer is something about my hands and misconception. Your product is very interesting, start to hear your customers.
hel , i have faced same issue with my routers , buts its goes bit better with 5.6 SW , try to upgrade and see

Regards
Nope, I have 5.7 installed, problem is still there. Not better than early versions.
 
akosenko
newbie
Posts: 48
Joined: Fri Aug 21, 2009 8:56 am
Location: Lipetsk, Russia

Re: PCQ, high ping

Tue Feb 07, 2012 2:18 pm

Prioritization + PCQ still doesn't work.
Without PCQ, prioritization seems to be working. But I need bandwidth control AND prioritization together.
need this too and yes -
Prioritization + PCQ still doesn't work
, I use only PCQ for bandwidth control, without prioritization, this is better than nothing, still hope for low Low Latency Queuing in RouterOS.
 
engineertote
Member Candidate
Member Candidate
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: PCQ, high ping

Wed Mar 28, 2012 2:14 pm

u r right ,, i'm still facing same issue ..

i have spent weeks of reading and searching with no success till now

Mikrotik support pls do something
 
engineertote
Member Candidate
Member Candidate
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: PCQ, high ping

Thu Apr 19, 2012 1:40 am

Still waiting Solution ??!!!

Mikrotik Support !!!
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: PCQ, high ping

Thu Apr 19, 2012 2:15 am

Still waiting Solution ??!!!

Mikrotik Support !!!
Notice: For support from Mikrotik staff, write to support@mikrotik.com - Mikrotik does not generally offer support on the forum, this is a user forum
 
engineertote
Member Candidate
Member Candidate
Posts: 177
Joined: Tue May 19, 2009 1:36 pm

Re: PCQ, high ping

Thu Apr 19, 2012 11:37 am

Still waiting Solution ??!!!

Mikrotik Support !!!
Notice: For support from Mikrotik staff, write to support@mikrotik.com - Mikrotik does not generally offer support on the forum, this is a user forum

ok ,, Mikrotik users :) .. any one have same issue and found a solution ?
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Thu Apr 19, 2012 1:51 pm

Let's suppose you will shape and prioritize icmp, http and other
And let's assume you have a 10M/4M internet connection, your LAN interface
is ether2 and the interface that connects to the internet is ether1:
/ip firewall mangle
add chain=forward action=mark-connection new-connection-mark=icmp passthrough=yes protocol=icmp
add chain=forward action=mark-packet new-packet-mark=icmp passthrough=no connection-mark=icmp
add chain=forward action=mark-connection new-connection-mark=http passthrough=yes protocol=tcp dst-port=80
add chain=forward action=mark-packet new-packet-mark=http passthrough=no connection-mark=http
add chain=forward action=mark-connection new-connection-mark=other passthrough=yes 
add chain=forward action=mark-packet new-packet-mark=other passthrough=no connection-mark=other
/queue type
 add name="PcqDown" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-addres>
     pcq-total-limit=2000 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=128 pcq-dst-address6-mask=128

 add name="PcqUp" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-address
     pcq-total-limit=2000 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=128 pcq-dst-address6-mask=128
/queue tree
add name="download" parent=ether2 packet-mark="" limit-at=0 priority=8
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
add name=icmp parent=download packet-mark=icmp limit-at=1M queue=PcqDown priority=1 
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
add name=http parent=download packet-mark=http limit-at=1M queue=PcqDown priority=4 
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
add name=other parent=download packet-mark=other limit-at=1M queue=PcqDown priority=8 
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
add name=upload parent=ether1 packet-mark="" limit-at=0 priority=8
     max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s
add name=icmp parent=upload packet-mark=icmp limit-at=512k queue=PcqUp priority=1 
     max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s
add name=http parent=upload packet-mark=http limit-at=512k queue=PcqUp priority=4 
     max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s
add name=other parent=upload packet-mark=other limit-at=512k queue=PcqUp priority=8 
     max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s
I have not tested this particular code, I just wrote it down, but I guess it is accurate
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Fri Apr 20, 2012 12:24 pm

Let's suppose you will shape and prioritize icmp, http and other
And let's assume you have a 10M/4M internet connection, your LAN interface
is ether2 and the interface that connects to the internet is ether1:

I have not tested this particular code, I just wrote it down, but I guess it is accurate
Yeah, your code is correct. But it doesn't work, when PCQ enabled. Packets goes absolutely not prioritized. Priority means nothing when PCQ enabled, I can even set torrents priority to 1, and ping to 8. Ping will be with exactly same response time compared to priority 1 on ping and 8 on torrents.

Will you claim THIS as correct work of prioritization?

And one funny thing more - even limit-at have no effect when PCQ enabled.
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Fri Apr 20, 2012 2:05 pm

Well, i have a similar configuration where for for me it works.
I don't prioritize ping at all because ping is not a tool to measure or to
value a connection.
You should also consider what values you put in limit-at. The total of limit-at of the subqueues
should not exceed the max-limit of the parent queue. The priority of the subqueues begin to work
as soon as the traffic is over the limit-at you have specified. First the queues will satisfy the limit-at
value (regardless of their assigned priority), only after that will the priority enter in play.
 
akosenko
newbie
Posts: 48
Joined: Fri Aug 21, 2009 8:56 am
Location: Lipetsk, Russia

Re: PCQ, high ping

Fri Apr 20, 2012 3:44 pm

First the queues will satisfy the limit-at
value (regardless of their assigned priority), only after that will the priority enter in play.
So, we need set limit-at parameter to 1 to reaching correct work of prioritization? Isn't it?
/queue tree
add name="download" parent=ether2 packet-mark="" limit-at=0 priority=8
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
add name=icmp parent=download packet-mark=icmp limit-at=1 queue=PcqDown priority=1
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
add name=http parent=download packet-mark=http [b]limit-at=1[/b] queue=PcqDown priority=4
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
add name=other parent=download packet-mark=other [b]limit-at=1[/b] queue=PcqDown priority=8
     max-limit=10M burst-limit=0 burst-threshold=0 burst-time=0s
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Fri Apr 20, 2012 4:04 pm

First the queues will satisfy the limit-at
value
They don't.
I don't prioritize ping at all because ping is not a tool to measure or to
value a connection.
It's a best way to check if priorities does work.

Just look at my config. It's correct. But doesn't work.
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Fri Apr 20, 2012 7:39 pm

Quote:
First the queues will satisfy the limit-at
value

They don't.
I am a little confused here by your statement, I mean, of course they do.
By what means are you analysing that queues are not satisfying first their limit-at value, and
then jump to the priority. That is the logic of limit-at, you guarantee that at least the bandwidth
specified in the limit-at is delivered.
If by some chance the bandwidth available from ISP changes so that it is below the total of limit-at
of all subqueues, than of course they are not working, but not by fault of their own.
Quote:
I don't prioritize ping at all because ping is not a tool to measure or to
value a connection.

It's a best way to check if priorities does work.
Not exactly. You can test priority by checking if for example webpages do open more or less at the same amount
of time while you are downloading a torrent.

In your config that you have posted some time ago I see you have used PCQ only on two queues:
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=4096k name=servers-down packet-mark=servers_client_traffic_down parent=users-down priority=5 queue=PCQ_down_Servers
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=4096k name=servers-up packet-mark=servers_client_traffic_up parent=users-up priority=5 queue=PCQ_up_Servers
For these two queues I don't see their respective parent queue in your posted configuration, unless I am missing something.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Fri Apr 20, 2012 11:00 pm

I am a little confused here by your statement, I mean, of course they do.
By what means are you analysing that queues are not satisfying first their limit-at value, and
then jump to the priority.
Because when I gave limit-at only to icmp queue to 16kbit, and max-limit to 128kbit. It must go first (by logic it goes first, then goes max-limit), so latencies expected to be smaller.
Not exactly. You can test priority by checking if for example webpages do open more or less at the same amount
of time while you are downloading a torrent.
Pages loads slowly in both cases, even when I gave http traffic 512kbit line. So does skype, teamspeak, games, etc...

Config that posted here, is my first try. Here is my current config and my latest thread:
http://forum.mikrotik.com/viewtopic.php ... 10#p282910
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Sun Apr 22, 2012 12:12 pm

On the other post you have screenshots of your config, it is a little hard to understand from that.
Anyway, the code you have posted here, I copy-pasted it in notepad, and deleted everything where
I saw disabled=yes. I see that the parent queues I was talking about are there, but they are disabled.

Apparently you are having problems with your configuration, so I would recommend to try a more simplified one.
You can live out some of the packet marks you are using, for example skype. As far as I know, skype is not
an easy traffic to be captured, it can disguise it's own traffic pretty well.
Also, how many concurrent sub-queues do you have at the same time? I mean, how many persons are sharing
the same line at the same time?
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Mon Apr 23, 2012 1:22 pm

Apparently you are having problems with your configuration, so I would recommend to try a more simplified one.
1. I don't see problems in my configuration. Here is my current config (I cut it a bit for better readability):

Queues:
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5900k name=qos parent=global-in priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5900k name=bandwidth-control parent=global-out priority=1
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5800k name=qos-down parent=qos priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=2048k name=qos-up parent=qos priority=5
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=1024k name=qos-heavy-up parent=qos-up priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=2048k name=qos-light-up parent=qos-up priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5900k name=users-down parent=bandwidth-control priority=1
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=2900k name=users-up parent=bandwidth-control priority=1
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5800k name=qos-light-down parent=qos-down priority=1
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5800k name=qos-heavy-down parent=qos-down priority=7

/queue type
set default kind=pfifo name=default pfifo-limit=25
add kind=pcq name=pcq-unlim256-down pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=5s pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=384k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=pcq-unlim256-up pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=5s pcq-classifier=src-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=30 pcq-rate=128k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=pcq-unlim512-down pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=5s pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=768k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=pcq-unlim512-up pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=5s pcq-classifier=src-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=192k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=pcq-workers-down pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=4s pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=30 pcq-rate=1024k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=1000
add kind=pcq name=pcq-workers-up pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=4s pcq-classifier=src-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=30 pcq-rate=512k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=1000
add kind=sfq name=sfq-queue sfq-allot=1514 sfq-perturb=5

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=3900k name=qos-icmp-down packet-mark=qos-icmp-down parent=qos-light-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=3900k name=qos-httpreq-down packet-mark=qos-httpreq-down parent=qos-light-down priority=3 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5500k name=qos-httpdata-down packet-mark=qos-httpdata-down parent=qos-heavy-down priority=7 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=3900k name=qos-dns-tcp-down packet-mark=qos-dns-tcp-down parent=qos-light-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=3900k name=qos-dns-udp-down packet-mark=qos-dns-udp-down parent=qos-light-down priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=5500k name=qos-other-traffic-down packet-mark=qos-other-traffic-down parent=qos-heavy-down priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=unlim256-down packet-mark=unlim256_traffic_down parent=users-down priority=4 queue=pcq-unlim256-down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=unlim512-down packet-mark=unlim512_traffic_down parent=users-down priority=4 queue=pcq-unlim512-down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=workers-down packet-mark=workers_traffic_down parent=users-down priority=1 queue=pcq-workers-down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=unlim256-up packet-mark=unlim256_traffic_up parent=users-up priority=4 queue=pcq-unlim256-up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=unlim512-up packet-mark=unlim512_traffic_up parent=users-up priority=4 queue=pcq-unlim512-up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=workers-up packet-mark=workers_traffic_up parent=users-up priority=1 queue=pcq-workers-up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=1024k name=qos-httpdata-up packet-mark=qos-httpdata-up parent=qos-heavy-up priority=7 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=1024k name=qos-other-traffic-up packet-mark=qos-other-traffic-up parent=qos-heavy-up priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=2048k name=qos-dns-tcp-up packet-mark=qos-dns-tcp-up parent=qos-light-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=2048k name=qos-dns-udp-up packet-mark=qos-dns-udp-up parent=qos-light-up priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=2048k name=qos-httpreq-up packet-mark=qos-httpreq-up parent=qos-light-up priority=3 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=16k max-limit=2048k name=qos-icmp-up packet-mark=qos-icmp-up parent=qos-light-up priority=1 queue=default
Mangle:
/ip firewall mangle
add action=mark-connection chain=prerouting comment="qos icmp" disabled=no dst-address-list=local_subnet in-interface=ether11 new-connection-mark=qos-icmp-conn-down passthrough=yes protocol=icmp
add action=mark-packet chain=prerouting connection-mark=qos-icmp-conn-down disabled=no new-packet-mark=qos-icmp-down passthrough=no
add action=mark-connection chain=prerouting disabled=no dst-address-list=!local_subnet in-interface=ether1 new-connection-mark=qos-icmp-conn-up passthrough=yes protocol=icmp
add action=mark-packet chain=prerouting connection-mark=qos-icmp-conn-up disabled=no new-packet-mark=qos-icmp-up passthrough=no
add action=mark-connection chain=prerouting comment="qos dns" disabled=no dst-address-list=local_subnet in-interface=ether11 new-connection-mark=qos-dns-tcp-conn-down passthrough=yes protocol=tcp src-port=53
add action=mark-packet chain=prerouting connection-mark=qos-dns-tcp-conn-down disabled=no new-packet-mark=qos-dns-tcp-down passthrough=no
add action=mark-connection chain=prerouting disabled=no dst-address-list=!local_subnet dst-port=53 in-interface=ether1 new-connection-mark=qos-dns-tcp-conn-up passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting connection-mark=qos-dns-tcp-conn-up disabled=no new-packet-mark=qos-dns-tcp-up passthrough=no
add action=mark-connection chain=prerouting disabled=no dst-address-list=local_subnet in-interface=ether11 new-connection-mark=qos-dns-udp-conn-down passthrough=yes protocol=udp src-port=53
add action=mark-packet chain=prerouting connection-mark=qos-dns-udp-conn-down disabled=no new-packet-mark=qos-dns-udp-down passthrough=no
add action=mark-connection chain=prerouting disabled=no dst-address-list=!local_subnet dst-port=53 in-interface=ether1 new-connection-mark=qos-dns-udp-conn-up passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark=qos-dns-udp-conn-up disabled=no new-packet-mark=qos-dns-udp-up passthrough=no
add action=mark-connection chain=prerouting comment="qos http(s) data" connection-bytes=500000-0 disabled=no dst-address-list=local_subnet in-interface=ether11 new-connection-mark=qos-httpdata-conn-down passthrough=yes protocol=tcp src-port=80,443,4000-4015
add action=mark-packet chain=prerouting connection-mark=qos-httpdata-conn-down disabled=no new-packet-mark=qos-httpdata-down passthrough=no
add action=mark-connection chain=prerouting connection-bytes=500000-0 disabled=no dst-address-list=!local_subnet dst-port=80,443,4000-4015 in-interface=ether1 new-connection-mark=qos-httpdata-conn-up passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting connection-mark=qos-httpdata-conn-up disabled=no new-packet-mark=qos-httpdata-up passthrough=no
add action=mark-connection chain=prerouting comment="qos http(s) request" connection-bytes=0-499999 disabled=no dst-address-list=local_subnet in-interface=ether11 new-connection-mark=qos-httpreq-conn-down passthrough=yes protocol=tcp src-port=80,443
add action=mark-packet chain=prerouting connection-mark=qos-httpreq-conn-down disabled=no new-packet-mark=qos-httpreq-down passthrough=no
add action=mark-connection chain=prerouting connection-bytes=0-499999 disabled=no dst-address-list=!local_subnet dst-port=80,443 in-interface=ether1 new-connection-mark=qos-httpreq-conn-up passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting connection-mark=qos-httpreq-conn-up disabled=no new-packet-mark=qos-httpreq-up passthrough=no
add action=mark-connection chain=prerouting comment="qos other traffic" disabled=no dst-address-list=local_subnet in-interface=ether11 new-connection-mark=qos-other-traffic-conn-down passthrough=yes
add action=mark-packet chain=prerouting connection-mark=qos-other-traffic-conn-down disabled=no new-packet-mark=qos-other-traffic-down passthrough=no
add action=mark-connection chain=prerouting disabled=no dst-address-list=!local_subnet in-interface=ether1 new-connection-mark=qos-other-traffic-conn-up passthrough=yes
add action=mark-packet chain=prerouting connection-mark=qos-other-traffic-conn-up disabled=no new-packet-mark=qos-other-traffic-up passthrough=no
add action=mark-connection chain=forward comment=unlim256 disabled=no dst-address-list=unlim256_clients new-connection-mark=unlim256-conn-down out-interface=ether1 passthrough=yes src-address-list=!local_subnet
add action=mark-packet chain=forward connection-mark=unlim256-conn-down disabled=no new-packet-mark=unlim256_traffic_down passthrough=no
add action=mark-connection chain=forward disabled=no new-connection-mark=unlim256-conn-up out-interface=ether11 passthrough=yes src-address-list=unlim256_clients
add action=mark-packet chain=forward connection-mark=unlim256-conn-up disabled=no new-packet-mark=unlim256_traffic_up passthrough=no
add action=mark-connection chain=forward comment=unlim512 disabled=no dst-address-list=unlim512_clients new-connection-mark=unlim512-conn-down out-interface=ether1 passthrough=yes src-address-list=!local_subnet
add action=mark-packet chain=forward connection-mark=unlim512-conn-down disabled=no new-packet-mark=unlim512_traffic_down passthrough=no
add action=mark-connection chain=forward disabled=no new-connection-mark=unlim512-conn-up out-interface=ether11 passthrough=yes src-address-list=unlim512_clients
add action=mark-packet chain=forward connection-mark=unlim512-conn-up disabled=no new-packet-mark=unlim512_traffic_up passthrough=no
add action=mark-connection chain=forward comment=workers disabled=no dst-address-list=workers_clients new-connection-mark=workers-conn-down out-interface=ether1 passthrough=yes src-address-list=!local_subnet
add action=mark-packet chain=forward connection-mark=workers-conn-down disabled=no new-packet-mark=workers_traffic_down passthrough=no
add action=mark-connection chain=forward disabled=no new-connection-mark=workers-conn-up out-interface=ether11 passthrough=yes src-address-list=workers_clients
add action=mark-packet chain=forward connection-mark=workers-conn-up disabled=no new-packet-mark=workers_traffic_up passthrough=no
You can live out some of the packet marks you are using, for example skype. As far as I know, skype is not
an easy traffic to be captured, it can disguise it's own traffic pretty well.
Skype mangle captures very small amount of traffic, from 1 to 5 kbit when no skype calls.
Also, how many concurrent sub-queues do you have at the same time? I mean, how many persons are sharing
the same line at the same time?
From 3 to 10 pcq sub-queues for each pcq queue in queue tree.
In total 37 active sub-queues in pcq-down parent queue and 37 for pcq-up parent queue.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1768
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: PCQ, high ping

Mon Apr 23, 2012 1:59 pm

1) use /export compact - will save us a lot of time reading your exports

2) Priority doesn't change packet order in any way, it DOESN'T put one packet before other - only thing priority do is helping HTB decide what traffic to pass and what traffic to drop.
If queue doesn't have max-limit specified - priority will not work at all - from HTB point of view, there is no need to drop anything on that queue.


So to make your QoS to work you need:
1) parent queue with max limit specified, so that HTB have a t least some idea what amount are available to you
2) all child queues must have max-limit specified

Read carefully this manual:
http://wiki.mikrotik.com/wiki/Manual:HTB
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Mon Apr 23, 2012 6:56 pm

Ok, I'll read it carefully one more time (fourth time).

I've forgot about /export compact, sorry.
Priority doesn't change packet order in any way, it DOESN'T put one packet before other - only thing priority do is helping HTB decide what traffic to pass and what traffic to drop.
If queue doesn't have max-limit specified - priority will not work at all - from HTB point of view, there is no need to drop anything on that queue.
Funny thing, but priority do not affect packet drops. In the reverse scheme, where I put icmp to priority to 8 and other traffic to 1, ping drops every 10-20 packet. So does in normal scheme.
So to make your QoS to work you need:
1) parent queue with max limit specified, so that HTB have a t least some idea what amount are available to you
2) all child queues must have max-limit specified
It's already done in config I posted...
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: PCQ, high ping

Mon Apr 23, 2012 7:14 pm

Apparently you are having problems with your configuration, so I would recommend to try a more simplified one.
1. I don't see problems in my configuration. Here is my current config (I cut it a bit for better readability):
Sorry, I didn't expressed my self correctly. I meant a more basic configuration, so it is easier to point the finger on what might be
the problem. Then you can move to a more detailed config.
Also, if you have 35, more or less, users working at the same time, it looks at me a lot of them to share a 4Mbps download.
I will try to have a look later on on your config.
 
cmoegele
newbie
Posts: 35
Joined: Tue Nov 29, 2011 7:44 pm

Re: PCQ, high ping

Mon Sep 17, 2012 12:37 pm

@Hel

I´m seeing exactly the same problems as you.
Did again some tests over the last weeks, configured Bridge with firewall and
copy big file from server to 1 client (1Gb links ). Enabling Firewall (without any rules, filters, mangles) drops throughput about 30-40% and even 1 simple queue costs additional 20-30% performance ( CPU-load up to 100% on RB450G),...
Do you find a satisfieing solution ?

br

cm
 
rmichael
Forum Veteran
Forum Veteran
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: PCQ, high ping

Mon Sep 17, 2012 7:02 pm

Try this:

1) don't packet mark dns and icmp traffic
2) cut your max limit in your parent queues by half

Do you still get a ping delay?
 
spire2z
Long time Member
Long time Member
Posts: 516
Joined: Mon Feb 14, 2005 2:48 am

Re: PCQ, high ping

Mon Sep 17, 2012 10:43 pm

Try mangle on prerouting chain?
 
rado3105
Member
Member
Posts: 492
Joined: Sat Jan 12, 2008 11:45 pm

Re: PCQ, high ping

Mon Sep 17, 2012 10:44 pm

Hell how did you solve it?
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Tue Sep 18, 2012 10:06 am

It's not solveable.
Per-user prioritization is not possible by now.
 
hel
Member Candidate
Member Candidate
Topic Author
Posts: 199
Joined: Sun Jun 12, 2011 6:31 am

Re: PCQ, high ping

Wed Mar 09, 2016 2:20 pm

I had problems with it because I misunderstand how the things in the config I posted works.

We prioritizing global traffic in the prerouting queue and it works well. But when we bandwidth control (per-user limitation) resulted traffic - their priorities and limit-at discarded, because of a different queue (forward, postrouting). So since bandwidth control aren't getting priorities into account - icmp traffic could be queued or dropped, so its latency will grow.

hint: saw some info on the forum, that per-user QoS is possible using simple queues.

Who is online

Users browsing this forum: yhfung and 23 guests