You can use a small fraction of the capacity of the cable uplink path to measure its queueing delay dynamically, and when it gets longer than latency*"expected bitrate", reduce "expected bitrate".
You want to do this *as quickly as possible*, so what you do is insert a "link monitor" task in the driver that sends tiny probe packets addressed to the nearest "loopback point" you can find/create on the other side, and measure the RTT. You can use, for example, the technique used by traceroute, which is to set the hop count to the smallest number that causes a return ICMP packet to be sent, and send one of those periodically.
I used this specific technique to cause my uplink queue to move back into my router, where I could manage it. You can also use it for the downlink queue measurement, but it doesn't move the queue into the router smoothly, instead you have to drop/ECN-mark the IP frames coming in.
This can all be done between the IP layer and layer 2. Since it exploits speedboost better, it might be worth adding as an option to cerowrt, so you don't have to set a speed limit explicitly when you have a single connection to the public Internet.
-----Original Message-----
From: "Michael Richardson" <mcr@sandelman.ca>
Sent: Monday, November 26, 2012 9:22am
To: cerowrt-users@lists.bufferbloat.net, cerowrt-devel@lists.bufferbloat.net
Subject: Re: [Cerowrt-devel] [Cerowrt-users] QOS settings vs speedboost and random bandwidth