Historic archive of defunct list bloat-devel@lists.bufferbloat.net
 help / color / mirror / Atom feed
From: d@taht.net (Dave Täht)
To: bloat-devel <bloat-devel@lists.bufferbloat.net>,
	nbd <nbd@openwrt.org>, njs <njs@pobox.com>
Subject: Combating wireless bufferbloat while maximizing aggregation
Date: Mon, 14 Feb 2011 10:18:58 -0700	[thread overview]
Message-ID: <87pqqujzzx.fsf_-_@cruithne.co.teklibre.org> (raw)
In-Reply-To: <AANLkTik7xf7kKQuTYEoEHi5Xsraw7H9WYrQ9SqKdZTM-@mail.gmail.com> (Nathaniel Smith's message of "Sun, 13 Feb 2011 21:33:34 -0800")


Just forwarding this thread to the list, in the hope that it moves
there, or to Linux-wireless, and out of just our mailboxes.

Nathaniel Smith <njs@pobox.com> writes:

> On Sun, Feb 13, 2011 at 5:34 PM, Felix Fietkau <nbd@openwrt.org> wrote:
>> Hi Nathaniel, Dave,
>
> Hi Felix,
>
>> I'm currently trying to work out a way to combat the bufferbloat issue
>> in ath9k, while still ensuring that aggregation does its job to reduce
>> airtime utilization properly.
>
> Excellent! I'm not sure I have any particularly useful insights to
> give -- my day job is as a linguist, not a network engineer :-) -- but
> I'll throw out some quick thoughts and if they're useful, great, and
> if not, I won't feel bad.
>
>> The nice thing about ath9k compared to Intel drivers is that all of the
>> aggregation related queueing is done inside the driver instead of some
>> opaque hardware queue or firmware. That allows me to be more selective
>> in which packets to drop and which ones to keep.
>
> This is the first place I'm confused. Why would you drop packets
> inside the driver? Shouldn't dropping packets be the responsibility of
> the Qdisc feeding your driver, since that's where all the smart AMQ
> and QoS and user-specified-policy knobs live? My understanding is that
> the driver's job is just to take the minimum number of packets at a
> time (consistent with throughput, etc.) from the Qdisc and send them
> on. Or are you talking about dropping in the sense of spending more
> effort on driver-level retransmit in some cases than others?
>
> For that I have a crazy idea: what if the driver took each potentially
> retransmittable packet and handed it *back* to the Qdisc, who then
> could apply policy to send it to the back of the queue, jump it to the
> front of the queue for immediate retransmission, throw it away if
> higher priority traffic has arrived and the queue is full now, etc.
> You'd probably need to add some API to tell the Qdisc that the packet
> you want to enqueue has already waited once (I imagine the default
> dumb Qdisc would want to enqueue such packets at the head of the queue
> by default). Perhaps also some way to give up on a packet if it's
> waited "too long" (but then again, perhaps not!). But as I think about
> this idea it does grow on me.
>
>> For aggregation I would like to allow at least the maximum number of
>> packets that can fit into one A-MPDU, which depends on the selected
>> rate. Since wireless driver queueing will really only have an effect
>> when we're running short on airtime, we need to make sure that we reduce
>> airtime waste caused by PHY headers, interframe spacing, etc.
>> A-MPDU is a very neat way to do that...
>
> If sending N packets is as cheap (in latency terms) as sending 1, then
> I don't see how queueing up N packets can hurt any!
>
> The iwlwifi patches I just sent do the dumbest possible fix, of making
> the tx queue have a fixed latency instead of a fixed number of
> packets. I found this attractive because I figured I wasn't smart
> enough to anticipate all the different things that might affect
> transmission rate, so better to just measure what was happening and
> adapt. In principle, if A-MPDU is in use, and that lets us send more
> packets for the price of one, then this approach would notice that
> reflected in our packet throughput and the queue size should increase
> to match.
>
> Obviously this could break if the queue size ever dropped too low --
> you might lose throughput because of the smaller queue size, and then
> that would lock in the small queue size, causing loss of throughput...
> but I don't see any major downsides to just setting a minimum
> allowable queue size, so long as it's accurate.
>
> In fact, my intuition is that the only thing way to improve on just
> queueing up a full A-MPDU aggregated packet would be to wait until
> *just before* your transmission time slot rolls around and *then*
> queueing up a full A-MPDU aggregated packet. If you get to transmit
> every K milliseconds, and you always refill your queue immediately
> after transmitting, then in the worst case a high-priority packet
> might have to wait 2*K ms (K ms sitting at the head of the Qdisc
> waiting for you to open your queue, then another K ms in the driver
> waiting to be transmitted). This worst case drops to K ms if you
> always refill immediately before transmitting. But the possible gains
> here are bounded by whatever uncertainty you have about the upcoming
> transmission time, scheduling jitter, and K. I don't know what any of
> those constants look like in practice.
>
> Well, that's my brain dump for now. Make of it what you will!
> -- Nathaniel

-- 
Dave Taht
http://nex-6.taht.net

  parent reply	other threads:[~2011-02-14 17:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87lj3hd00r.fsf@taht.net>
     [not found] ` <AANLkTi=HGuVvmUFw+TWp9pbO7fAtBBb+U88_PuVW8QSZ@mail.gmail.com>
     [not found]   ` <874o8jlhjd.fsf@cruithne.co.teklibre.org>
     [not found]     ` <AANLkTik-nK+OaL4vBns8bcJq6QoGL9ohiZ1s=RTQrdrF@mail.gmail.com>
2011-02-13 20:22       ` Bufferbloat related patches for the iwl3945 Dave Täht
     [not found]       ` <87ei7bprvw.fsf@cruithne.co.teklibre.org>
     [not found]         ` <AANLkTik_TydO+E4NTNH9k5t59tLajDH2Qe569WWBv9HD@mail.gmail.com>
     [not found]           ` <8739nrpgi5.fsf@cruithne.co.teklibre.org>
     [not found]             ` <4D5886AA.4000906@openwrt.org>
     [not found]               ` <87y65jnzla.fsf@cruithne.co.teklibre.org>
2011-02-14  2:16                 ` Bemused to Felix Fietkau
     [not found]               ` <AANLkTik7xf7kKQuTYEoEHi5Xsraw7H9WYrQ9SqKdZTM-@mail.gmail.com>
2011-02-14 17:18                 ` Dave Täht [this message]
2011-02-15  3:08                 ` Felix Fietkau
2011-02-15  6:28                   ` Nathaniel Smith

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

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

  git send-email \
    --in-reply-to=87pqqujzzx.fsf_-_@cruithne.co.teklibre.org \
    --to=d@taht.net \
    --cc=bloat-devel@lists.bufferbloat.net \
    --cc=nbd@openwrt.org \
    --cc=njs@pobox.com \
    /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