Looking at https://openwrt.org/toh/tp-link/tl-wr1043nd I believe it might well be that you are running out of CPU-cycles (which might explain the low bandwidth after shaping, but I note until I see /etc/config/sqm I have no idea what to expect for goodput after shaping), Also is this a cable link, and are you by any chance using a modem affected by the pume5/6/7 latency bug (see e.g. https://www.badmodems.com)? In that case sqm will only help to improve the average latency but will not be able to get rid of the annoying >=100ms latency spikes introduced by the modem...
as the mandatory DOCSIS shaper assumes 18 bytes overhead. The ingress keyword in iqdisc_opts will keep the link slightly more responsive when multiple bulk flows are saturating the downstream. The two dual-XXXhost options in that combination should give you equal bandwidth sharing between your internal IP-addresses (if yiou do not want this simple delete these two options)
I note that the openwrt wiki for v2 of your router says:
"The v2.x and v3.x get the lan and wan interface not via eth0.1/eth0.2 but via eth0 (wan) and eth1 (lan). The eth0 is in the same vlan as port 5 on the switch. Because of that, port 6 on the v2.x, v3.x routers is an additional CPU port - used for wan traffic only." So something looks off with your eth0.2, but it might be the wiki (see https://openwrt.org/toh/tp-link/tl-wr1043nd)
That is a 720 MHz single core MIPS cpu, that will in all likelihood be overtaxed to shape at the combined value of 190000 Kbps... (to test this log into your router while running a speedtest via ssh and run top -d 1 concurrently and monitor the %idle value in the second row, if this gets < 10 you most likely are out of CPU cycles when you need them)
Respect, that is quick given that it was just announced...
Thank you for your clear explanation! I think you are right, my idle get down to 0% when testing download speed. So it looks like the router has simply not enough horsepower..
Okay, there are two stop-gap measures you could try (short of getting a beefier router):
try simlest.qos/fq_codel there you will still not be able to shape more than say 70-80 Mbps combined, but instead of getting higher bandwidth with terrible bufferbloat the bufferblloat should stay under control.
if 1) actually improves things, try to get the most recent version of sqm-scripts installed (from source see " "Installing" the current development version from git" on https://github.com/tohojo/sqm-scripts) as that will alllow you to potentially ecplicitly trade-off latency against bandwidth (if you want to try that, please holler and I will walk you though it).
Sure, using the DOCSIS keyword will also, under the hood, set overhead to 18 and mpu to 64, but the only way to set cake specific keywords in the GUI is to forego most sanity checking via the advanced option strings, so I tend not to recommend that...
Alright, I think it's best to not use SQM at all. With all the different configurations I get worse download results than when I have SQM disabled. Thanks for your help.
Try disabling the ingress/download shaper, but leaving the upload shaper in place, your CPU should handle typical upload speeds (5 to 10 Mbps for most cable connections).
I can understand if you are happy with the non-sqm performance, but I would like to understand what you tried and why it did not deliver on its promise, please.
A 400Mhz Atheros single core (or thereabouts). So CPU is really the bottleneck even just for WiFi + Routing your 200Mbps download. You'll experience a lot better results in general with a hardware upgrade. Today the best all-in-one is either the WRT32X or the ZyXEL NBG6817 and either one will do SQM and routing and NAT and WiFi at your speeds without problem.
I've found that one has to watch out to not set it in both places or they add... i.e. if I set the overhead to ether and 18, and also use the "docsis" command in the advanced line, it will happily set the overhead to 36, giving me the 18 +18 I asked for. Not sure whether it should do that or not, but something to be aware of.
I used to have the OP's problem of running out of CPU trying to sqm my bandwidth. (C7, 300/30mbit cable connection) A C7, for instance, can really only run cake and everything else being a NAT router/AP at 100-120mbit before you run out of idle time. But, I did the above, and ran 0 and 28-30mbit for the shaper speeds, which helped a lot while being a light load for the router. Even the download side seemed to benefit from the upload being better managed.
Another note... don't know if you watched with top -d1 to see if even that lower speed didn't run you out of CPU, that might explain lack of improvement there. Best is do trial and error with the shaper speed till you stay above 0% during the download test. Then you might see an improvement, but at too much speed loss cost, I'd agree. Try the shaper only on the upload, with a "0" for download speed and see what that does for you
Oh, I agree, especially since the ISPs bufferbloat on download is not totally terrible to begin with. Setting
option upload '18000'
option download '0'
should give you a slightly better debloated upstream and enough CPU cycles for everything else. The ) tells sqm to not instantiate a shaper in that direction... This is @dlakelan's idea repeated in more words