Community discussions

MikroTik App
 
resetjet
just joined
Topic Author
Posts: 24
Joined: Thu May 17, 2012 1:58 am

QOS equal bandwidth for all users

Wed Apr 27, 2016 7:30 pm

I successfully used this guide to set up bandwidth sharing for my network.

http://wiki.mikrotik.com/wiki/Cable_setup

This allows me to limit each user to a certain bandwidth. What I would like to do is share the available bandwidth equally. I am only able to program in winbox and it seems like it is all there, but I am not sure what to do. In the queue type I put rate zero and max limit 10M (I have a 13 meg connection) is this correct, or is there another way to do it. Again I am only familiar with winbox. The CLI makes me crazy.

Image
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6630
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: QOS equal bandwidth for all users

Thu Apr 28, 2016 6:07 pm

You will need 3 things,
- one queue type for PCQ-download, as your showed on screenshot;
- another queue type for PCQ-upload, the same as shown at screenshot but with "Src-address".
- one queue with target= (configure local network address there), select queue type for download and upload, set max-limit.
Configured max-limit will be equally divided between connected users.
 
resetjet
just joined
Topic Author
Posts: 24
Joined: Thu May 17, 2012 1:58 am

Re: QOS equal bandwidth for all users

Thu Apr 28, 2016 7:45 pm

Thank you. Ok I had that as pointed out in the guide. However, I did not have the max limit in the last queue you mentioned. I had it in the first two queues. Thanks. That should do it.

I operate a campground and the problem I am having is right now a few bad apples are streaming HD video and hogging all the bandwidth. I am wondering if its better to split the bandwidth equally among users, or just provide each with say 512k. This way it will get them in the habit of never being able to stream even when there are only a few users. I have a 100MB Wan. Does anyone have a suggestion on which way to go.
 
resetjet
just joined
Topic Author
Posts: 24
Joined: Thu May 17, 2012 1:58 am

Re: QOS equal bandwidth for all users

Thu Apr 28, 2016 7:51 pm

This is what I did.

Image
 
freemannnn
Long time Member
Long time Member
Posts: 685
Joined: Sun Oct 13, 2013 7:29 pm

QOS equal bandwidth for all users

Thu Apr 28, 2016 8:41 pm

512k is too small. 3mbps or 4mbps for browsing is fair enough.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: QOS equal bandwidth for all users

Thu Apr 28, 2016 9:26 pm

Bursting would be a good way to give fast performance for browsing, email, etc but clamp down on streams.

Your current configuration is a bit topsy-turvy. It basically says that users are always bursting, and the while-bursting speed limit is lower than the max. Usually, the idea is for a bursting speed limit to be much higher than the normal speed limit, and to allow short periods of bursting, so that web surfing quickly goes through and gets out of the way, but if you start streaming, this isn't a burst but a sustained data stream so your burst "Credit" runs out and you get clamped down to the lower limit. This also limits things like downloading large files, etc.

Try setting the burst threshold at 512K, the max-limit at 1M and the burst limit at 50M, and the burst duration to 20sec.
This means that if your 20-second average bandwidth is below 512K, you're allowed to burst up to 50M. Once that average goes over 512K, you're throttled to 1M.

Note that this doesn't mean you'll get 20 seconds of bursting - it means that your 20 second AVERAGE must be below 512K. So if you do nothing for a while, and load a page, it's going to pop up pretty quickly at up to 50M, but if you really do go 50M, then it's very quickly going to raise your average above 512K and throttle you down to 1M. Spend some time playing around with the numbers to fine-tune the behavior to something that works well for you.

One other fact to point out - the queue you're showing is shared by all users so if you put max-limit=1M (or burst limit of 1M and you're ALWAYS bursting) then that means everyone is now sharing 1M.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
resetjet
just joined
Topic Author
Posts: 24
Joined: Thu May 17, 2012 1:58 am

Re: QOS equal bandwidth for all users

Fri Apr 29, 2016 3:00 am

Thanks, you answered my next question before I got to it. When I went to save the above configuration, it wouldn't let me because the bursting was lower then max or something as you pointed out. I think I am gonna go with the 512k with the bursting. The reason is I want to have the same awful hamburger all the time like mcdonalds. That way it won't be good one day and bad another where they blame me or something else for the slow speed one day.

I have no idea what the limit and total limit mean or do below. Can anyone tell me. I tried different parameters and it doesn't seem to do anything.

Image

Ok, this is the way I see it. I have set the upload and download queue types. In those types I have limited the upload or download activity as above which is the 512K limit and the bursting I have lets it go up to 15 meg and then quickly dwindle down to within a minute being near 512k. Everything else I tried kept the speed (using internet speed test), above 1-4M always.

Now the simple queue that I have set up using the PCQ types as above I really can't limit as if I do that limit or burst would be applied to all on the lan. I don't know another way to do it.

Suggestions appreciated.....Thanks
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: QOS equal bandwidth for all users

Fri Apr 29, 2016 6:58 pm

Here's how bursting works:
bursting.png
At the beginning, there had been no traffic, so the average starts at zero. The average is below the burst threshold, so the data immediately begins flowing at the burst rate. This causes the average consumption to begin rising sharply.

1) At this moment, the average consumption goes above the burst threshold, so the data is now ineligible for bursting, and the throughput drops to the max limit. At this point, the data is still flowing, so the average continues to rise, but not as quickly since the throughput is now lower.

2) At this point, the data flow drops to zero and afterwards, causing the average consumption value to start falling. (It's just a coincidence that my drawing has the data flow stop just as the average reaches this value. Had the flow continued, the red and green lines would both stay at max limit.

3) At this point, the average has fallen below the threshold, so burst is now eligible again. Note that when another data flow begins, the green (instantaneous) throughput jumps straight up to the burst rate again. At that point (not numbered) the average throughput begins climbing again.

4) Average has again exceeded the threshold, so the instantaneous rate is again throttled to the max limit. Note that this burst was shorter because the average had not fallen all the way to zero again.

When the second transfer finishes, the average begins falling sharply again.

Suppose there had been another spike in traffic between points 2 and 3 - it would only have been allowed to go to Max Limit because the average had not yet fallen below the threshold value.

The burst time value affects the slope of the red curve. The shorter the time, the faster the red line meets the green line, thus shorter, but more frequent bursts. A longer time will result in longer bursts but requiring a longer period of inactivity to go back below the burst threshold again. In general, I would say that if the burst amount is much higher than the max and threshold values, you're going to want longer durations or else the bursts will be so short that they're hardly noticeable and hardly beneficial.
You do not have the required permissions to view the files attached to this post.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: QOS equal bandwidth for all users

Fri Apr 29, 2016 7:10 pm

As for limit / total limit, here is a thread on that topic:
http://forum.mikrotik.com/viewtopic.php?t=14269

My $0.02's worth on the topic - longer queues (higher limit/total limt) cause queues to be "bumpier" - your thorughput will fluctuate a lot if the queue is too long because TCP will take longer to realize that packets are being dropped. TCP will then slow down too much, and then stop losing packets, so it will try to go very fast again, which will cause more drops "too late"


As for your comment about not doing the burst thing on a single queue for the entire LAN - that is a correct understanding. The entire LAN would go fast and slow, sharing a single limit.

I would say that using PCQ in your scenario, if you want to allow bursting, would be to set the values as you have - what you want each individual user to experience, and then put the full bandwidth on the master queue so that if the number of users doing things starts to really exceed the master bandwidth, then every sub-queue is going to start sharing the reduced amount. Therefore you could set the individual "max limits" a little higher for scenarios where there are only two users at the time, they may as well get half the bandwidth, right? If the main queue knows there is only 100M available, then if you say "each user gets 20M" - this is going to get overridden by the master 100M whenever there are more than 5 sub-queues anyway.
When given a spoon,
you should not cling to your fork.
The soup will get cold.

Who is online

Users browsing this forum: Google [Bot] and 54 guests