From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-x232.google.com (mail-qg0-x232.google.com [IPv6:2607:f8b0:400d:c04::232]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 7865E21F3B7 for ; Tue, 20 May 2014 17:15:27 -0700 (PDT) Received: by mail-qg0-f50.google.com with SMTP id z60so2003975qgd.23 for ; Tue, 20 May 2014 17:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kzT85Hyt5Sd9fkQhLLyKeZXx+wlmEUJUl9+dvePklus=; b=HQZqZgKnenRtjwzPS460XSqIp3G1K45pQMzW2AV0h+0K50KV9UKGDIKwuRa9IRvW+m RSilLkQdlSw9IyApNG/XrgoEAQpptkYLmSRSSpAimXGdwoiOwXfzAJqz3L7ALR4hj5HF kUZVoh4bCpqjnjbwDPGuFiMuXT+tEaEtegQ0fdlTSg2jtC2r8yc7Ue1Vn/8wkRoGi946 Cble8Wgdyv4Xgt7ibcP/226HrIvekwUI1PC692abZHChqAo+xdTjDBWN22guhkWz5lSZ QrC+cm+P8ROc8W0kjjJbDRqVrGdtUoV8sf5I+AFskvbCEBQTBOPVyxn6XfI+wg1U2ohV e9Lg== MIME-Version: 1.0 X-Received: by 10.224.95.9 with SMTP id b9mr63324778qan.11.1400631326327; Tue, 20 May 2014 17:15:26 -0700 (PDT) Received: by 10.96.25.234 with HTTP; Tue, 20 May 2014 17:15:26 -0700 (PDT) In-Reply-To: <1400599901.5367.129.camel@edumazet-glaptop2.roam.corp.google.com> References: <1400599901.5367.129.camel@edumazet-glaptop2.roam.corp.google.com> Date: Wed, 21 May 2014 10:15:26 +1000 Message-ID: From: Andrew McGregor To: Eric Dumazet Content-Type: multipart/alternative; boundary=001a11c1a898aac8eb04f9dde46b Cc: Richard Edmands , codel Subject: Re: [Codel] Floating an Idea. ip_fq_codel X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 00:15:27 -0000 --001a11c1a898aac8eb04f9dde46b Content-Type: text/plain; charset=UTF-8 Ah, so it DOES support multiple flow hashes... I didn't know that. Nice. On Wed, May 21, 2014 at 1:31 AM, Eric Dumazet wrote: > > On Tue, 2014-05-20 at 20:16 +1000, Andrew McGregor wrote: > > That's about what constitutes a flow. fq_codel as implemented in > > linux works per (source ip, dest ip, protocol, source port, dest port) > > 5-tuple. Linux should probably support multiple flow hashing > > algorithms in the kernel. > > > > Right. fq_codel uses the same trick than other qdisc, like SFQ > > By _default_ it uses a 5-tuple hash. Thats convenient but not a > requirement. > > You can classify packets using a filter and for example hash only on the > part you need. For example destination IP, or source IP, depending if > you use fq_codel on egress or ingress sides. > > tc qdisc add dev eth0 root handle 1: fq_codel flows 8192 > tc filter add dev eth0 protocol ip parent 1: handle 1 \ > flow hash keys dst divisor 8192 > > Simple as that. > > > On Tue, May 20, 2014 at 7:15 PM, Richard Edmands > > wrote: > > In my environment we've got a fair chunk of torrent usage > > happening (+ gaming) and with fq_codel giving the advantage to > > whichever individual could open up as many connections as > > possible the entire situation imploded very quickly. > > > > So to balance this out I used htb to implement the IP part of > > this (actually not really, i made groups of ip's which > > belonged to individuals) and stuck fq_codel on top of the > > divided setup. > > > > With this system what now happens is each IP now gets equal > > utilization of the link (actually, i'm a lazy hack. I only > > implemented the uplink section) which prevents the advantage > > of opening up as many connections as possible. > > Now when an individual decides to go nuts, they're limited to > > what is available to them without harming everyone else, > > without compromising maximum possible speed. > > > > > > I have had this running in my environment for the past month > > and WOW. > > > > > > See pastebin'd implementation. > > > > > > http://pastebin.com/hXtzFL9f > > > > > > _______________________________________________ > > Codel mailing list > > Codel@lists.bufferbloat.net > > https://lists.bufferbloat.net/listinfo/codel > > > > > > > > _______________________________________________ > > Codel mailing list > > Codel@lists.bufferbloat.net > > https://lists.bufferbloat.net/listinfo/codel > > > --001a11c1a898aac8eb04f9dde46b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ah, so it DOES support multiple flow hashes... I didn'= t know that. =C2=A0Nice.


On Wed, May 21, 2014 at 1:31 AM, Eric Dumazet <eric.= dumazet@gmail.com> wrote:

On Tue, 2014-05-20 at 20:16 +1000, Andrew McGregor wrote:
> That's about what constitutes a flow. =C2=A0fq_codel as implemente= d in
> linux works per (source ip, dest ip, protocol, source port, dest port)=
> 5-tuple. =C2=A0Linux should probably support multiple flow hashing
> algorithms in the kernel.
>

Right. fq_codel uses the same trick than other qdisc, like SFQ

By _default_ it uses a 5-tuple hash. Thats convenient but not a
requirement.

You can classify packets using a filter and for example hash only on the part you need. For example destination IP, or source IP, depending if
you use fq_codel on egress or ingress sides.

tc qdisc add dev eth0 root handle 1: fq_codel flows 8192
tc filter add dev eth0 protocol ip parent 1: handle 1 \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 flow hash keys dst divisor 8192

Simple as that.

> On Tue, May 20, 2014 at 7:15 PM, Richard Edmands <thesirdmz@gmail.com>
> wrote:
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 In my environment we've got a fair chu= nk of torrent usage
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 happening (+ gaming) and with fq_codel giv= ing the advantage to
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 whichever individual could open up as many= connections as
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 possible the entire situation imploded ver= y quickly.
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 So to balance this out I used htb to imple= ment the IP part of
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 this (actually not really, i made groups o= f ip's which
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 belonged to individuals) and stuck fq_code= l on top of the
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 divided setup.
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 With this system what now happens is each = IP now gets equal
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 utilization of the link (actually, i'm= a lazy hack. I only
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 implemented the uplink section) which prev= ents the advantage
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 of opening up as many connections as possi= ble.
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Now when an individual decides to go nuts,= they're limited to
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 what is available to them without harming = everyone else,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 without compromising maximum possible spee= d.
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 I have had this running in my environment = for the past month
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 and WOW.
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 See pastebin'd implementation.
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://pastebin.com/hXtzFL9f
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 __________________________________________= _____
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Codel mailing list
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Codel@lists.bufferbloat.net
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 https://lists.bufferbloat.net/listinfo/cod= el
>
>
>
> _______________________________________________
> Codel mailing list
> Codel@lists.bufferbloat= .net
> https://lists.bufferbloat.net/listinfo/codel



--001a11c1a898aac8eb04f9dde46b--