Script implementing Active Congestion Control

If your pings are put in right queue (63: check it with counters: note number, run 10 ping, note number → should be +10 more or less)
and you’re still getting high latency, then that means you get into buffering: either on upload or download.

On upload: you can verify when you queue by doing iterative tests:
baseline: ping on “empty” upload & download → your best case

now upload at full speed and do ping: if ping is much higher → you’re queuing at your end → lower max upload speed & repeat test

once the ping is ± same with upload at full speed → no buffering in modem → max upload is OK

with this setup ACC can then do the download tuning

config looks fine

ok I have understood, do the tests and put the video and the configuration modified.

which part?

You mentioned
“Are just a step away from the solution… :laughing::lol::lol: but the latency is always very high, both up and down!!”

What I was saying: I think that your upload limit is TOO high, which means that data is being buffered in ISP modem, which increases the latency.

Reduce it to say 2500K and check the ping

the test on queue 63 is correct 11 packs per 10 ping.

I’ve reduced the Max limit to 1800K but when I do the upload seems to ignore it and jumps to 3M.

Aha!

So your upload traffic is not properly classified and bypasses the queue!

Do you have fasttrack for bulk?

Add “no-mark” to the 0 dscp and try again
add comment=dscp_0 name=“Routine (pppoe-out1) (Pri: :sunglasses:” packet-mark=dscp_0
parent=“8. Routine (pppoe-out1)” queue=ethernet-default

you have fasttrack activated but I thought I bypassed it using this rule in the firewall:
Firewall filter firewall filter add action=accept chain=forward comment=“Bypass fasttrack for non-zero DSCP” connection-state=established, related dscp= 0!
Schermata del 2018-01-14 01.28.10.png

It’s bypassed for non-0 only, so 0 will still get fasttracked. and that’s OK → bulk will be fast but not marked => so mark=“no-mark”

So you can limit the rate on upload now? and pings are consistent?

https://www.videosprout.com/video?id=eac7d795-7611-4db4-bf2d-ce4a1b471bb0
A flash in the pan!

alternating moments of good ping and other bad times, how it can be seen from the video. :frowning:
I reduced the Max-Limit to 1M but still ignores it and downloads it to 3M as you can see from photos.
Schermata del 2018-01-14 02.46.03.png
mikrotik.txt (19.5 KB)
By disabling fasttrack, and restoring in queue-tree dspc0 to dscp0, it really works!
If fasttrack restore ignores the limit in upload and then go to bufferbloat.
It would be nice though keep fasttrack.

Thanks sebastia!
It WORKS wonderfully! (tested for 4 days)
I had to use this script for the qos http://forum.mikrotik.com/t/fasttrack-friendly-qos-script/102401/1 even if I had to run it in blocks (I don’t know how to find the error in the original script I think of a syntax error but I can’t correct it)

P.S.
Is it possible, to automatically vary the MaxLimit to the external interface? (My ISP lowers the upload in peak hours from 3M to 2M)

Happy to hear that it works for you!

About the changing upload speed, if these hours are fixed, you could simply define a scheduled task to drop (another later to increase) the max upload speed.
Ex: when to execute → start time of script
frequency → 24h
command: /queue tree set [find parent=WAN] max-limit=2M;

the ISP lowers uploads randomly, only when there is so much traffic.
Have you ever tried the mducharme script that I wrote on top of it, you can get it started?

No i didn’t. I don’t need 64 classes of traffic prioritisation… :wink: For my usage 3 is enough.

  • It was a trick, to let you examine the script as I don’t understand where it crashes. :wink:


  • I had tried 3 fast middle low classes but the videos were shot.


  • Here’s the 8.8.8.8 ping at 30 hours of my lan even when it’s congested it stays always low finally!!

Schermata del 2018-01-19 16.59.24.png

Lol, nice try though :wink:.

Nice graph

I tried to copy your script and adapt it to the upload but it doesn’t work at all.
So in order to avoid the bufferbloat I have lowered the max limit of the queue to 1M but the connection works badly.
Do you have any ideas about how to do it?

PS:
I’m looking to make a queue tree like yours, but despite good will, I am stranded by the rules of mangle.

The challenge with unpredictable upload, is that when a “slow” ping occurs (=high ping value), one can’t determine whether it’s because of full upload queue or full download queue… So what to adjust?

Wrt queue: that’s easy: remove all queues you don’t use or have mangle rules for :wink:. And keep in mind all fasttrack goes into “no-mark”.

The problem is that my isp, does not keep the upload level constant at 3M sometimes drops to 1M.
The queue-tree rule in upload therefore does not work.
The problem should be called bufferbloat (I’ve also opened a post but no one answers…).

For sebastia, or who knows how to do :
I updated last night to version 6.42.5 and now the script $applyACC target=8.8.8.8 intfP=ether1 minRt=120 maxRt=190 intfQ=ether5 in the schedule no longer starts at the restart of the router even if half Start Time in startup .
I read in the manual about the $apply command but I didn’t understand much about its behavior and what changed on the management of local global variables.
How do I restart my schedule when I reboot my router?

Good day Sebastia , are u available for some assistance

hello frankcale, if it’s something simple I can answer you, what’s your problem?