Default QoS Rules Contest **Complete**

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

Moderator: Moderators

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Default QoS Rules Contest **Complete**

Post by pbix »

*********************** Final Results *******************************
The rule set described below in this post is the winner. The new default rule set has been added to the Gargoyle repo and will appear as the default in releases after v1.10.0. Thanks to everyone who contributed on this thread. New users of Gargoyle QoS would be wise to just use the default rules and enable ACC until they understand more about how QoS works. Just doing these two things is likely to get you 90% of what QoS can do for you.

Folks interested in the inner workings of ACC might be interested in the new hotness related to this feature which is also now in the repo. Look for my separate post on the subject in the forum.
**********************************************************************

I have a confession to make. I made the current default QoS rule set years ago and I am not proud of them. They have just propagated forward since on their own inertia. Did not really know what would work best back then but since then I have seen several threads in this forum with good ideas for a better default QoS setup. It's clear that many have had experiences and ideas I have not had so Gargoyle should take advantage.

So I invite a contest of the faithful to design a new (elegant) default rule set. Yours truly to be the final judge. Based on what I read I will update this post with the current top contender. To move into (or modify) the top position your suggestion must be generally applicable to Gargoyle users. That is home users who don't know or want to know how it works. Your prize to be the pride of knowing you contributed to the project that will benefit everyone.

Current proposed default:

Code: Select all

Download Direction:
Enabled with one rule for packets less than 128 bytes to the 'Fast' class.
Default to the "Default' class
Fast Class 50%, Min 0, No Max, No Min RTT
Default Class 50%, Min 0, No Max, No Min RTT
ACC enabled with default settings.

Upload Direction:
Enabled with one rule for packets less than 128 bytes to the 'Fast' class.
Default to the "Default' class
Fast Class 90%, Min 0, No Max
Default Class 10%, Min 0, No Max
Please read the entire thread below to understand how this default was arrived at.

I look forward to seeing more comments.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

ispyisail
Moderator
Posts: 5194
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Default QoS Rules Contest

Post by ispyisail »

+1

Thanks

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

Re: Default QoS Rules Contest

Post by Volaris »

Thanks!

I'll give an explanation as to why I use such a simple QoS setup.

Since Gargoyle automatically splits available bandwidth equally, nobody ever gets more than their fair share. I'll explain: if you have a 10 Mbps connection and there are four active users maxing out their connection, each one will get 2.5 Mbps. What if there are just two active users and one is streaming a 3Mbps 720p video and the other user tries to max out the connection? Then that user will get the remaining bandwidth (in this case, 7Mbps). The best thing of all? All this happens instantaneously. If one active user stops downloading, then everyone's "fair share" of bandwidth just went up. Basically, Gargoyle automatically determines and distributes an equal share of bandwidth so the Internet connection remains maxed out if there's demand for it.

For me, this "per IP sharing" feature is easily the best feature of Gargoyle. Ever since I implemented this bare bones QoS setup, nobody in my household (4 users sharing a 10-12 Mbps connection) has ever complained about bandwidth. Just last week I tried the latest LEDE/OpenWRT with their Smart Queue Management QoS system with FQ Codel and Cake... and it was no match for Gargoyle. Within hours I had family members asking the dreaded "WHY ISN'T MY VIDEO STREAMING WITHOUT BUFFERING IN HD!?"

The other reason I like this simple QoS setup is because it doesn't discriminate by port. I believe the default QoS gives some priority to some ports (80/443/53) and I'm not a fan of that because there are a ton of different services out there that use ports other than those... VPNs, VoIP, certain audio/video streaming services, online gaming, etc. Think of it as net neutrality.

For those wondering what the setup looks like when implemented, screenshots below:

Image
Image

It's just one service class with no classification rules. Upload QoS is setup the same way, with your own bandwidth numbers.
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.

tcpmux
Posts: 14
Joined: Thu Jan 07, 2016 8:34 pm

Re: Default QoS Rules Contest

Post by tcpmux »

@Volaris: How does the simple QoS rules approach work in environments where there is a highly dynamic number of users, and the connection usually highly overloaded?

Our typical use case is, e.g., a camp in a remote location with a .25x1mbps connection, where there can be anywhere between 1 to 6 users, and often 4 or 5 will jump on at the same time, and the first one on will try to run a 1.5mbps streaming video. Will the other users be able to get anything? We've been using the MBs/hour quota approach with throttling, which I know does waste some bandwidth, but at least I understand how it frees up some bandwidth for other users to get their connections started.

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

Re: Default QoS Rules Contest

Post by Volaris »

tcpmux wrote:@Volaris: How does the simple QoS rules approach work in environments where there is a highly dynamic number of users, and the connection usually highly overloaded?

Our typical use case is, e.g., a camp in a remote location with a .25x1mbps connection, where there can be anywhere between 1 to 6 users, and often 4 or 5 will jump on at the same time, and the first one on will try to run a 1.5mbps streaming video. Will the other users be able to get anything? We've been using the MBs/hour quota approach with throttling, which I know does waste some bandwidth, but at least I understand how it frees up some bandwidth for other users to get their connections started.
It works the same way. If you have a 1 Mbps connection and five people are trying to stream a Youtube video, they each will get only 0.2 Mbps. Let's say the fifth person stops using bandwidth, then the remaining four will each get 0.25 Mbps. This is the minimum they'll get. If some of the users aren't streaming, then the person streaming will get more bandwidth. Gargoyle dynamically allocates bandwidth on the go depending on how many users are active to make sure the whole 1 Mbps is utilized equally.

I'll give another example using your 1 Mbps connection. Let's say there's only ONE active user streaming YouTube. At that moment, that user is using 0.6 to 1 Mbps (depending on the video quality). A second user comes with a phone and starts downloading an app. Gargoyle notices this and automatically equally splits bandwidth between both devices, so they each get 0.5 Mbps. A third user comes online and starts loading a webpage. During that brief moment, they each only get 0.33 Mbps, but as soon as that webpage is downloaded, it goes back up to 0.5 Mbps for the streamer/app downloader.

Hope that makes sense.
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.

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

Re: Default QoS Rules Contest

Post by Volaris »

I do have an additional QoS rule option for those that care about improving bufferbloat (lag that occurs when your bandwidth is saturated). When tested on DSLReports' speed test, this gets you an A/A+.
https://www.dslreports.com/speedtest
https://www.bufferbloat.net/projects/bl ... fferbloat/

Image
Image

Credit for the original idea goes to orangetek, who runs a 400+ customer WISP in Cyprus, as noted here:
viewtopic.php?p=32075#p32075

This works by prioritizing certain packets such as SYN, ACK, FIN, RST...

I modified it by lowering the maximum packet size from 512 to 128 bytes. I did this because at 512, torrents would take over the fast category. This is the lowest I could go to maintain an A/A+ rating for bufferbloat. 64 bytes wouldn't work.

So basically you have two service classes. One Normal for 90% and one Fast for 10%. You then create a rule for maximum packet size to 128 bytes and send those to the Fast 10% category. The reality is that these packets will never take up 10% of your bandwidth...

So overall, same QoS idea as the one before, but this one prioritizes some packets to give you better bufferbloat rating. Probably just for perfectionists, but I have to be honest that this setting does make web browsing feel snappier (best way I can describe it is that webpages/images seem to load instantly... almost as if they're preloaded), especially on phones and tablets. Maybe when Gargoyle transitions to LEDE this won't be necessary, as I noticed LEDE SQM QoS has no issue with bufferbloat.... but once you turn on a torrent it just falls flat on its face. I'm not a gamer, but maybe it would help online gaming?

Just putting it out there in case anyone wants to test it out.
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.

Daeron
Posts: 28
Joined: Mon Oct 31, 2016 5:30 am

Re: Default QoS Rules Contest

Post by Daeron »

I think prioritizing by both packet length and port 80/443 would be a good idea.

Classes and rules:
  • High: Packet length <512, Port 80/433 + Connection bytes <512
  • Medium: Port 80/443 + Connection bytes >512
  • Slow: Anything else
Reasoning:
  • High is a good catch-all ruleset for most basic activities. Filtering by packet length should reduce bufferbloat and catch game packets which are generally small. The second rule should prioritize casual browsing (loading simple webpages).
  • Medium is for video streaming or downloads via browsers. This includes watching Youtube or downloading a game via Steam. Other distribution platforms or game patchers generally update via these ports as well.
  • Slow is everything else. All P2P/torrent activity should be automatically caught by this.
I feel multiple classes are necessary because even though total bandwidth is equally shared among devices/IPs, it is fairly easy to max out your piece of the pie if you are doing more than one thing at a time on your device. Downloads can fairly easily saturate even a good connection.

The fact that Medium and Slow are separate classes means you can watch a Youtube video even with a Torrent going on in the background. High and Medium being separate means you can keep browsing/gaming normally while your game updates or your random download finishes.

This setup requires no specifics (apart from the fact that ports 80/443 seem to be fairly widely used by just about everything) but should work pretty well out of the box for a variety of usage scenarios.

If later the user wants to expand the rules, he/she can do so by simply adding another class and funneling traffic there. However the existing rules shouldn't need to be adjusted.

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Default QoS Rules Contest

Post by pbix »

Some interesting ideas but nothing for the upload rules?

The small packet ideas seem to me to be most appropriately handled on the upload side since that is where these are. My sense is that people who are having problems with "bufferbloat" metrics or slow web page loads under heavy load show concentrate on upload rules.

Do you apply this same rule on the upload side?
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Lantis
Moderator
Posts: 6920
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Default QoS Rules Contest

Post by Lantis »

This also has potential
viewtopic.php?f=13&t=11178
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

massive
Posts: 2
Joined: Sat Aug 19, 2017 4:17 pm

Re: Default QoS Rules Contest

Post by massive »

Daeron wrote:I think prioritizing by both packet length and port 80/443 would be a good idea.

Classes and rules:
  • High: Packet length <512, Port 80/433 + Connection bytes <512
  • Medium: Port 80/443 + Connection bytes >512
  • Slow: Anything else
Reasoning:
  • High is a good catch-all ruleset for most basic activities. Filtering by packet length should reduce bufferbloat and catch game packets which are generally small. The second rule should prioritize casual browsing (loading simple webpages).
  • Medium is for video streaming or downloads via browsers. This includes watching Youtube or downloading a game via Steam. Other distribution platforms or game patchers generally update via these ports as well.
  • Slow is everything else. All P2P/torrent activity should be automatically caught by this.
I feel multiple classes are necessary because even though total bandwidth is equally shared among devices/IPs, it is fairly easy to max out your piece of the pie if you are doing more than one thing at a time on your device. Downloads can fairly easily saturate even a good connection.

The fact that Medium and Slow are separate classes means you can watch a Youtube video even with a Torrent going on in the background. High and Medium being separate means you can keep browsing/gaming normally while your game updates or your random download finishes.

This setup requires no specifics (apart from the fact that ports 80/443 seem to be fairly widely used by just about everything) but should work pretty well out of the box for a variety of usage scenarios.

If later the user wants to expand the rules, he/she can do so by simply adding another class and funneling traffic there. However the existing rules shouldn't need to be adjusted.
I would like to try this setup, because I just can't do anything with torrents, which are very important for me. I am always downloading some new linux distributions and other stuff for job. I tried LEDE, and QOS SQM is not doing good for me when we talk about torrents, everything else is perfect but as soon as I start torrent, my wife and daughter are coming and knocking on my door :). I am using V 1.9.2 on WR2543ND with additional WR740N (1.8.0) wireless bridge.

You have one class and three rules, can you share the printscreens of your setup ?

EDIT: Actually I managed to apply your rules, and so far I have only one CLASS. I finished three torrents today, and also tweaked a torrent client, with limiting it to 25 connections per torrent and gave only 2 upload slots per torrent. I will perform some hard tests tonight, here I have slow connection, only 6-7 Mbps, I just moved to new house and waiting for better access 30-40 Mbps, and while I am on this slow connection, I have to manage for kid to watch youtube videos, for my wife to enjoy IPTV ( 2,5 Mbps - 3 Mbps ) , and for myself to browse this forum :) and to download torrent or two.
Last edited by massive on Sun Aug 20, 2017 5:24 pm, edited 1 time in total.
WR-2543ND - 1.9.2
WR740Nv4 - 1.8.0 - WIRELESS BRIDGE

Post Reply