I'm on the most basic ADSL service from Bell Canada since I live out of the city. The main issue I have is that my connection gets easily saturated with traffic (5Mbps down / .650 up). When I'm the only one using the internet, the connection is rock solid in terms of latency (31ms with zero jitter on League of Legends). However that's rarely the actual case since I'm not the only one using the internet. Using the most simple Cake + Piece of cake configuration it was already a huge improvement in the way that I could actually play my game within a range of 31-45ms ping with occasional bigger spikes to 60 and rarer 120-200ms spikes that would last a second or two. I noticed that the larger spikes tend to occur with upload traffic. Nevertheless, this is all already a huge improvement where it used to be completely unplayable at 100-300ms when anyone used the internet. Dslreports reflects the quality change from a 'C' bufferbloat score to 'A'. I lowered the ingress and egress thresholds considerably and the experience was roughly the same.
Now I want to try and dial it in a bit. My family doesn't torrent or do any heavy use of the internet for the most part, nor do they do anything that requires responsiveness. My ideal setup for SQM would be something that offers a very biased priority for my UDP traffic on ports 5000:5500 and keeps latency tight above anything else. I wouldn't particularly care about other traffic as long as the most basic level of browsing could be done even if it's choppy. I'd only be turning on this aggressive SQM during gaming.
I tried this firewall script with Layer Cake since it seemed like DSCP tagging was the way to go, but honestly I don't know what any of this actually does. I kinda just tried it from a Gargoyle user post. I got similar results to Piece of Cake so I'm not sure how effective it is and I can tell the tins aren't being used properly in layer.
##NORMAL
iptables -t mangle -A PREROUTING -j DSCP --set-dscp-class CS0
##ICMP
iptables -t mangle -A FORWARD -p icmp -j DSCP --set-dscp-class CS5
iptables -t mangle -A POSTROUTING -p icmp -j DSCP --set-dscp-class CS5
##GAMING
iptables -t mangle -A FORWARD -p udp --match multiport --sport 5000:5500 -j DSCP --set-dscp-class CS5
iptables -t mangle -A FORWARD -p udp --match multiport --dport 5000:5500 -j DSCP --set-dscp-class CS5
iptables -t mangle -A POSTROUTING -p udp --match multiport --sport 5000:5500 -j DSCP --set-dscp-class CS5
iptables -t mangle -A POSTROUTING -p udp --match multiport --dport 5000:5500 -j DSCP --set-dscp-class CS5
Here's my config and stats using the script. I only activated it at that moment while playing for a few minutes running speedtests and other types of loads from my phone and other PCs. Usually I have a bit more congestion on the network and I didn't experience any big spikes.
config queue 'eth1'
option ingress_ecn 'ECN'
option interface 'eth0'
option upload '500'
option debug_logging '0'
option verbosity '5'
option qdisc 'cake'
option qdisc_advanced '1'
option egress_ecn 'NOECN'
option linklayer 'atm'
option overhead '44'
option qdisc_really_really_advanced '1'
option script 'layer_cake.qos'
option squash_dscp '0'
option squash_ingress '0'
option iqdisc_opts 'diffserv4 nat dual-dsthost'
option eqdisc_opts 'diffserv4 nat dual-srchost'
option enabled '1'
option download '4750'
root@OpenWrt:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 800a: dev eth0 root refcnt 2 bandwidth 500Kbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100.0ms atm overhead 44
Sent 19438888 bytes 147899 pkt (dropped 1218, overlimits 153491 requeues 0)
backlog 0b 0p requeues 0
memory used: 266336b of 4Mb
capacity estimate: 500Kbit
min/max network layer size: 28 / 1492
min/max overhead-adjusted size: 106 / 1696
average network hdr offset: 14
Bulk Best Effort Video Voice
thresh 31248bit 500Kbit 250Kbit 125Kbit
target 581.4ms 36.3ms 72.7ms 145.3ms
interval 1.2s 131.3ms 167.7ms 290.7ms
pk_delay 0us 89.3ms 5.5ms 30.7ms
av_delay 0us 28.4ms 86us 1.6ms
sp_delay 0us 102us 86us 389us
backlog 0b 0b 0b 0b
pkts 0 92375 1 56741
bytes 0 16213232 90 4074754
way_inds 0 291 0 0
way_miss 0 3237 1 11
way_cols 0 0 0 0
drops 0 1218 0 0
marks 0 0 0 0
ack_drop 0 0 0 0
sp_flows 0 0 1 0
bk_flows 0 1 0 0
un_flows 0 0 0 0
max_len 0 1506 90 590
quantum 300 300 300 300
qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
Sent 170605852 bytes 182849 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth1 root refcnt 2 limit 10240p flows 1024 quantum 1514 ta rget 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 3952826764 bytes 4105252 pkt (dropped 0, overlimits 0 requeues 23)
backlog 0b 0p requeues 23
maxpacket 444 drop_overlimit 0 new_flow_count 15 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth1.1 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 800b: dev ifb4eth0 root refcnt 2 bandwidth 4750Kbit diffserv4 dual-ds thost nat nowash no-ack-filter split-gso rtt 100.0ms atm overhead 44
Sent 168784549 bytes 179872 pkt (dropped 2977, overlimits 248121 requeues 0)
backlog 0b 0p requeues 0
memory used: 109120b of 4Mb
capacity estimate: 4750Kbit
min/max network layer size: 46 / 1492
min/max overhead-adjusted size: 106 / 1696
average network hdr offset: 14
Bulk Best Effort Video Voice
thresh 296872bit 4750Kbit 2375Kbit 1187Kbit
target 61.2ms 5.0ms 7.6ms 15.3ms
interval 156.2ms 100.0ms 102.6ms 110.3ms
pk_delay 627us 12.6ms 14.9ms 6.1ms
av_delay 11us 2.5ms 1.2ms 886us
sp_delay 11us 20us 178us 11us
backlog 0b 0b 0b 0b
pkts 2 181813 86 948
bytes 120 172824268 77082 264268
way_inds 0 2304 0 6
way_miss 2 1591 6 42
way_cols 0 0 0 0
drops 0 2977 0 0
marks 0 0 0 0
ack_drop 0 0 0 0
sp_flows 1 0 1 1
bk_flows 0 1 0 0
un_flows 0 0 0 0
max_len 60 1506 1392 1484
quantum 300 300 300 300
root@OpenWrt:~# tc -d qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc cake 800a: dev eth0 root refcnt 2 bandwidth 500Kbit diffserv4 dual-srchost nat nowash no-ack-filter split-gso rtt 100.0ms atm overhead 44
qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
qdisc fq_codel 0: dev eth1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0 ms memory_limit 4Mb ecn
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev eth1.1 root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc cake 800b: dev ifb4eth0 root refcnt 2 bandwidth 4750Kbit diffserv4 dual-dsthost nat nowash no-ack-f ilter split-gso rtt 100.0ms atm overhead 44
This post on Ultimate SQM settings looks interesting but I'm not sure if I need to go this far for my use case. I realize also that this may be as good as it gets for my bandwidth, but I want some input before I give up!