Community discussions

MikroTik App
 
excel4x
just joined
Topic Author
Posts: 15
Joined: Sat Nov 10, 2012 9:51 pm

Enable / Disable Simple Queues Dynamically Based on Overall Traffic Level?

Mon Feb 08, 2016 5:59 am

I would like to enable several queues to limit some types of traffic when the overall traffic level reaches a threshold. For example, I have a 10M internet service. Many devices download updates, backup data, etc. at various times. This can consume a large portion of the available bandwidth and slow down other traffic.

I'd like to experiment with some queues that are enabled when the overall traffic reaches a threshold - say perhaps 8M. At that point queues could be turned on that would limit/de-prioritize traffic large data transfers to/from 17.x (Apple), 15.x and 16.x (HP) or other ranges that could be deferred until a time when traffic levels are lower.

Is it possible for a script to check overall traffic levels on a designated port and then enable/disable queues? I have seen script commands to enable/disable queues. I've also seen scripts that enable queues at different times of the day, but I haven't seen scripts that work dynamically like this.

Any sample scripts available to use as a model?

Thanks much!
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: Enable / Disable Simple Queues Dynamically Based on Overall Traffic Level?

Mon Feb 08, 2016 8:24 am

i think the design of queuing can be a solution

making the voluminous traffic to have a lower priority with a low guaranteed bandwidth will prevent it from degrading another traffic

in my case i mark any connection with connection bytes over 2megabytes as BIG connections giving it a lower priority, at the moment of congestion this traffic is throttled to get other traffic with higher priority to pass
 
excel4x
just joined
Topic Author
Posts: 15
Joined: Sat Nov 10, 2012 9:51 pm

Re: Enable / Disable Simple Queues Dynamically Based on Overall Traffic Level?

Mon Feb 08, 2016 9:37 am

Chechito,

I like that concept, and it might work fine. Rather than selecting specific sites, use connection traffic volume. And rather than capping traffic, just lower the priority. That said, I don't want to mess up streaming video.

Do you find that this approach reduces streaming bandwidth but does not cause buffering and video stalls?

Can you create this queuing process through winbox or does it require mangle scripts (which I personally find complex and would prefer to avoid)?

Thanks!
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: Enable / Disable Simple Queues Dynamically Based on Overall Traffic Level?

Mon Feb 08, 2016 9:45 am

the connection-bytes will slow down streaming of videos, youtube for example. i have test it and slows down even internet radio that i play in my pc because it queues it in "http_big" queue (mangle with connection-bytes=500000-0). maybe it will work better if you specify also connection-rate.
something like pcq queue (pcq-upload-default/pcq-download-default) will help you also to equal share bandwidth at all users
 
excel4x
just joined
Topic Author
Posts: 15
Joined: Sat Nov 10, 2012 9:51 pm

Re: Enable / Disable Simple Queues Dynamically Based on Overall Traffic Level?

Mon Feb 08, 2016 11:17 am

Freemannnn,

I looked at PCQs, but if I understand correctly, the total available bandwidth must be a constant. In my case, the total available bandwidth varies. Is there a way to use PCQs with variable bandwidth?

In my situation, my RB2011 is aggregating traffic from a number of clients. Each client has a router that caps that clients bandwidth. The problem I want to address is how to manage overall traffic across all clients when the desired bandwidth exceeds the available bandwidth. Both the desired and available bandwidth can vary. This situation occurs periodically when there is high demand or when back haul bandwidth is constrained.