[Make-wifi-fast] [PATCH] mac80211: Dynamically set CoDel parameters per station.

Toke Høiland-Jørgensen toke at toke.dk
Sat Sep 10 16:09:10 EDT 2016

Jim Gettys <jg at freedesktop.org> writes:

>> On Sat, Sep 10, 2016 at 3:33 PM, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
>>  CoDel can be too aggressive if a station sends at a very low rate,
>>  leading to starvation. This gets worse the more stations are present, as
>>  each station gets more bursty the longer the round-robin scheduling
>>  between stations takes.
>>  This adds dynamic adjustment of CoDel parameters per station. It uses
>>  the rate selection information to estimate throughput and sets more
>>  lenient CoDel parameters if the estimated throughput is below a
>>  threshold. To not change parameters too often, a hysteresis of two
>>  seconds is added.
> ​Where is this 2 second constant coming from? I'd expect it should be
> of order the maximum RTT (or a small constant factor of that, which
> for intercontinental connections should be 200-300ms.

Well, in most cases a station is either going to be squarely below or
squarely above the threshold. The hysteresis is there to deal with the
exception to this, where a station's rate oscillates around the
threshold. I picked two seconds as something that is far enough above
the CoDel interval to hopefully let it do its thing.

> More interestingly, maybe the adjustment should be related to the # of
> active stations.

There is no doubt the algorithm can be improved. This is just a stopgap
measure to avoid starving slow stations. The CoDel parameters for slow
stations could be set smarter as well, or they could be scaled with the
rate instead of being threshold based. But since we have FQ, being
lenient can work without affecting latency too much.

> Basically, I'm pushing back about an arbitrary number apparently
> picked out of thin air... ;-).

You're very welcome to contribute to coming up with a better solution ;)


More information about the Make-wifi-fast mailing list