From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [IPv6:2607:f8b0:4003:c01::22f]) (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 8C92721F1F7 for ; Fri, 20 Jun 2014 10:04:19 -0700 (PDT) Received: by mail-ob0-f175.google.com with SMTP id wm4so1375360obc.20 for ; Fri, 20 Jun 2014 10:04:18 -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:content-transfer-encoding; bh=5HvjTyOEgS029d8NfxgoTpLXz77+gOZI/+esFBSOkR4=; b=LugyU7T0rY4ZG7312xVFcImp7+7JJkN59vMbY38mUor0fFa6d7Rg7gCqJz/fRvNEQm ApIEuZjn2haqEWsxHr3nMBcvJzaMF96WwwsxO/2UFQbb7XKxf+uslR+32Ec9321QIh2D CDzqHBZUrIl42rERS88UTD0O1u/b+tVYy9svIiV5/Amwuv0iCe7amjJtHPf9Qfz+bdMJ 6Ws1OqAGqWsAyx/0A9B7I4GJvS0sJ/veAFhG8GlqHCoid1sK8p/X2S0Wfc6ItXVUbuQ9 a8YHOB+BSY15v3sDPJVdLH2pKo9+ukMYFWs3MYlsX/Xz5+04keamPBlCyTV53k7M9kzq /Q0g== MIME-Version: 1.0 X-Received: by 10.182.65.167 with SMTP id y7mr4833550obs.29.1403283858616; Fri, 20 Jun 2014 10:04:18 -0700 (PDT) Received: by 10.202.48.200 with HTTP; Fri, 20 Jun 2014 10:04:18 -0700 (PDT) In-Reply-To: References: <1402106170.6343.3.camel@ganymede.home> Date: Fri, 20 Jun 2014 10:04:18 -0700 Message-ID: From: Dave Taht To: Richard Edmands Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: 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: Fri, 20 Jun 2014 17:04:19 -0000 On Fri, Jun 20, 2014 at 2:35 AM, Richard Edmands wrot= e: > With the tc filter flow hash keys i've been having problems verifying if > they've been installed. I've searched the man pages and haven't found the > solution. It "should" be tc filter show dev *insert dev* > but that doesn't list them :( > any ideas what i've missed. > > > > tc filter add dev eth0 protocol ip parent 1: handle 1 \ > flow hash keys dst divisor 8192 modprobe cls_flow # or, insmod tc qdisc add dev eth0 root handle 1 fq_codel flows 8182 tc filter add dev eth0 protocol ip parent 1:0 handle 1 prio 1 flow hash keys dst divisor 8192 If you don't do this, you will get back errors from the kernel. tc is quite unforgiving. the flows parameter and the divisor need to be a power of two and match the fq_codel flows parameter. And you probably need to match more than just "ip" filters for a working co= nfig. netperf -H 172.21.0.1 -l 60 & # run a couple times to fill up the queue - root@nuc-client:~# tc -s class show dev eth0 class fq_codel 1:1962 parent 1: (dropped 0, overlimits 0 requeues 0) backlog 6056b 4p requeues 0 deficit 0 count 1 lastcount 1 ldelay 3.5ms tc -s filter show doesn't anything useful, but does show these filters installed. filter parent 1: protocol ip pref 1 flow filter parent 1: protocol ip pref 1 flow handle 0x1 hash keys dst divisor 8192 baseclass 1:1 Running netperf to 2 different destinations, I get, 2 queues in use. root@nuc-client:~# tc -s class show dev eth0 class fq_codel 1:b7c parent 1: (dropped 0, overlimits 0 requeues 0) backlog 7570b 5p requeues 0 deficit 1514 count 2 lastcount 1 ldelay 5.2ms class fq_codel 1:1962 parent 1: (dropped 2, overlimits 0 requeues 0) backlog 6056b 4p requeues 0 deficit 0 count 1 lastcount 1 ldelay 7.2ms fiddling with wifi is harder as you have 4 hw queues. This appears to be working correctly, but I can seem to print any of the filter rules. (?) Something I had been experimenting with as a =C2=A8good=C2=A8 value to improve aggregation behavior on an wifi access = point was: cat debloat_wifi_ap.sh #!/bin/sh IFACE=3Dwlan0 QDISC=3Dfq_codel FLOWS=3D1024 TARGET=3D"target 20ms interval 300ms" # wifi buffering and scheduling is a = PITA wifi() { tc qdisc add dev $IFACE handle 1 root mq tc qdisc add dev $IFACE parent 1:1 handle 10 $QDISC flows $FLOWS noecn quantum 1514 tc qdisc add dev $IFACE parent 1:2 handle 20 $QDISC flows $FLOWS quantum 4542 tc qdisc add dev $IFACE parent 1:3 handle 30 $QDISC flows $FLOWS $TARGET quantum 4542 tc qdisc add dev $IFACE parent 1:4 handle 40 $QDISC flows $FLOWS $TARGET noecn quantum 4542 tc filter add dev wlan0 protocol ip parent 10:0 handle 1 prio 1 flow hash keys dst divisor $FLOWS tc filter add dev wlan0 protocol ip parent 20:0 handle 1 prio 1 flow hash keys dst divisor $FLOWS tc filter add dev wlan0 protocol ip parent 30:0 handle 1 prio 1 flow hash keys dst divisor $FLOWS tc filter add dev wlan0 protocol ip parent 40:0 handle 1 prio 1 flow hash keys dst divisor $FLOWS # pretty sure you need to do icmp, ipv6, arp, and other protocols like ESP. } wifi # I need to get around to benchmarking this sort of stuff again. Or someone does. > > > On Sat, Jun 7, 2014 at 11:56 AM, Dan Siemon wrote: >> >> On Tue, 2014-05-20 at 19:15 +1000, 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. >> >> I did something similar as well. You can find the script and results >> below. Let me know if you find any bugs. >> >> >> http://git.coverfire.com/?p=3Dlinux-qos-scripts.git;a=3Dblob;f=3Dsrc-3to= s.sh;hb=3DHEAD >> >> >> http://www.coverfire.com/archives/2013/01/01/improving-my-home-internet-= performance/ >> > > > _______________________________________________ > Codel mailing list > Codel@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/codel > --=20 Dave T=C3=A4ht NSFW: https://w2.eff.org/Censorship/Internet_censorship_bills/russell_0296_= indecent.article