For anyone else, I fixed the Unbound issue. Now I have dnsmsaq serving dhcp and local DNS resolution for hostnames, and Unbound doing DNS over TLS to my AdGuard Home adblocking server upstream:
OpenWrt actually also has the AGH package available itself, but I already have the VPS running and I'd rather have DNS off prem in case of issues, as our mobile devices rely on it off-network too. It was fairly easy in the end.
I downloaded and left seeding an Ubuntu 21.04 torrent to test latency this morning, and my BQM didn't even flinch. My base and average latency is down compared to before, no yellow spikes at all, and my upload is responsive throughout. Cake really rocks. Just a tiny increase in average latency during the seeding, and back down again once I closed the torrent client (after ratio >2). I've cropped it because it's such a small increase during seeding you'd struggle to see it on a full graph. It's around 5am-7am (notice the extra latency in the blue band). Tiny! Before I'd have had wide blue and massive yellow spikes. I can't recommend cake and proper SQM highly enough - now I know why Dave gets so excited, it's transformative to the line, and no more hiccups in WiFi calling or whatever when someone is saturating the upload.
That is a lovely result.
While I'm hanging out here, is it possible to nominate Simon Kelly for a knighthood? He's british, and he's the author of dnsmasq (he's mostly retired now), which is probably still the most used dns server on the planet. He's very modest about it, and yet with quadrillions of dns and dhcp requests served... deserves a bigger boat.
I'm still very interested in "before/after" tests, but your results are typical of cake or fq_codel, typically wonderful, and yet a tad misleading.
1) You are showing zero packet loss on this test. There probably is plenty of that, but only on the heavier torrenting flows, which you can show by pasting the output of:
tc -s qdisc show
here, if you like. I can then try to explain what those statistics mean.
2) fq_codel is still a better, lighter weight algorithm than cake is in multiple respects, however several things that cake does that are very important are:
A) it does per host/per flow fair queuing. With fq_codel, Bittorrent in particular - say you have set it to 98 flows instead of the default 5- vs two regular download to another box, will still grab 98% of the bandwidth (although the ledbat algorithm helps a bit here, and the default of 5 is gentle and effective enough for transparent use of torrent with fq_codel)
it helps a lot in this extreme case to have cake on the bottleneck router where nat is. The nat option is part of dangerous settings in openwrt, (because a few devices don't do it right), but if that's on, and you have one device doing those two downloads, and 98 simultaneous torrent flows, each box gets half the bandwidth.
We didn't actually put that in there for torrent specifically, it came from a paper about gaming DASH (netflix-like) traffic:
https://dl.acm.org/doi/pdf/10.1145/3344381
A way to think about per host fq is that each host gets *up to* 1/(active hosts) amount of the bandwidth. The up to part is important - if you are using less than your fair share
of the bandwidth, you don't feel the other traffic hardly at all. You can be under a massive DOS attack (from one server) and not notice, either. And most hosts are not active all the time.
B) cake also does diffserv classification. IF you want to assign even less bandwidth to torrent, mark it with either diffserv codepoint CS1 (deprecated) , or LE,
and that will end up in the bulk "tin", with a minimum of 5% of the bandwidth and a max of 100%.
C) Because you are doing inbound shaping you are observing a small increase in delay. If the ISP was doing this work for you, only in extreme cases would you see any
delay at all for ping, even 100 pings, at this bandwidth. That said, it's hard to trust the ISPs to get it right.
D) It does frame compensation right for docsis and dsl, letting you get very close to the ISPs's rate without error and thus controls latency spikes that can be induced by packets that are variable in size. You do have to tell it to use those parameters however.
Thx so much for burning the midnight oil to provide such an excellent example, and I hope all of England follows suit, or at least, deploys docsis-pie.