General list for discussing Bufferbloat
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: bloat <bloat@lists.bufferbloat.net>
Subject: Re: [Bloat] What is fairness, anyway? was: Re: finally... winning on wired!
Date: Sun, 5 Feb 2012 14:24:16 +0000	[thread overview]
Message-ID: <CAA93jw6Jj8PWhzGRjG4=Sp+MPqeJd7o+cBLW1j_4vs5_A3HEig@mail.gmail.com> (raw)
In-Reply-To: <CAA93jw68yntHkhETQ1a9-Azu7UXEuU9f5fgOsB25hvA240iApg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4170 bytes --]

On Sun, Feb 5, 2012 at 2:20 PM, Dave Taht <dave.taht@gmail.com> wrote:

>
>
> On Sun, Feb 5, 2012 at 7:39 AM, Eric Dumazet <eric.dumazet@gmail.com>wrote:
>
>> Le dimanche 05 février 2012 à 02:43 +0200, Jonathan Morton a écrit :
>> > On 5 Feb, 2012, at 2:24 am, George B. wrote:
>> >
>> > > I have yet another question to ask:  On a system where the vast
>> > > majority of traffic is receive traffic, what can it really do to
>> > > mitigate congestion?  I send a click, I get a stream.  There doesn't
>> > > seem to be a lot I can do from my side to manage congestion in the
>> > > remote server's transmit side of the link if I am an overall
>> > receiver
>> > > of traffic.
>> > >
>> > > If I am sending a bunch of traffic, sure, I can do a lot with queue
>> > > management and early detection.  But if I am receiving, it pretty
>> > much
>> > > just is what is and I have to play the stream that I am served.
>> >
>> > There are two good things you can do.
>> >
>> > 1) Pressure your ISP to implement managed queueing and ECN at the
>> > head-end device, eg. DSLAM or cell-tower, and preferably at other
>> > vulnerable points in their network too.
>>
>> Yep, but unfortunately many servers (and clients) dont even
>> initiate/accept ECN
>>
>> > 2) Implement TCP *receive* window management.  This prevents the TCP
>> > algorithm on the sending side from attempting to find the size of the
>> > queues in the network.  Search the list archives for "Blackpool" to
>> > see my take on this technique in the form of a kernel patch.  More
>> > sophisticated algorithms are doubtless possible.
>> >
>> You can tweak max receiver window to be really small.
>>
>> # cat /proc/sys/net/ipv4/tcp_rmem
>> 4096    87380   4127616
>> # echo "4096 16384 40000" >/proc/sys/net/ipv4/tcp_rmem
>>
>> A third one : Install an AQM on ingress side.
>>
>> Basically you can delay some flows, so that TCP acks are also delayed.
>>
>> Example of a basic tc script (probably too basic, but effective)
>>
>> ETH=eth0
>> IFB=ifb0
>> LOCALNETS="hard.coded.ip.addresseses/netmasks"
>> # Put a limit a bit under real one, to 'own' the queue
>> RATE="rate 7Mbit bandwidth 7Mbit maxburst 80 minburst 40"
>> ALLOT="allot 8000" # Depending on how old is your kernel...
>>
>>

> A subtlety here is that several technologies in use today
> (wireless-n, cable, green ethernet, GRO) are highly 'bursty',
> and I'd regard minburst, maxburst as something that needs to be calculated
> as a respectable fraction of the underlying rate.
>
>
>
>> modprobe ifb
>> ip link set dev $IFB up
>>
>> tc qdisc add dev $ETH ingress 2>/dev/null
>>
>> tc filter add dev $ETH parent ffff: \
>>   protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress \
>>   redirect dev $IFB
>>
>> tc qdisc del dev $IFB root
>>
>>
>> # Lets say our NIC is 100Mbit
>> tc qdisc add dev $IFB root handle 1: cbq avpkt 1000 \
>>    rate 100Mbit bandwidth 100Mbit
>>
>> tc class add dev $IFB parent 1: classid 1:1 cbq allot 10000 \
>>        mpu 64 rate 100Mbit prio 1 \
>>        bandwidth 100Mbit maxburst 150 avpkt 1500 bounded
>>
>> # Class for traffic coming from Internet : limited to X Mbits
>> tc class add dev $IFB parent 1:1 classid 1:11 \
>>        cbq $ALLOT mpu 64      \
>>        $RATE prio 2 \
>>        avpkt 1400 bounded
>>
>> tc qdisc add dev $IFB parent 1:11 handle 11: sfq
>>
>>
>> # Traffic from machines in our LAN : no limit
>> for privnet in $LOCALNETS
>> do
>>        tc filter add dev $IFB parent 1: protocol ip prio 2 u32 \
>>                match ip src $privnet flowid 1:1
>> done
>>
>> tc filter add dev $IFB parent 1: protocol ip prio 2 u32 \
>>        match ip protocol 0 0x00 flowid 1:11
>>
>>
>>
>> _______________________________________________
>> Bloat mailing list
>> Bloat@lists.bufferbloat.net
>> https://lists.bufferbloat.net/listinfo/bloat
>>
>
>
>
> --
> Dave Täht
> SKYPE: davetaht
> US Tel: 1-239-829-5608
> FR Tel: 0638645374
> http://www.bufferbloat.net
>



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

[-- Attachment #2: Type: text/html, Size: 5846 bytes --]

  parent reply	other threads:[~2012-02-05 14:24 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
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 [this message]
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='CAA93jw6Jj8PWhzGRjG4=Sp+MPqeJd7o+cBLW1j_4vs5_A3HEig@mail.gmail.com' \
    --to=dave.taht@gmail.com \
    --cc=bloat@lists.bufferbloat.net \
    --cc=eric.dumazet@gmail.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