Need help with qos/sqm-qos

Okay, this is not going to work well with sqm-scripts out of the box. The one thing cake can offer is to try to distribute the available bandwidth fairly between (internal) host IP-addresses, but if your two critical services live on the same machine than this will not work for you, sorry.
The problem is that by default cake offers per-flow fairness (so all flows are treated equally, and an application will get a share of the available bandwidth that is proportional to its fraction of active flows), and since your torrent client will handle more open connections/transferring flows concurrently than your ftp client (it was ftp, right?) torrent flows will get on aggregate more bandwidth than the fewer other flows.
For most users it seems acceptable to dedicate a machine to torrenting (or ftp for that matter) that is not used for other critical services (like interactive use or data serving), and in that case cake's per-IP-address isolation modes help a lot. But again this is not the setup you seem to use.
For your requirements going for port specific traffic rules seems appropriate, but since I never had that requirement, I never even attempted to implement something like that and hence can offer no explicit advice. (In your shoes, I would probably either try to isolate the torrent host from the ftp host, so that the dual-isolation options might have a chance to work. Or I would try to figure out how to DSCP label the torrent packets*)

*) Unfortunately there seems to be the misunderstanding in the torrent scene that µTP/LEDBAT is sufficient to make torrents share a link nicely with other data flows, but these rely on the fact that with traditional over-sized and under-managed buffers the RTT increases proportionally to the congestion level, so they try to respond to increasing deay with scaling back their bandwidth. This works reasonably well unless on uses an AQM like cake or HTB+fq_codel that will avoid to have the queueing delay "explode" under saturating loads...

The answer to that is no, sqm does not offer this capability. This level of detailed traffic rules is pretty much what sqm started out to avoid having to fiddle with (think of it as the AQM for the rest of us). That said, since sqm-scripts is in the end a machinery to execute different shell-setup scripts you can of course edit the existing scripts to add solutions to your specific problems, but you are pretty much on your own with that.

1 Like

@moeller0 wou wou, well i can not afford to have different pcs for torrents and ftp server beside my pc is a beast can handle this can of set up, and it is unfortunate that you can not help me, i will tried to take few key words you mention in your reply and work with that to do a little of more research, hopefully will have the knowledge of manually adjusting the peace of cake scrip to be able to prioritize what i need.

guys can you take a look at this reply i got on reddit https://www.reddit.com/r/openwrt/comments/68yslm/need_help_with_qossqmqos/ .thank you

As I said; [quote="Doppel-D, post:25, topic:3424"]
deinstall luci-app-sqm & sqm-scripts and install luci-app-qos & qos-scripts
[/quote]

I should be possible to solve your problem with an appropriate setup

i did and still does not work

what do you mean, can you fix it for me ?

One t is missing; It should be possible :- ) So, you are doomed......

In my case I had torrent and download/upload traffic coming from different internal IPs, which from what I understand is a key. Everything was on a single computer that has two network cards and seven different IPs so SQM seems to be able to do its job properly. If all traffic is coming from the same IP, then as I understand SQM cannot handle that properly.
Just to verify that again, I started torrents, pings, and a download test and my download test immediately got a half of the bandwidth. Once it stops, all bandwitdh goes back to torrents. Again, one computer but the traffic routed through different IPs.

The instructions in the LEDE documentation wiki will tell you how to properly set-up per-internal-host-IP fairness, but it seems this is not what you are after, so I doubt that this will help you very much (unless you manage to get a different IP address for your FTP server...)

sqm-scripts and qos-scripts (and their respective luci apps) can be installed at the same time. You should simply not enable both at the same time (there is no automatic disabling of the other implemented in either of the two, so you need to manually coordinate). That said, most likely you will also be able to run both at the same time as long as you instantiate both on different interfaces...

update: well my friends after trying ddwrt, discovered that the latest beta version for my 3200ACM did not have the pie qos discipline which is strange because latest beta for my asus RT-AC68U does have it, anyways ddwrt devs (dev, brainslayer) i believe is not planning on implementing cake anytime soon (i could be wrong but there is no way of asking him/her), then i thought why not give it a try to oem firmware, wifi seen to working fine (need to test it more) but of course its their router so it better works, then i set up their qos feature called "Media Prioritization" gave port 21 and 80, i discover that it does work way better that ddwrt and lede, sort of, it has some flaws, for example, it only has high and normal priority, and there is no way for me to put port 4999 on normal priority being that said, during my test, i send a request over ftp/21, and all bandwidth is given to that port for a moment then upload speed start decreasing, so at this point for right now im going to stick to oem firmware until i get a answer from this guy https://forum.openwrt.org/profile.php?id=154301, he seen to know how to prioritized ports within sqm qos, among other things, also i had some unreliable wifi performance with latest lede beta and i have a family who relies on wifi, etc, now don’t get me wrong i really like and appreciate free open source projects such as lede, but right now im going to stick to oem firmware, also im thinking on building my own 86/64 router and throw https://www.pfsense.org/ on it and have it manage my network and hopefully, will be able to accomplish what im looking for, anyways guys i look forwards to yours thoughts and comments, thank you have a wonderful day.

@aniel, have you tried using Transmission , running on your router? You can connect the router to any NAS share you may have through Samba, or a directly attached USB Drive, and store your torrents there. This way QOS will work since traffic for FTP and Torrent will be from different computers. OR you can setup your FTP on your Router, which is way easier

@mariano.silva im using qbitorrent as client for torrent and ser-u as my ftp server software, now dont know what is the difference between using torrent and ftp within my router to using my computer, i just don't see to much advantage using the router for those tasks but I could be wrong

lol yea!
were using this at lan-parties like 20y ago.

btw, someone still whiping the lamas ass?

what do you mean ?

BWAHAHAHAH!!

Wow...

That really does whip the llama's ass!

@aniel
If you still need help, please come here Ultimate SQM settings: Layer_cake + DSCP marks

all this needs to be done in the command line?

1 Like

you just need to put it inside script then just play with port numbers, i can help you if you stuck somewhere!