Need help with qos/sqm-qos

hello guys im trying to have torrents running at full speed while prioritizing ps4 (for gaming) and ftp (uploads/downloads), i have a connection of 350/30 mbs, but for some reason when torrent client is running at full speed and try to download a movie trough ftp it does not slow down torrents, even thought i have set up ftp port to have priority over torrent client (port 8999), any help or comment will be appreciated, thank you in advance.

A lot room for questions ;- ) Router, interface, ingress/egress, qdisc used? Config what/how?

there are not many consumer routers that can manage traffic above 200mbit/s. (what device do you have?).

generic advice is to use the cake-qdisc with dual-isolation (search forum for cake setup), which will give all hosts in you network equal speed's.
this will work best without manual classification (which is kind of deprecated sinces most stuff uses tcp/443 anyways)

Based on that I think that you are using the rather deprecated qos-scripts, as the more modern sq-scripts does not offer port priorisation.

  • Use SQM and cake qdisc (e.g. "piece of cake" selection).
  • Set traffic speed limits so that you leave at least some 5% download bandwidth free, and maybe even more of the upload bandwidth.

(Note that qos-scripts and sqm-scripts should not be used at the same time, so remove qos-scripts)

It should in theory, but torrent protocol saturates router CPU with context switches (5..6K a second in my testing) and leaves sqm no room to function. Any other multi stream download work ok, but not torrent...
I have not yet been able to explain the cause(s) for the context switches, but it could simply be due to a significant amount of UDP traffic.

ok guys thank you for replaying now after doing a little more research and having some issues with wifi i decided to give tomato a try and if that does not work, i might just go back to ddwrt. dont get me wrong im loving lede but my goal is is to have torrent running at full speed while prioritizing gaming (ps4) and ftp, and if i can not accomplish that what is the point.
Router=LEDE Rango 3200ACM
interface=luci with material
ingress/egress= dont know what this is
qdisc used= cake with pice of cake qos
Config what/how= can you be little more specific.

You can still get it going full speed; I did. You just need to limit the torrent client to not connect to too many peers. Too many connections overload the router and is not provide increased speed...

i just tried, does not make a difference, also cpu usage is minimum, this is so frustrating.

You just scratched the surface...and now you quit. ... you are quite fast ;- )

jaja im sorry thank you for your help thought, now im gonna give ddwrt another try since there is now a 2017 beta version, i really gonna miss if anything having the latest technology such latest wifi driver and cake qos disciplines etc.

Dd-wrt every two weeks has a new are welcome :- )

thank you i will give it a try, edit: now im stuck cant go back to factory, edit: found this but still have not found a solution to my issue, does anybody know how to fix it.

edit: also found this but i dont understated half of it, please im needing help.

@aniel - You're welcome to try DD-WRT, but if you want the cake/wifi-fixes, you can give LEDE another try.

To get the fastest data rates with low latency, please read the SQM Howto at:

If that doesn't seem to work well enough, please copy/paste the questions listed in the "Debugging SQM" posting (along with your answers) at: Debugging SQM to Eliminate Bufferbloat

This will help you get going with the "right stuff", and provide us enough information about your situation if it doesn't seem to be working. Thanks, and good luck!

thank you @richb-hanover, so it seen to be that i have do do it manually, something to do with the ip tables idk, but hey thank you for taking your time to give me that info i will take a look and report back,

Hi @aniel I realize we never said it, but our experience has shown that SQM has solved the latency problem for almost everyone, without needing any other tuning (especially with no additional settings of QoS or iptables...)

I realize this is counter to most people's expectations, but it really works. Most people using SQM can fully fill their connection with torrents/uploads/etc. and still game quite effectively.

My advice:

  • do a clean install of LEDE 17.01.1,
  • install luci-app-sqm, and set the parameters as described in the Howto
  • Test your network.

It will probably be good enough without any other tuning. And if it's not good enough, then paste in answers to those questions and we can give more advice. Thanks!

1 Like

• What brand/model router do you have?=Rango 3200ACM
• What version of LEDE are you using?=Latest beta from here
• How do you connect to the internet? Cable? DSL, other?=Cable
• What's your nominal/expected/advertised download speed? Upload speed?=250/30
• If you turn off all QoS/management, what are your measured download/upload speeds?=360/30
• What is the WAN "interface name" in the Network -> Interfaces page=eth1.2
• What parameters do you see in the Network -> SQM-QoS values? The most important are:
o Enable this SQM instance (should be checked)
o Interface name (should be the same as the "WAN interface name" from above)
o The number entered for Download Speed (in kbps)=359000
o The number entered for Upload Speed (in kbps)=29000
o Queue discipline (default is "piece of cake" if it's a new build, or fq_codel)=cake with peace of cake
o Set "Which Link Layer to account for:"
 If you're on cable, should be "none"=yes
 If you're using DSL/ADSL, should be "ATM", and Per-Packet Overhead (in the Link Adaptation tab) should be 44
 If you're using VDSL2, should be Ethernet with overhead and Per-Packet Overhead should be 8

Now I agreed with you that SQM-QoS make my network traffic perfect, im not complaining about that, what im saying or trying to accomplish is having torrents running at full speed while prioritizing gaming (ps4) and ftp upload/download (home/media server). Essentially what I want is for example, lets say im away and I want to watch a movie or tv show on the go from my server using kodi as an example, I would like the router to slower down torrents and prioritized that ftp request. That is all im asking and thank you.

Thanks for all those settings. I'm very pleased that the network is working well.

Lots of times there's no need to add special configuration to "penalize" certain kinds of traffic because cake/piece-of-cake are designed to provide fairness both for low latency and for a share of bandwidth.

I don't mean to be rude, but how do you know that you aren't getting the performance you want now? Do you have measurements that show what's happening?

  • Have you measured ftp speeds with and without SQM enabled?
  • Have you measured latency/lag while you're gaming and torrenting (and, of course, ftp'ing a movie?)

If they're good, then you're all finished. (Watch another movie!). And if they're not what you want, please let us know which measurements are a problem (we already have the data from the message above.) Best regards.

sorry forgot to mention, this is how im doing the test, i open torrent client which get to 2.5-3.2 on average in uploads, then i use my phone lte data and log in to my server (ftp) using an file explorer manager, then i try to download a movies, i look at the download speed (upload speed on my home network side) and then also keep an aye on the upload speed for the torrents and they dont slow down, so i would love to see the torrents slowing down so that i can get full upload speed for that movies, note: i say download because that how i measure the kbs/s or mbs/s for that matter, ideally for no buffering issues, will need uploads to hit from 700 to 1mb/s upload otherwise it will be a lot of buffering, so thta is why i need to prioritized the ps4/ftp over torrents (port 8999)

Does this fit together?

what do you mean?