Community discussions

MikroTik App
 
spookymulder84
newbie
Topic Author
Posts: 26
Joined: Sat Nov 11, 2017 1:37 pm
Location: Croatia

Set lowest internet bandwidth priority to device

Sat Nov 11, 2017 1:48 pm

Hello everyone, I want to make a queue where everyone has Max speed available (20mbps for download and 5mbps upload), but different limit-ats.
I have mangled packets by IP, queue shows all speeds perfectly, but I was expecting it to limit queue's with priority 8 and limit-at 500kbps, and that priority 1 with limit at 18mbps would get all the share when it takes bandwidth.. and it doesn't work at all: Laika-DOWN gets only around 2-3mbps, and RaspberryPi3-DOWN continues using 17mbps... Consider raspberrypi3 as a torrent seedbox though.
2017-11-11 12_47_37-.jpg
[admin@MikroTik] /queue tree> print
Flags: X - disabled, I - invalid
0 name="UP" parent=global packet-mark="" limit-at=0 queue=default-small priority=8 max-limit=5M
burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

1 name="DOWN" parent=global packet-mark="" limit-at=0 queue=default-small priority=8 max-limit=20M
burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

2 name="queue3" parent=DOWN packet-mark=Laika-DOWN limit-at=18M queue=default-small priority=1
max-limit=20M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

3 name="queue4" parent=UP packet-mark=Laika-UP limit-at=3M queue=default-small priority=1 max-limit=5>
burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

4 name="queue5" parent=DOWN packet-mark=Starci-DOWN limit-at=12M queue=default-small priority=2
max-limit=20M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

5 name="queue6" parent=UP packet-mark=Starci-UP limit-at=3M queue=default-small priority=2
max-limit=5M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

6 name="queue7" parent=DOWN packet-mark=RaspberryPi3-DOWN limit-at=500k queue=default-small priority=>
max-limit=20M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

7 name="queue8" parent=UP packet-mark=RaspberryPi3-UP limit-at=150k queue=default-small priority=8
max-limit=5M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

8 name="queue9" parent=DOWN packet-mark=.1.X_Main-DOWN limit-at=5M queue=default-small priority=3
max-limit=20M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

9 name="queue10" parent=UP packet-mark=.1.X_Main-UP limit-at=2M queue=default-small priority=3
max-limit=5M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

10 name="queue11" parent=DOWN packet-mark=.2.X_Visitors-DOWN limit-at=3M queue=default-small priority=>
max-limit=15M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

11 name="queue12" parent=UP packet-mark=.2.X_Visitors-UP limit-at=1M queue=default-small priority=7
max-limit=4M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
2017-11-11 13_01_14-.jpg
Did I misunderstand how all of this work? Is there no way to do it? Please help me if you can because this function was a big reason that I bought my RB951G-2HnD
You do not have the required permissions to view the files attached to this post.
 
spookymulder84
newbie
Topic Author
Posts: 26
Joined: Sat Nov 11, 2017 1:37 pm
Location: Croatia

Re: Set lowest internet bandwidth priority to device

Wed Nov 22, 2017 9:09 pm

I didn't manage to solve it yet, and i'm just using some max limits right now to make my internet stable. I'd appreciate any amount of advice or suggestion.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10218
Joined: Mon Jun 08, 2015 12:09 pm

Re: Set lowest internet bandwidth priority to device  [SOLVED]

Wed Nov 22, 2017 10:45 pm

It should work OK as you did it, but there are other factors that decide the outcome.
E.g. when your ISP has excessive queues and no "fair queueing" (i.e. all packets are sent in the order they arrive at their router and put in a big queue), then an excessive downloader will still starve the traffic for more modest downloaders.
You are right in that you can tune that using max-limit. You should always leave some headroom between max-limit and the actual speed of the line, so there is always chance for others to receive traffic even when they have higher priority.
(because your ISP does not know at all about this priority)

The actual (and tough) fact is that you can only control your upload. Controlling download should be done by the ISP. Who are of course not prepared to do that for you.
 
spookymulder84
newbie
Topic Author
Posts: 26
Joined: Sat Nov 11, 2017 1:37 pm
Location: Croatia

Re: Set lowest internet bandwidth priority to device

Thu Nov 23, 2017 2:13 am

pe1chl wrote:
It should work OK as you did it, but there are other factors that decide the outcome.
E.g. when your ISP has excessive queues and no "fair queueing" (i.e. all packets are sent in the order they arrive at their router and put in a big queue), then an excessive downloader will still starve the traffic for more modest downloaders.
You are right in that you can tune that using max-limit. You should always leave some headroom between max-limit and the actual speed of the line, so there is always chance for others to receive traffic even when they have higher priority.
(because your ISP does not know at all about this priority)

The actual (and tough) fact is that you can only control your upload. Controlling download should be done by the ISP. Who are of course not prepared to do that for you.


Thank you very much for answering!
Damn, it makes so much more sense after I think about it that way.. it doesn't make sense for router to drop the reply packets that already came to it from the ISP.. it might as well forward them to the destination device so it clears out it's buffers, right?

I'm relieved about the fact that at least uploading should get prioritized properly (altough I should yet check that). EDIT: I just checked and it's completely good.
I'd really wish to be even one step closer to my solution so the downloading queues work better, but if you trully say there is no real way for me to do it, then I suppose it's not so possible.. I can stick to making speed limitation schedules when no one is likely to access internet.
Last edited by spookymulder84 on Tue Nov 28, 2017 11:40 pm, edited 1 time in total.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10218
Joined: Mon Jun 08, 2015 12:09 pm

Re: Set lowest internet bandwidth priority to device

Thu Nov 23, 2017 11:44 am

The reason the shaping of download still somewhat works is that the router can delay the packets as well, instead of simply dropping them.
By delaying the packets it will artificially lower the rate. However, in case of torrent this does not work very well because there are so
many parallel connections. With a single PC doing downloads etc it works a little better.

You can check if your ISP has a reasonable configuration by starting a continuous ping to some system (e.g. 8.8.8.8) and observing
the ping reply time when starting a single download on a PC at full speed of your connection.
Without download you see a constant figure like 10 or 20 ms, and with the download running it will increase.
When it increases only a little (maybe 30 or 40ms) your ISP has a good setup. When it increases to 1000ms and more, you are a victim
of bufferbloat and nothing you do will really help unless you can avoid saturating the connection (by setting max-limit a lot lower than
the actual line rate).
In that case you could try contacting the ISP and asking them to put "fair queing" on the subscriber lines. That helps a lot, but depending
on the routers they use it could be too CPU-intensive for them.
 
spookymulder84
newbie
Topic Author
Posts: 26
Joined: Sat Nov 11, 2017 1:37 pm
Location: Croatia

Re: Set lowest internet bandwidth priority to device

Thu Nov 23, 2017 12:25 pm

The reason the shaping of download still somewhat works is that the router can delay the packets as well, instead of simply dropping them.
By delaying the packets it will artificially lower the rate. However, in case of torrent this does not work very well because there are so
many parallel connections. With a single PC doing downloads etc it works a little better.

You can check if your ISP has a reasonable configuration by starting a continuous ping to some system (e.g. 8.8.8.8) and observing
the ping reply time when starting a single download on a PC at full speed of your connection.
Without download you see a constant figure like 10 or 20 ms, and with the download running it will increase.
When it increases only a little (maybe 30 or 40ms) your ISP has a good setup. When it increases to 1000ms and more, you are a victim
of bufferbloat and nothing you do will really help unless you can avoid saturating the connection (by setting max-limit a lot lower than
the actual line rate).
In that case you could try contacting the ISP and asking them to put "fair queing" on the subscriber lines. That helps a lot, but depending
on the routers they use it could be too CPU-intensive for them.
If that's a parameter of ISP having a good setup, then it seems they have it since it raise only up to 60ms (with my queues off). I believe my ISP runs on Mikrotiks as well, I personally am connected to them by a Ubiquiti antenna.. but my download speed has been pretty unstable lately, maybe it's time for antenna change as well.. I'm a bit in a rural and remote area so it's the best I can get.
Thanks for your nice explanations, I'll be following these forums a lot :)

Who is online

Users browsing this forum: vingjfg and 23 guests