What's new

Adaptive CAKE QoS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Maybe their clock time is drifting on the router. :p

Many of the people looking for a better solution are in locations where they have the best service possible, yet there needs exceed this service without QOS. This is particularly the case for people that have a fast download and a rather slow upload. The upload is easy to saturate and this effects most applications. It is a tough situation to be in and they will have to make choices. For some of the people that fit this category, Dave is providing a hybrid solution that will help them have a better experience and I admire Dave for doing this. Having managed QOS for a large network in a similar situation, the network administrator will have to decide or have his users decide and guide him on what works well and what may suffer.

Morris
 
Damn. I had a chance to restart my router today, and was keeping an eye on flexcake to make sure it all came up properly.
I had set flexcake.sh to run from firewall-start as I thought that this was run after the Trend QoS rules were applied. This doesn't appear to be the case and I had to run flexcake.sh manually instead.

Is there a better way to automatically run flexcake.sh after the Adaptive QoS comes up?
Is there another service-event I can hook into perhaps?

This is all only temporary mind you. I am eagerly awaiting the new Cake option in the FlexQoS script :).
 
Is there a better way to automatically run flexcake.sh after the Adaptive QoS comes up?
Is there another service-event I can hook into perhaps?
Not really. The trick is to wait until the stock Adaptive QoS rules are done being added. You could add the old 5 minute sleep delay from the FreshJR days to be safe.

I’ve realized that FlexQoS is poorly written in many regards so it is harder than I expected to integrate the Cake setup. I‘ve had to rethink parts of the original script. But it will happen eventually.
 
You don’t say? ;)

The trick will be to only prioritize what is important to you, or deprioritize what is unimportant to you.
I agree Dave. In my experience when there is little bandwidth, deprioritize what is unimportant is most effective. This is particularly important if YouTube is important due to the way Alphabet messes with sources to avoid copyright infringement.
 
There are not so many games that flood the interface on their own. You are talking about 1Mbps download for the worst of them (and far less than that in upload) . Adding VOIP on top of that is unlikely to tip anything over the edge unless you have a horribly slow connection.
If the interface is that slow then the various users are going to be better off coming to an verbal agreement to not use their respective services simultaneously, otherwise noone will have a satisfactory experience.

IMHO all interactive flows need to be up there in the top category (so long as they aren't massive data hogs).

Now I don't know what the various game-streaming services would be categorised as (These are the ones that run the game on the server and just stream the video to the user). Those will need to be low latency, but will be huge data hogs.
Though my earlier statement about slow connection still holds. If the game exceeds the interface's capacity in the first place, then the experience is going to be garbage anyway. The user needs to accept that their connection is incapable of supporting that activity.
Games present an interesting challenge. They tend to be very small packet intensive which can result in CPU load that can cause latency yet they are latency sensitive. This traffic needs priority though it probably should be lower priority than video streams, audio streams and VoIP. At the same time, games also send large updates which need to be pyritized as a download or risk them hogging the link's bandwidth. Cake will handle all of this naturally with best effort.

I agree with you that pyritizing to address insufficient bandwidth is not a great solution. The users working together would be great yet that utopia may not be realistic.
 
Games present an interesting challenge. They tend to be very small packet intensive which can result in CPU load that can cause latency yet they are latency sensitive. This traffic needs priority though it probably should be lower priority than video streams, audio streams and VoIP. At the same time, games also send large updates which need to be pyritized as a download or risk them hogging the link's bandwidth. Cake will handle all of this naturally with best effort.

I agree with you that pyritizing to address insufficient bandwidth is not a great solution. The users working together would be great yet that utopia may not be realistic.
Hmm yes too true, that is one of the big weaknesses with the Trend marking scheme, that they lump game downloads in with the game multiplayer data. It must be possible for them to detect the difference, and it makes zero sense to make the downloads/updates a priority. We are stuck with what the binary lump provides though.

I still think that in the ideal world, game data should be in the voice category, above video streaming, but considering the practical limitation described above, that might not be so good.
I suppose if games were put in the "video" category, then the "voice" data is unlikely to ever fill the pipe so much to be a problem (fingers crossed*.
 
Like you mentioned earlier on your earlier post. You should/I would recommend trying the stock firmware to compare the the issues (if any) you're seeing w/QoS from 3rd party to the stock fw while using the 3rd party scripts vs stock QoS.

What I meant with my comment was that at the the end of the day, most of your bufferbloat issues will be coming from your ISP. Maybe when you switch to the stock fw, all your bufferbloat issues may be fixed, who knows...

Do what's best for your environment.

Best of luck though.
finally got ar4ound to testing this. it does the same with stock fw just an fyi
 
hey so did you ever determine if only disabling flow cache and leaving runner enabled had no ill side effects?
 
Wait so did i Miss all the Fun and Op quit ?


its as some have said - 1g down ( about 954 some times) and 50 up ( gets throttaled below 30 if no QOS is on) but that in turn chews the download lower

is there some other QOS i should be using ?
 
Wait so did i Miss all the Fun and Op quit ?


its as some have said - 1g down ( about 954 some times) and 50 up ( gets throttaled below 30 if no QOS is on) but that in turn chews the download lower

is there some other QOS i should be using ?
Cake will not reliably apply flow fairness if HW acceleration is enabled, so the original hack script I posted is abandoned. But I am working on putting Cake as an option in FlexQoS to take advantage of Trend Micro traffic categorization and Cake’s algorithm. But HW acceleration won’t be allowed, so your gig connection would be severely hobbled. If you need QoS, your best bet is Adaptive QoS with FlexQoS addon.

I’ve got the script part of the next version of FlexQoS functional, but still need a lot of work on the GUI to get the stats and draw some graphs using Cake data. I’ve come up with a way to refresh those stats while someone is logged into the GUI, since it’s not inherently possible via the firmware like it is for htb classes.
 
Hmm yes too true, that is one of the big weaknesses with the Trend marking scheme, that they lump game downloads in with the game multiplayer data. It must be possible for them to detect the difference, and it makes zero sense to make the downloads/updates a priority. We are stuck with what the binary lump provides though.

I still think that in the ideal world, game data should be in the voice category, above video streaming, but considering the practical limitation described above, that might not be so good.
I suppose if games were put in the "video" category, then the "voice" data is unlikely to ever fill the pipe so much to be a problem (fingers crossed*.
This was one of my big annoyances too. I had to set Gaming to high priority, but throttle the maximum back to about 70% of incoming downstream, and cross my fingers that multiple games will share and the download won't squish the other ones.

I miss my Tomato QOS where I could prioritize by IP-range/Hostname, Port, and data transmitted. It wasn't perfect, but having game connections on standard ports kick out to bulk downloads after say 16MB worked pretty well for games that didn't split their ports adequately. That way a 4GB update gets knocked down pretty quickly, but most game traffic (which is pretty compact) could still benefit when the connection is under high load - at least for one round, anyway. Things like that helped for games that used standard HTTP ports as well... like Guildwars.

Every time a Steam game update flags as HTTP/Web, I get annoyed. :p

I would love it if games and software would just publish which ports they are using for which services. Downloads? Port 12080. Game traffic? 6080-6100. VOIP? 6079. Etc.; or if there were standard identifiers when initiating a connection, and traffic shaping software could just read those out and understand what the connection is for. That'd be wonderful, if adhered to!
 
There are not so many games that flood the interface on their own. You are talking about 1Mbps download for the worst of them (and far less than that in upload) . Adding VOIP on top of that is unlikely to tip anything over the edge unless you have a horribly slow connection.
If the interface is that slow then the various users are going to be better off coming to an verbal agreement to not use their respective services simultaneously, otherwise noone will have a satisfactory experience.

IMHO all interactive flows need to be up there in the top category (so long as they aren't massive data hogs).

Now I don't know what the various game-streaming services would be categorised as (These are the ones that run the game on the server and just stream the video to the user). Those will need to be low latency, but will be huge data hogs.
Though my earlier statement about slow connection still holds. If the game exceeds the interface's capacity in the first place, then the experience is going to be garbage anyway. The user needs to accept that their connection is incapable of supporting that activity.
Agreed, most games are pretty easy on the connection - except maybe old ones with horrid netcode. (I'm looking at you, BF2142 - Titan lag - it maxed out my 6mbit back when I had ADSL1... a 50 person server must've been sending out 400+ mbit. There's a reason why servers cost $50-60/mo)

The majority of games are more like... 20-40KB/sec, probably 200 packets per second. They want them at the other end in order, ideally, so get them out the door as they are ready. VOIP traffic won't have to fight with that. Plenty of bandwidth remaining. Only real-time stuff like Zoom would dwarf game traffic, but even there it's not a big deal if you have something reasonable like 25mbit. Really it's just downloads and the bandwidth hogs (like buffered video streaming - YouTube, Disney+, Hulu, Netflix) that will gobble 25mbit immediately... or even 100mbit, with enough devices and 4K turned on.

I like to deprioritize buffered video streams but give them lots of bandwidth, and prioritize more important connections, but cap their maximums so that if anything gets classified wrong, they don't completely hog the connection.
 
Cake will not reliably apply flow fairness if HW acceleration is enabled, so the original hack script I posted is abandoned. But I am working on putting Cake as an option in FlexQoS to take advantage of Trend Micro traffic categorization and Cake’s algorithm. But HW acceleration won’t be allowed, so your gig connection would be severely hobbled. If you need QoS, your best bet is Adaptive QoS with FlexQoS addon.

I’ve got the script part of the next version of FlexQoS functional, but still need a lot of work on the GUI to get the stats and draw some graphs using Cake data. I’ve come up with a way to refresh those stats while someone is logged into the GUI, since it’s not inherently possible via the firmware like it is for htb classes.
sweet, cant wait to test this. could i trouble you to ask to maybe possibliy add ipset functions like you did with the cakeqos dev branch so i can make iptable rules based on domain names as read from dnsmasq in addiition to specific ip addresses. it would simplfy some things. just a requestion not a big deal
 
@dave14305 Im not sure it was this thread, but saw you mentioned using a rasberry pi for a router. Ive thought about doing the same so I could tweak on sqm more for my use. Besides being a issue for the family, did it seem to work decent? I could use one of my linux boxes, but would have to buy another nic, probably same cost as a pi.
 
@dave14305 Im not sure it was this thread, but saw you mentioned using a rasberry pi for a router. Ive thought about doing the same so I could tweak on sqm more for my use. Besides being a issue for the family, did it seem to work decent? I could use one of my linux boxes, but would have to buy another nic, probably same cost as a pi.
I’m actually using it now. I’m pleased with it and enjoying being back at the bottom of the learning curve for a while.

I’ve got cake setup on my WAN and LAN interfaces on the Pi (not using any ifb interfaces), and using ipsets and firewall rules to classify upload/download traffic into diffserv4 tins by setting DSCP classes.

Just switched over on Saturday night, so still working on additional fine-tuning.
 
I’m actually using it now. I’m pleased with it and enjoying being back at the bottom of the learning curve for a while.

I’ve got cake setup on my WAN and LAN interfaces on the Pi (not using any ifb interfaces), and using ipsets and firewall rules to classify upload/download traffic into diffserv4 tins by setting DSCP classes.

Just switched over on Saturday night, so still working on additional fine-tuning.
Thanks for the feedback, Are you using it as your total router? I have nodes spread around my house, out to my barn, even out to the pool. I was "thinking" about something that did sqm better between the modem and Asus router (disabling all qos,etc) and leaving
the basic network intact. Does that make sense? modem > pi > asus > mesh
 
Are you using it as your total router?
Yes, for now. My 86U has been reverted to stock and put in AP mode (my version of burning the ships). Best to continue discussion in this thread:
 
@dave14305 So seeing your comments from other threads recently. This project doesn't seem dead, and seems like you will bring it forward in the future. I hope that's the case, and look forward to trying it out. As it seems this will use Adaptive QoS/Trend Micro's system, mixed with Cake. From what I read so far, pretty much use Trend Micro's Adaptive QoS system to classify traffic, sorting that traffic through Cake QoS using diffserv4 categories.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top