Development issues regarding the cerowrt test router project
 help / color / mirror / Atom feed
* [Cerowrt-devel] AQM scripts modified for DSL exploration
@ 2013-08-11 20:22 Sebastian Moeller
  2013-08-11 21:04 ` Toke Høiland-Jørgensen
  2013-08-12  0:06 ` Dave Taht
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Moeller @ 2013-08-11 20:22 UTC (permalink / raw)
  To: cerowrt-devel, Toke Høiland-Jørgensen

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

Hi Toke, hi List,

I got around to test your AQM scripts and GUI in cerowrt in 3.10.1-1, After some initial issues want to say I like those a lot. (In an earlier mail regarding that topic I assumed your scripts to behave funny on my system, but it just turns out that a fresh rebooted cerowrt router needs a bit of time before reaching steady state; and I foolishly did the initial tests immediately after booting it up, so your scripts are fine, I needed some work :) ).
	Anyway, since I am back on an ADSL2+ line that suffers from ATM quantization issues, I went ahead and played with your scripts and the luci component that goes with it. The current work in progress is attached (well, at least the files I modified). If you think these changes are acceptable I would love to donate them :)
	Ah what is changed? Both linklayer and  overhead can be specified in the luci GUI, and in addition to HTB's internal adaptation layer one can choose the "generic" tc stab mechanism instead (except in the attached state the user has to make sure to select only one of these options…) I would love if this functionality, if not the implementation, would end up in the next version of the AQM scripts…

Best
	Sebastian




[-- Attachment #2: usr.zip --]
[-- Type: application/zip, Size: 14438 bytes --]

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Cerowrt-devel] AQM scripts modified for DSL exploration
  2013-08-11 20:22 [Cerowrt-devel] AQM scripts modified for DSL exploration Sebastian Moeller
@ 2013-08-11 21:04 ` Toke Høiland-Jørgensen
  2013-08-11 21:53   ` Dave Taht
  2013-08-12  0:06 ` Dave Taht
  1 sibling, 1 reply; 6+ messages in thread
From: Toke Høiland-Jørgensen @ 2013-08-11 21:04 UTC (permalink / raw)
  To: Sebastian Moeller; +Cc: cerowrt-devel

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

Sebastian Moeller <moeller0@gmx.de> writes:

> I would love if this functionality, if not the implementation, would
> end up in the next version of the AQM scripts…

Hi Sebastian

Thanks for the modifications; I'm pretty swamped for the rest of August,
so won't have time to test out your modifications until sometime in
September (although Dave may have). I'll try to look at it then, but my
backlog will probably be longish, so no idea when I'll get around to it.
If you come up with more improvements in the meantime, feel free to post
those.

Also, any chance you could post your changes as a git-compatible diff
against the repo at https://github.com/dtaht/ceropackages-3.3 (the
relevant packages are luci/luci-app-aqm and net/aqm-scripts)? :)

-Toke

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Cerowrt-devel] AQM scripts modified for DSL exploration
  2013-08-11 21:04 ` Toke Høiland-Jørgensen
@ 2013-08-11 21:53   ` Dave Taht
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Taht @ 2013-08-11 21:53 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen; +Cc: cerowrt-devel

I'll take a look. I WAS swamped, today is the first day off I've had
in a while...

On Sun, Aug 11, 2013 at 2:04 PM, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
> Sebastian Moeller <moeller0@gmx.de> writes:
>
>> I would love if this functionality, if not the implementation, would
>> end up in the next version of the AQM scripts…
>
> Hi Sebastian
>
> Thanks for the modifications; I'm pretty swamped for the rest of August,
> so won't have time to test out your modifications until sometime in
> September (although Dave may have). I'll try to look at it then, but my
> backlog will probably be longish, so no idea when I'll get around to it.
> If you come up with more improvements in the meantime, feel free to post
> those.
>
> Also, any chance you could post your changes as a git-compatible diff
> against the repo at https://github.com/dtaht/ceropackages-3.3 (the
> relevant packages are luci/luci-app-aqm and net/aqm-scripts)? :)
>
> -Toke
>
> _______________________________________________
> Cerowrt-devel mailing list
> Cerowrt-devel@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cerowrt-devel
>



-- 
Dave Täht

Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Cerowrt-devel] AQM scripts modified for DSL exploration
  2013-08-11 20:22 [Cerowrt-devel] AQM scripts modified for DSL exploration Sebastian Moeller
  2013-08-11 21:04 ` Toke Høiland-Jørgensen
@ 2013-08-12  0:06 ` Dave Taht
  2013-08-12  9:42   ` Sebastian Moeller
  2013-08-13  9:23   ` Sebastian Moeller
  1 sibling, 2 replies; 6+ messages in thread
From: Dave Taht @ 2013-08-12  0:06 UTC (permalink / raw)
  To: Sebastian Moeller; +Cc: Toke Høiland-Jørgensen, cerowrt-devel

Alright I slammed them into ceropackages for the next build but I
don't get this line:

        STABSTRING="stab mtu 2048 tsize ${TSIZE} overhead ${OVERHEAD}
linklayer ${LINKLAYER}"

mtu 2048?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Cerowrt-devel] AQM scripts modified for DSL exploration
  2013-08-12  0:06 ` Dave Taht
@ 2013-08-12  9:42   ` Sebastian Moeller
  2013-08-13  9:23   ` Sebastian Moeller
  1 sibling, 0 replies; 6+ messages in thread
From: Sebastian Moeller @ 2013-08-12  9:42 UTC (permalink / raw)
  To: Dave Taht; +Cc: Toke Høiland-Jørgensen, cerowrt-devel

Hi Dave,



On Aug 12, 2013, at 02:06 , Dave Taht <dave.taht@gmail.com> wrote:

> Alright I slammed them into ceropackages for the next build but I
> don't get this line:
> 
>        STABSTRING="stab mtu 2048 tsize ${TSIZE} overhead ${OVERHEAD}
> linklayer ${LINKLAYER}"
> 
> mtu 2048?


I agree that looks wrong on the face of it, but it is not as bad as it seems. From td-stab's man page (http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=tc-stab&ampsect=8):

> NAME
> 
>        tc-stab - Generic size table manipulations
> 
> 
> SYNOPSIS
> 
>        tc qdisc add ... stab \
>            [ mtu BYTES ] [ tsize SLOTS ] \
>            [ mpu BYTES ] [ overhead BYTES ] [ linklayer TYPE ] ...
> 
>        TYPE := adsl | atm | ethernet
> 
>        For  the  description  of  BYTES - please refer to the UNITS section of
>        
> tc(8)
> .
> 
>        mtu
>            maximum packet size we create size table for, assumed 2048  if  not
>            specified explicitly
> 
>        tsize
>            required table size, assumed 512 if not specified explicitly
> 
>        mpu
>            minimum packet size used in computations
> 
>        overhead
>            per-packet size overhead (can be negative) used in computations
> 
>        linklayer
>            required linklayer adaptation.
> 

So tc-stab's MTU value is only used to create a size table up to that value, HTB, by the way, also has:

{
        fprintf(stderr, "Usage: ... qdisc add ... htb [default N] [r2q N]\n"
                " default  minor id of class to which unclassified packets are sent {0}\n"
                " r2q      DRR quantums are computed as rate in Bps/r2q {10}\n"
                " debug    string of 16 numbers each 0-3 {0}\n\n"
                "... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]\n"
                "                      [prio P] [slot S] [pslot PS]\n"
                "                      [ceil R2] [cburst B2] [mtu MTU] [quantum Q]\n"
                " rate     rate allocated to this class (class can still borrow)\n"
                " burst    max bytes burst which can be accumulated during idle period {computed}\n"
                " mpu      minimum packet size used in rate computations\n"
                " overhead per-packet size overhead used in rate computations\n"

                " ceil     definite upper class rate (no borrows) {rate}\n"
                " cburst   burst but for ceil {computed}\n"
                " mtu      max packet size we create rate map for {1600}\n"
                " prio     priority of leaf; lower are served first {0}\n"
                " quantum  how much bytes to serve from leaf at once {use r2q}\n"
                "\nTC HTB version %d.%d\n",HTB_TC_VER>>16,HTB_TC_VER&0xffff
                );
}

So, I guess this should have been called max_MTU_tablesize to not be confusing.
My understanding is that the kernel builds a table giving the effective size for each packet length (by taking ATM cell overhead and per packet overhead into account) by looking it up in a table, the "mtu" here just tells tc how large a table to create. I picked 2048, since it seems to be the default just to be verbose (and to account for baby giant frames that seem to be intudiced at some del ISPs to allow 1500 effective MTU in spite of PPPOE overhead, but I digress). Looking at it again I assume that 1600 (HTB's default) might be large enough, but 2048 (actually 2047) allows an easier way to get 16byte size table steps which work well for 48byte ATM payload per cell sizes…
	I guess I will change the AQM scripts to allow direct manipulation of MTU, MPU and TSIZE just to be compete (of these only TSIZE is stab only, the other two also apply to HTB), so that it becomes easier to experiment with those from the GUI...


hope that helps & best regards
	Sebastian







^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Cerowrt-devel] AQM scripts modified for DSL exploration
  2013-08-12  0:06 ` Dave Taht
  2013-08-12  9:42   ` Sebastian Moeller
@ 2013-08-13  9:23   ` Sebastian Moeller
  1 sibling, 0 replies; 6+ messages in thread
From: Sebastian Moeller @ 2013-08-13  9:23 UTC (permalink / raw)
  To: Dave Taht; +Cc: Toke Høiland-Jørgensen, cerowrt-devel

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

Hi Dave,


On Aug 12, 2013, at 02:06 , Dave Taht <dave.taht@gmail.com> wrote:

> Alright I slammed them into ceropackages for the next build but I
> don't get this line:
> 
>        STABSTRING="stab mtu 2048 tsize ${TSIZE} overhead ${OVERHEAD}
> linklayer ${LINKLAYER}"
> 
> mtu 2048?

So it turns out that I got a more complete version ready yesterday. I had a look at the defaults in actual tc and linux kernel code and MTU defaults to 2047 instead of 2048, I guess zero based… Also I am unsure whether the td-stab man page is correct in assuming that the kernel appends the ethernet header size automatically to the packet size (I am a layman but to me it looks like the overhead mechanism just overwrites that information); will try to dig deeper into this...
 I also included the mpu and tsize parameters. Then tested the two implementations with different values put into the fields.
	It looks like stab approach works, at least:

root@nacktmulle:~# tc -d qdisc
qdisc fq_codel a: dev se00 root refcnt 2 limit 1000p flows 1024 quantum 1000 target 5.0ms interval 100.0ms ecn 
qdisc htb 1: dev ge00 root refcnt 2 r2q 10 default 12 direct_packets_stat 0 ver 3.17
 linklayer atm overhead 26 mtu 2047 tsize 128 

but:
tc -d class show dev ge00
class htb 1:11 parent 1:1 leaf 110: prio 1 quantum 1500 rate 128000bit ceil 767000bit burst 1600b/1 mpu 0b overhead 0b cburst 9587b/1 mpu 0b overhead 0b level 0 

So HTB does not report overhead and mpu, no wonder as stab works with a size table and not the rate table that HTB expects, but with the HTB private link layer adaptation mechanism in place I get:

root@nacktmulle:~# tc -d qdisc
qdisc fq_codel a: dev se00 root refcnt 2 limit 1000p flows 1024 quantum 1000 target 5.0ms interval 100.0ms ecn 
qdisc htb 1: dev ge00 root refcnt 2 r2q 10 default 12 direct_packets_stat 0 ver 3.17

which is expected as HTB is not supposed to report anything here, but also:

tc -d class show dev ifb0
class htb 1:11 parent 1:1 leaf 110: prio 1 quantum 1500 rate 32000bit ceil 4899Kbit burst 1600b/1 mpu 0b overhead 0b cburst 244950b/1 mpu 0b overhead 0b level 0 

And Fred Stratton aldso showed (with the ADSL box in AQM ticked):

tc -s -d class show dev ge00
class htb 1:10 parent 1:1 leaf 110: prio 0 quantum 1500 rate 700000bit ceil 700000bit burst 1599b/1 mpu 0b overhead 0b cburst 1599b/1 mpu 0b overhead 0b level 0 

 So it looks like either HTB's private implementation is busted (at least for mpu and overhead). From my searching through the kernel code, my gut feeling is that stab is the preferred method anyway, since it does not fudge with apparent transmit rates (HTB uses a rate table) but instead fudges the packet length to account for the linklayer encapsulation and overhead (it effectively modifies qdisc_skb_cb(skb)->pkt_len)


All this leaves me curious, so I guess I need to figure out a way to test whether the link layer adaptation actually works.
The most visible effect of the ATM quantization is for very small packets were a partly added final atm cell eats a disproportionate part of the bandwidth, so I guess I need to create a stream of such packets and test goodput and latency concurrently. All I need to come up with is the expected goodput at link saturation (with active shaping). This i following the theory that say a 49 byte packet will require two atm cells the second of which is padded with 47 bytes, so almost 50% of the bandwidth is spend for ATM quantization. I guess it might be good to come up with a simple script to test so that it is easier to catch regressions in this functionality more easily. So all I need to do is wrap my head around this and create a simple small script… 

Best
	Sebastian



[-- Attachment #2: usr.zip --]
[-- Type: application/zip, Size: 14857 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-13  9:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-11 20:22 [Cerowrt-devel] AQM scripts modified for DSL exploration Sebastian Moeller
2013-08-11 21:04 ` Toke Høiland-Jørgensen
2013-08-11 21:53   ` Dave Taht
2013-08-12  0:06 ` Dave Taht
2013-08-12  9:42   ` Sebastian Moeller
2013-08-13  9:23   ` Sebastian Moeller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox