General list for discussing Bufferbloat
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Jim Gettys <jg@freedesktop.org>
Cc: bloat <bloat@lists.bufferbloat.net>
Subject: Re: [Bloat] What is fairness, anyway? was: Re:  finally... winning on wired!
Date: Wed, 4 Jan 2012 17:16:44 +0100	[thread overview]
Message-ID: <CAA93jw5gnMKqF_SQuvteZm+2ksFoGOgWJxv2Bj4KF==Rt49h2w@mail.gmail.com> (raw)
In-Reply-To: <4F046F7B.6030905@freedesktop.org>

On Wed, Jan 4, 2012 at 4:25 PM, Jim Gettys <jg@freedesktop.org> wrote:
> On 01/02/2012 04:31 PM, Dave Taht wrote:
>> On Mon, Jan 2, 2012 at 9:07 AM, Dave Taht <dave.taht@gmail.com> wrote:
>> Yes, that patch brings SFQ at light workloads to being
>> indistinguishable from QFQ!
>> http://www.teklibre.com/~d/bloat/sfqnewvsqfq10iperfs.png (if you stare
>> at this image long enough you might see a pattern, but I don't) (I
>> certainly am seeing an afterimage, though)
>>>> A "nolimit" implementation could use a dynamic memory allocator
>>>> scheme, eventually consuming less memory on typical use :)
>> At what point could SFQ be considered a replacement for pfifo_fast? :)
>>
>> I have not managed to crash QFQ yet with your other new patch. I will
>> run it overnight.
>>
>>
>
> As I read this thread, there are three questions that go through my mind:

the thread moved to netdev - more sfq improvements on the way

http://www.spinics.net/lists/netdev/msg184686.html

>    1) since TCP is not "fair", particularly when given flows of
> different RTT's, how do we best deal with this issue?  Do either/both
> SFQ/QFQ deal with this problem, and how do they differ?

The reason why QFQ was outperforming SFQ here

http://www.teklibre.com/~d/bloat/pfifo_sfq_vs_qfq_linear50.png

was because SFQ was  enqueuing the first packet of a new stream at the
end of the existing streams.

After eric moved the SFQ enqueue to head, the two started performing
the same at light workloads.

(keep in mind the comparison already to pfifo_fast - log scale)

http://www.teklibre.com/~d/bloat/pfifo_fast_vs_sfq_qfq_log.png

So, the net effect of either fq mechanism is that slower flows jump
forward in the queue.
RTT  is not really relevant. [1]

The more sparse a flow is, the higher the likelyhood that it will be
higher prioritized in this way.

So we converge towards an optimum for longer RTT flows vs shorter
ones, automagically, or so I think.

But you ask a good question, the testing done thus far has been in
fixed RTT scenarios, with the exception of the wireless test I ran a
few days back.

http://www.teklibre.com/~d/bloat/qfq_vs_pfifo_fast_wireless_iwl_card_vs_cerowrt.pdf
[4]

>    2) Web browsers are doing "unfair" things at the moment
> (unless/until HTTP/1.1 pipelining and/or SPDY deploys), by opening many
> TCP connections at the same time.  So it's easy for there to be a bunch
> of flows by the same user.

> Is "fairness" better a per host property in
> the home environment, or a per TCP flow?  Particularly if we someday
> start diffserv marking traffic, I suspect per host is more "fair", at
> least for unmarked traffic.

I don't think it's an "or" question. I think it's an "and", and
diffserv of very limited use.

The proof of concept implementation I did a few months back did:

At the router:

FQ on a per host basis
and then FQ within each queue for each host. [2]

Hosts should DEFINITELY run something like SFQ rather than PFIFO_FAST.
syns, dns lookups, flows in slow start, all benefit. [3]

and on top of that, since most web flows are short, and the uplink slow,
sending 8 acks for 8 streams gives you more data faster, in aggregate,
than sending all the acks for one stream, then the next, as a short flow
expires quicker.

and of course the other nice thing of FQ is that if you lose a bunch
of acks they are
spread across multiple rather than one stream.

Determining the net effect of ALL THAT is up for more testing, but
I've been running BQL + QFQ (and now SFQ) since mid-november now
and the improvement in my web 'experience' is often amazing,
as are things like interactive ssh sessions. I can have a fully loaded
up network - totally saturated - and barely notice.

>    3) since game manufacturers have noted the diffserv marking in
> PFIFO-FAST, what do these queuing disciplines currently do?

They pay no attention to diffserv. It's possible we have a small
problem here, but I'd wager not.

If their packets are not saturating the link, and/or it's per
host FQ, they are going to win.

isochronous flows (like voice, even (especially) skype) should respond well to
this stuff, too. do, actually. skype is nicer now.


footnotes:

1: the 'slower flows gain priority' question is my gravest concern
(eg, ledbat, bittorrent). It's fixable with per-host FQ.

2: I note that identifying "a host" is harder than it was in nagle's
day - with multiple protocols in use a hash against an IP address is
not accurate, nor, by the time you hit the egress interface, do you
have a mac address to use.

I did not solve that problem in my home router gw/aqm/fq prototype.
The approximation was a hash that matched an ip or ipv6 address.

3: (and conversely, existing elephants slow down). (and when you drop
packets there is a good question, but you do end up with classic tail
drop behavior in both QFQ and SFQ on a per flow basis. You can get
head drop out of QFQ, actually)

4: especially in variable bandwidth scenarios, the depth of even the
fairest queue needs to be managed somehow.

But I can live with the nearly two orders of magnitude of basic
latency improvement we've got now, as well
as the probability this induces of doing smarter/effective queue
length management, and keep getting the bugs out of it....

>
>



-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net

  reply	other threads:[~2012-01-04 16:16 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02  0:40 [Bloat] " Dave Taht
2012-01-02  5:22 ` Eric Dumazet
2012-01-02  8:07   ` Dave Taht
2012-01-02 21:31     ` Dave Taht
2012-01-02 22:14       ` Albert Rafetseder
2012-01-02 22:33         ` Dave Taht
2012-01-04 15:25       ` [Bloat] What is fairness, anyway? was: " Jim Gettys
2012-01-04 16:16         ` Dave Taht [this message]
2012-01-04 17:23           ` Jim Gettys
2012-01-04 17:36           ` Justin McCann
2012-01-04 17:40             ` Eric Dumazet
     [not found]             ` <CAFkTFa89mOmbcOV1PWX3my04rK4NsEvyakcQV2j54qa0gzAViQ@mail.g mail.com>
2012-01-05 17:52               ` Bob Briscoe
2012-01-06 17:42                 ` Jim Gettys
2012-01-06 18:09                   ` Dave Taht
2012-01-06 19:57                   ` Eric Dumazet
2012-01-06 20:34                 ` Jonathan Morton
2012-01-07 19:42                   ` Bob Briscoe
2012-01-07 22:16                     ` Wesley Eddy
2012-01-08  0:40                 ` Dave Taht
     [not found]                   ` <CAA93jw7xKwdUeT7wFNoiM8RQp1--==Eazdo0ucc44vz+L1U06g@mail.g mail.com>
2012-01-09  5:38                     ` Bob Briscoe
2012-01-11  7:26                       ` Dave Taht
     [not found]                         ` <CAA93jw4KJdYwrAuk7-yHDYCGBh1s6mE47eAYu2_LRfY45-qZ2g@mail.g mail.com>
2012-01-14 11:06                           ` Bob Briscoe
2012-01-13 21:45                   ` Dan Siemon
2012-01-14 15:55                     ` Dave Taht
2012-01-04 16:22         ` Eric Dumazet
2012-02-05  0:24         ` George B.
2012-02-05  0:43           ` Jonathan Morton
2012-02-05  1:57             ` George B.
2012-02-05  2:05               ` john thompson
2012-02-05  7:39             ` Eric Dumazet
     [not found]               ` <CAA93jw68yntHkhETQ1a9-Azu7UXEuU9f5fgOsB25hvA240iApg@mail.gmail.com>
2012-02-05 14:24                 ` Dave Taht
2012-02-05 17:53               ` Justin McCann
2012-02-05 18:21                 ` Eric Dumazet
2012-01-14 16:35 Jesper Dangaard Brouer
2012-01-15  9:49 ` Dave Taht

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/bloat.lists.bufferbloat.net/

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

  git send-email \
    --in-reply-to='CAA93jw5gnMKqF_SQuvteZm+2ksFoGOgWJxv2Bj4KF==Rt49h2w@mail.gmail.com' \
    --to=dave.taht@gmail.com \
    --cc=bloat@lists.bufferbloat.net \
    --cc=jg@freedesktop.org \
    /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