Lets make wifi fast again!
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Jim Gettys <jg@freedesktop.org>
Cc: make-wifi-fast@lists.bufferbloat.net,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Felix Fietkau <nbd@nbd.name>
Subject: Re: [Make-wifi-fast] [PATCH] mac80211: Dynamically set CoDel	parameters per station.
Date: Sat, 10 Sep 2016 22:09:10 +0200	[thread overview]
Message-ID: <87bmzv7c0p.fsf@toke.dk> (raw)
In-Reply-To: <CAGhGL2D8Hfed0VTsinnCbkK31dGTc=bYjzpPfrcLRnp+x6O3sA@mail.gmail.com> (Jim Gettys's message of "Sat, 10 Sep 2016 15:54:44 -0400")

Jim Gettys <jg@freedesktop.org> writes:

>> On Sat, Sep 10, 2016 at 3:33 PM, Toke Høiland-Jørgensen <toke@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 ;)

-Toke

  reply	other threads:[~2016-09-10 20:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-10 19:33 Toke Høiland-Jørgensen
2016-09-10 19:54 ` Jim Gettys
2016-09-10 20:09   ` Toke Høiland-Jørgensen [this message]
2016-09-11  3:16   ` Loganaden Velvindron
2016-09-11  0:09 ` kbuild test robot
2017-04-05 16:18 ` [Make-wifi-fast] [PATCH v2] " Toke Høiland-Jørgensen
2017-04-06  7:56   ` kbuild test robot
2017-04-06  8:45   ` kbuild test robot
2017-04-06  9:38   ` [Make-wifi-fast] [PATCH v3] " Toke Høiland-Jørgensen
2017-04-06 10:51     ` Eric Dumazet
2017-04-06 15:58       ` Toke Høiland-Jørgensen
2017-04-13 18:26         ` Dave Taht
2017-05-17 14:06     ` Johannes Berg
2017-05-19  9:27       ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/make-wifi-fast.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bmzv7c0p.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=jg@freedesktop.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox