Understanding QoS

Report issues relating to bandwith monitoring, bandwidth quotas or QoS in this forum.

Moderator: Moderators

Post Reply
thunderdust
Posts: 24
Joined: Sun Nov 22, 2015 9:37 am

Understanding QoS

Post by thunderdust »

I've been researching and testing QoS today and am hoping to get help with my understanding of it. I thought I understood it, but then my experience is not what I expected. I've read lots in the documentation and forums, so a big THANKS for providing a ton of great info! Sorry if this is an obvious question.

MY SITUATION: When someone uploads at fullspeed, our downloads get completely cut off to the point where no websites will even load.

I thought the solution was "QoS (upload)", so I tried it out but had surprising results. When I set the "Total (Upload) Bandwidth" to different limits, my DOWNLOAD speed was affected on speedtest websites.

450kbit/s Total (Upload) BW --> Speedtest download result of 12Mbit/s
550kbit/s Total (Upload) BW --> Speedtest download result of 15Mbit/s
650kbit/s Total (Upload) BW --> Speedtest download result of 3Mbit/s

I tried this several times and found there was an "optimal" Total (Upload) Bandwidth. Does this make sense? I really thought I understood it, but I guess I don't. Why would restricting my upload speed limit by download speed?

Volaris
Posts: 177
Joined: Thu May 01, 2014 1:02 pm

Re: Understanding QoS

Post by Volaris »

thunderdust wrote:I've been researching and testing QoS today and am hoping to get help with my understanding of it. I thought I understood it, but then my experience is not what I expected. I've read lots in the documentation and forums, so a big THANKS for providing a ton of great info! Sorry if this is an obvious question.

MY SITUATION: When someone uploads at fullspeed, our downloads get completely cut off to the point where no websites will even load.

I thought the solution was "QoS (upload)", so I tried it out but had surprising results. When I set the "Total (Upload) Bandwidth" to different limits, my DOWNLOAD speed was affected on speedtest websites.

450kbit/s Total (Upload) BW --> Speedtest download result of 12Mbit/s
550kbit/s Total (Upload) BW --> Speedtest download result of 15Mbit/s
650kbit/s Total (Upload) BW --> Speedtest download result of 3Mbit/s

I tried this several times and found there was an "optimal" Total (Upload) Bandwidth. Does this make sense? I really thought I understood it, but I guess I don't. Why would restricting my upload speed limit by download speed?
Internet is a two way street. Without upload, your computer/apps can't talk back to know what to download / continue downloading. So without upload QoS, it's normal behavior when someone uploads at full speed, your download speed will fall to almost 0 (and very high ping times, making browsing incredibly laggy).

To find your optimal upload speed, I like to start with what's measured by speedtest without QoS, then decrease by 50kbps, max your upload, and test again. Once you're at an optimal upload speed (my guess for you that it's 550kbps, then download speed and ping time will not be negatively affected when you max your upload.

Another warning... all this is assuming your available upload bandwidth doesn't decrease during peak times. Some ISPs get slower during peak times. If that's the case, then your QoS upload bandwidth should be set even lower.
QoS Tip: Don't complicate your QoS settings. Gargoyle evenly splits available bandwidth between active devices as needed. Just delete all your classification rules and leave only one normal service class and you're done. No more arguing over bandwidth.

orangetek
Posts: 20
Joined: Wed Nov 28, 2012 9:45 am

Re: Understanding QoS

Post by orangetek »

Limiting your upload to 90% of it's total capacity is only part of the solution. That alone will not resolve your issue. You need to understand that TCP sends (upload) an ACK (ackknowledgment) packet for every packet you download. If that ack packet cannot be sent because your upload is saturated, the other end thinks you did not download the packet and re transmits causing you lag and all sorts of other problems. Add to this, DNS packets which use UDP also need to be sent with priority otherwise your browser will not receive an ip to connect to. Critical ACK packets and DNS packets are usually small. A simple working setup for both upload and download can be done like so;

1. Enable Quality of Service

2. Total Upload/Download Bandwidth 90% of your actual total bandwidth for the direction you are configuring.

3. Add 2 new service classes, one named "Fast" and the other "Slow" Set (Percent Bandwidth At Capacity) to 50% for each class. Do not change any other settings for each class

4. Add a new classification rule with Maximum Packet Length 512bytes and set service class to Fast

5. Set the Default Service Class to "Slow"

Do this for both Upload and Download and you should be good to go.

thunderdust
Posts: 24
Joined: Sun Nov 22, 2015 9:37 am

Re: Understanding QoS

Post by thunderdust »

Thanks so much Volaris and orangetec! I think I understand most of it now. :) You guys are awesome.

I still have a nagging question on my mind regarding QoS (upload): So I found that my optimal "Maximum (upload) Bandwidth" is 550kbit/s by having Computer 1 upload a big file at full throttle, while I try speedtest on another computer. If I go any higher than that (eg 575 or 600), my download speed starts tapering off. But what I don't understand is why if I LOWER the Maximum (upload) Bandwidth, the download speed also starts to taper off.

For instance, If I set Maximum (upload) Bandwidth = 500 vs 550kbit/s, and then I upload at this "full power" of 500 vs 550kbit/s on Computer 1, why am I finding that Computer 2 has a lower speedtest download speed on the 500kbit/s upload limit compared to 550kbit/s?

I get it, that whenever we download, we are also uploading bits of information as well to "confirm" that we are receiving the file, but wouldn't 500kbit/s be more than enough to not be bottlenecking the download speed?

Sorry if this is a stupid question. Maybe I'm not understanding it :P

orangetek
Posts: 20
Joined: Wed Nov 28, 2012 9:45 am

Re: Understanding QoS

Post by orangetek »

thunderdust wrote:Thanks so much Volaris and orangetec! I think I understand most of it now. :) You guys are awesome.

I still have a nagging question on my mind regarding QoS (upload): So I found that my optimal "Maximum (upload) Bandwidth" is 550kbit/s by having Computer 1 upload a big file at full throttle, while I try speedtest on another computer. If I go any higher than that (eg 575 or 600), my download speed starts tapering off. But what I don't understand is why if I LOWER the Maximum (upload) Bandwidth, the download speed also starts to taper off.

For instance, If I set Maximum (upload) Bandwidth = 500 vs 550kbit/s, and then I upload at this "full power" of 500 vs 550kbit/s on Computer 1, why am I finding that Computer 2 has a lower speedtest download speed on the 500kbit/s upload limit compared to 550kbit/s?

I get it, that whenever we download, we are also uploading bits of information as well to "confirm" that we are receiving the file, but wouldn't 500kbit/s be more than enough to not be bottlenecking the download speed?

Sorry if this is a stupid question. Maybe I'm not understanding it :P
Did you setup your qos like i showed above?

thunderdust
Posts: 24
Joined: Sun Nov 22, 2015 9:37 am

Re: Understanding QoS

Post by thunderdust »

Did you setup your qos like i showed above?
Not yet. I didn't realize that might fix this weird phenomenon I was describing above. I'll give it a shot. Thanks!

Volaris
Posts: 177
Joined: Thu May 01, 2014 1:02 pm

Re: Understanding QoS

Post by Volaris »

I also use orangetek's QoS setup - they've worked flawlessly for the past few months. Below is a screenshot if you're wondering how both upload and download QoS looks.

Image

As for why your download decreases so much when you decrease upload bandwidth by a bit... I'm not sure. I know there has to be a certain amount of upload bandwidth to achieve higher download speeds, but I just limited myself to 100kbps up (just to test) and was still able to hit 5Mbps.
QoS Tip: Don't complicate your QoS settings. Gargoyle evenly splits available bandwidth between active devices as needed. Just delete all your classification rules and leave only one normal service class and you're done. No more arguing over bandwidth.

thunderdust
Posts: 24
Joined: Sun Nov 22, 2015 9:37 am

Re: Understanding QoS

Post by thunderdust »

Thanks! I appreciate the picture too. I'll try this out, as well as try it out on both 1.6.2 and 1.9.0. Might not get the chance for a couple weeks, but I'll be back here to post my success.

Post Reply