I've set up SQM in my Archer C7 v4 with cake and piece_of_cake.qos. I've tested the bufferbloat in it seems fine. The CPU usage during the test is pretty high, getting spikes between ~80%-~90% , but the performance of the internet is good. When using a torrent client, the CPU usage is always on 100% and I encounter lag spikes and bad performance.
Is there a way to decrease the CPU usage?
I've used before QoS on WR1024ND with DD-WRT, and I've never noticed any problem with it. Should I use QoS instead of SQM in Archer C7?
Are you running the torrent client on the router or do you see this problem if you torent to a computer in your internal network?
Also, what bandwidth to the internet do you have?
An Archer C7, like most MIPS-based routers with similar single-core SoCs, without NAT offloading isn't good for more than a couple hundred mbps, even before you get to "fancy" QoS/SQM management.
Unit has been running for a week, so byte counts are high. Line has 40+ devices on it and stays pretty busy. Performance is fine, but anytime I look at top or load averages, they are high.
Thanks @JonFo this might indicate that the C7 v4 might simply not be up to the task of shaping the OPs 50 Mbps under a real demanding/multi-flow load like bit torrent, which is a bit sad, as I believer we used to be able to shape up to around a combined 60-70 Mbps on similar MIPS hardware. I guess It also depends on what else your router needs to do. Since you connect via ethernet could you for a quick test disable all radios in the router and reprat the turrent test? (I have a 500MHz Lantiq Xway MIPS 34Kc @500 MHz that can definitely not handle sqm/layer_cake, NAT, PPPoE-termination, firewalling duties and wifi at the same time, so it might be simply to much load for the hardware (then again a 750MHz MIPS 74K device with 128 MB ram should better than the old 34Kc...). Are you using PPPoE or ds-lite by any chance?
In my case, the radios are disabled already. I use separate AP's.
Yes, I'm using PPPoE as the modem is a dumb DSL bridge modem, and my ISP requires PPPoE.
I do have a friend on 250Mbps Cable that has the same hardware and firmware levels as mine, and he can shape up to around 150Mbps effective. His user experience is great, but the CPU load while running the tests does hit 100% and idle goes to 0% and sirq is high. So it can definitely handle 50, but maybe the high connection count caused by torrenting is a heavier CPU load than traditional usage patterns.
wow. I note that the ack-filtering code is fairly high overhead, also. But, wow, look at how effective it is being! Do you "feel" a difference in normal use with ack-filtering on?
On the torrent front, one thing I keep hoping will happen is that torrent clients will start marking their traffic CS1, which pushes torrent traffic to the cake background queue (6.5% bandwidth minimum) It's a one liner in transmission's settings.json. Similarly, I see no use of the "bulk" traffic class on the inbound so you could try matching on the port number to send stuff that way.
per-host fq as cake does "solves" this problem pretty well without classification however.
Dave, one thing I've noticed is that some low-cost managed switches, such as TP-link ones use the DSCP values as if they were a monotone increasing priority. So CS1 actually gets more priority in the switch than CS0. Because of this I've been tagging all my ingress as CS2 by default and then up or down shifting priority from there.
prioritization/QoS is hard, and poorly standardized. If you have different managed switches they'll do different things for example. I have a mix of Zyxel and TP-Link switches, and I can't control the TP-Link so I've customized the QoS in the Zyxel to match the TP-link, with that, and appropriate DSCP tagging within the router, squid proxy, and on my VOIP phones etc, I can get excellent responsiveness for all my real-time stuff (VOIP and Games), as well as my moderate priority stuff (Video streaming), but the effort that's gone into getting it right end-to-end across my network is quite high.
EDIT: incidentally, the reason it even matters in the switches is that I run home directories off an NFS server that has a bonded NIC, and the switches use LAG group trunks, so there can be large high-bandwidth LAN transfers just from everyday usage (several machines hitting the file server at once) so prioritizing certain traffic in the switches is necessary to ensure VOIP or game traffic is delivered in a timely manner between the phone and the router even if you're opening up a multi-gig data file or copying a video to the fileserver.
@dtaht yes CS6 works great for VOIP, better than the usual EF because by default the wifi drivers put EF into the VIDEO WMM queue whereas CS6 makes it into VOICE.
The issue with CS1 was more that I was tagging large streams like torrents or whatever CS1 and it was slowing my local NFS file transfers tagged CS0 now that everything starts at CS2, CS1 for torrents or whatever does work fine.
It's great how every tech issue has an appropriate xkcd to link to
Mmh, no smoking gun, but I can almost guarantee that overhead 8 ist wrong. if this is a cable/docsis plan try setting the overhead to 18.
Are you by any chance able to seoarate the torrenting out from the computer yu use for your interactive browsing? If yes, have a look at the "Making cake sing and dance, on a tight rope without a safety net" section of https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details to learn how to configure per internal IP fairness. That has the promise to localize the bad latency spikes to that computer that actually overloads the network by torrenting while other computers might continue to work well for interactive use. If that helps it might be time to figure out hoe to configure your torrent client to behave better.
I'm using PPPoE and set it to 8 by the SQM guide in OpenWRT wiki. Should I change the value to something else?
Unfortunately, I can't separate the torrent client from my computer. Should I use luci-app-qos instead of SQM? As I mentioned before, I used DD-WRT's QoS on TL-WR1043ND. It worked without any problems, on the same bandwidth shape.
What kind of plan do you have? The bandwidth reminds me of cable/Docsis, but PPPoE would rather indicate XDSL/Fiber? Anyway 8 is almost always the wrong Overhead
Well, actually all you would need to do is use a different interface on the same computer an make the torrent client bind to that interface, but I guess that is not much easier than re-locating the torrent client to a different machine.
That is your call, if you can use port based rules to identify the torrent traffic qos-scripts/luci-app-qos might be better suited to reduce the impact of the torrents on the rest of your network (but so might using the throttling that the torrent client probably offers in its configuration).
So the per-IP fairness cake offers seems to be a much easier to use method compared to setting up complicated QOS rules (to make up for the fact that torrent clients/servers tend to be overly optimistic in their congestion measurements when faces with a non-latency-inducing AQM like cake/fq_codel), but the cost of that simplicity is that you will need to use a separate machine (heck a virtual machine should be enough). I am sorry that this design is not optimal for your use-case.
I'm still getting used to the terms
The plan is VDSL2 with maximum speed of 100Mbps, but I only get around 55Mbps (poor infrastructure).
Is 8 still wrong?
I've managed to get stable connection with QoS (again, in DD-WRT) by prioritizing all the packets but ACK with fq_codel and HTB (if I remember correctly).