<div dir="ltr">Thanks for the comprehensive and quick reply :) below are some further answers<div class="gmail_extra"><br><div class="gmail_quote">On 17 December 2017 at 16:23, Sebastian Moeller <span dir="ltr"><<a href="mailto:moeller0@gmx.de" target="_blank">moeller0@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Mark,<br>
<div><div class="gmail-h5"><br>
> On Dec 17, 2017, at 11:45, Mark Captur <<a href="mailto:mark.captur@gmail.com">mark.captur@gmail.com</a>> wrote:<br>
><br>
> My setup is as follows<br>
><br>
> vdsl2 modem doing pppoe itself and nat to 10.x.x.x -> lede master eth0.2 (wan static ip in modem's DMZ) eth0.1 (lan) doing nat to 192.168.1.x<br>
><br>
> Here is my current SQM config<br>
> config queue 'eth1'<br>
>         option debug_logging '0'<br>
>         option verbosity '5'<br>
>         option qdisc 'cake'<br>
>         option qdisc_advanced '1'<br>
>         option ingress_ecn 'ECN'<br>
>         option egress_ecn 'NOECN'<br>
>         option qdisc_really_really_advanced '1'<br>
>         option script 'layer_cake.qos'<br>
>         option interface 'eth0.2'<br>
>         option enabled '1'<br>
>         option eqdisc_opts 'nat rtt 50000 bridged-ptm dual-srchost diffserv4'<br>
>         option upload '2400'<br>
>         option linklayer 'ethernet'<br>
>         option overhead '8'<br>
>         option squash_dscp '1'<br>
>         option squash_ingress '1'<br>
>         option iqdisc_opts 'nat rtt 50000 bridged-ptm dual-dsthost'<br>
>         option download '0'<br>
><br>
> config queue<br>
>         option debug_logging '0'<br>
>         option verbosity '5'<br>
>         option download '0'<br>
>         option qdisc 'cake'<br>
>         option script 'layer_cake.qos'<br>
>         option qdisc_advanced '1'<br>
>         option squash_dscp '0'<br>
>         option squash_ingress '0'<br>
>         option ingress_ecn 'ECN'<br>
>         option qdisc_really_really_advanced '1'<br>
>         option egress_ecn 'ECN'<br>
>         option interface 'eth0.1'<br>
>         option enabled '1'<br>
>         option eqdisc_opts 'nat rtt 50000 bridged-ptm dual-dsthost diffserv4'<br>
>         option upload '30000'<br>
>         option linklayer 'ethernet'<br>
>         option overhead '8'<br>
><br>
> Is the overhead correct? should i use the bridged-ptm keyword (or should i use pppoe-ptm).<br>
<br>
</div></div>        The overhead certainly seems confusing. Personally, I dislike the overhead related compound keywords like *-ptm and would recommend the following:<br>
1) remove the bridged-ptm from the eqdisc/iqdisc fields<br></blockquote><div>Done </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2) add "mpu 64" to the eqdisc/iqdisc fields<br></blockquote><div>Done </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
3) set overhad to 8+18+4 = 30 bytes (you will need to account for everything added on the bottleneck, so your packets will be MTU 1492, to leave room for the PPPoE header that the modem adds).<br></blockquote><div>Dne </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
4) DO not set the ptm keyword at all, instead make sure to set the shaper bandwidth to <= sync bandwidth * 64/65 = sync bandwidth * 0.984615384615 (to account for ptm's 64/65 encoding _without_ incurring needless operations per packet).<br></blockquote><div>Done  0.98 (2440 is .98 of 2480) for upstream but had to reduce to .95 for downstream as other wise ping go very high when line saturated</div><div> </div><div><div><br></div><div>root@OpenWrt-Mi3G:~# cat /etc/config/sqm</div><div><br></div><div>config queue 'eth1'</div><div>        option debug_logging '0'</div><div>        option verbosity '5'</div><div>        option qdisc 'cake'</div><div>        option qdisc_advanced '1'</div><div>        option ingress_ecn 'ECN'</div><div>        option egress_ecn 'NOECN'</div><div>        option qdisc_really_really_advanced '1'</div><div>        option script 'layer_cake.qos'</div><div>        option interface 'eth0.2'</div><div>        option enabled '1'</div><div>        option linklayer 'ethernet'</div><div>        option squash_dscp '1'</div><div>        option squash_ingress '1'</div><div>        option download '0'</div><div>        option upload '2440'</div><div>        option overhead '30'</div><div>        option iqdisc_opts 'nat rtt 50000 mpu 64 dual-dsthost'</div><div>        option eqdisc_opts 'nat rtt 50000 mpu 64 dual-srchost diffserv4'</div><div><br></div><div>config queue</div><div>        option debug_logging '0'</div><div>        option verbosity '5'</div><div>        option download '0'</div><div>        option qdisc 'cake'</div><div>        option script 'layer_cake.qos'</div><div>        option qdisc_advanced '1'</div><div>        option squash_dscp '0'</div><div>        option squash_ingress '0'</div><div>        option ingress_ecn 'ECN'</div><div>        option qdisc_really_really_advanced '1'</div><div>        option egress_ecn 'ECN'</div><div>        option interface 'eth0.1'</div><div>        option enabled '1'</div><div>        option linklayer 'ethernet'</div><div>        option overhead '30'</div><div>        option eqdisc_opts 'nat rtt 50000 mpu 64 dual-dsthost diffserv4'</div><div>        option upload '30500'</div></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
4) tell us about your ISP and plan ;)</blockquote><div>ISP is Go Malta VDSL2 70/10, however i'm very far from cabinet so i sync at 32/2.48 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
<br>
<br>
> I tried using ATM_overhead_detector and get the following output<br>
<br>
</span>        Well, yes sorry, this will not work at all for links using PTM; in theory VDSL links could be using ATM and still be in compliance with the ITU specs (at lest that is my reading) but fortunately nobody seems to be doing that. (Also more unfortunately no ISP sseems to be using PTM encoding on ADSL links, but I digress).<br>
<span class="gmail-"><br>
><br>
> 869001 lines parsed...<br>
> Found 144921 ping packets in /home/mark/src/ATM_overhead_<wbr>detector/ping_sweep__<a href="tel:20171217" value="+35620171217">20171217</a>_075202.<wbr>txt<br>
> Elapsed time is 972.739 seconds.<br>
> Minimum size of ping payload used: 16 bytes.<br>
> warning: division by zero<br>
> warning: called from<br>
>     ATM_overhead_detector at line 201 column 15<br>
> warning: legend: ignoring extra labels<br>
> Unknown or ambiguous terminal name 'wxt'<br>
> Unknown or ambiguous terminal name 'wxt'<br>
> Saved figure (5) to: /home/mark/src/ATM_overhead_<wbr>detector/ping_sweep__20171217_<wbr>075202_data.png<br>
> lower bound estimate for one ATM cell RTT based of specified up and downlink is 0.052419 ms.<br>
> estimate for one ATM cell RTT based on linear fit of the ping sweep data is 0.052419 ms.<br>
> Starting brute-force search for optimal stair fit, might take a while...<br>
> Unknown or ambiguous terminal name 'wxt'<br>
> Unknown or ambiguous terminal name 'wxt'<br>
> Best staircase fit cumulative difference is: 2.6952<br>
> Best linear fit cumulative difference is: 2.7314<br>
> Quantized ATM carrier LIKELY (cummulative residual: stair fit 2.6952 linear fit 2.7314<br>
<br>
</span>        Yes, that difference is simply too small to be meaningful. I am currently collecting reference values for these for different technologies and it seems on real ATM/AAL5 links linear residuals are >= 2 * stair residuals, but curently the code simply reports the smaller value as more likely...<br>
<span class="gmail-"><br>
<br>
> remaining ATM cell length after ICMP header is 5 bytes.<br>
> ICMP RTT of a single ATM cell is 0.05871 ms.<br>
><br>
> Estimated overhead preceding the IP header: 48 bytes<br>
> Saved figure (6) to: /home/mark/src/ATM_overhead_<wbr>detector/ping_sweep__<a href="tel:20171217" value="+35620171217">20171217</a>_075202_<wbr>results.png<br>
><br>
> According to <a href="http://ace-host.stuart.id.au/russell/files/tc/tc-atm/" rel="noreferrer" target="_blank">http://ace-host.stuart.id.au/<wbr>russell/files/tc/tc-atm/</a><br>
> 48 bytes overhead indicate<br>
> Overhead of 0 bytes is not possible so assume 1 full packet (48 bytes) overhead...<br>
> Connection: Bridged, LLC/SNAP+FCS RFC-1483/2684 + VLAN tag terminated at modem<br>
> Protocol (bytes): Ethernet Header (14), VLAN tag (4), Ethernet PAD [8] (0), Ethernet Checksum (4), ATM LLC (3), ATM SNAP (5), ATM pad (2), ATM AAL5 SAR (8) : Total 36<br>
><br>
> Add the following to both the egress root qdisc:<br>
> A) Assuming the router connects over ethernet to the DSL-modem:<br>
> stab mtu 2048 tsize 128 overhead 48 linklayer atm<br>
><br>
> Add the following to both the ingress root qdisc:<br>
><br>
> A) Assuming the router connects over ethernet to the DSL-modem:<br>
> stab mtu 2048 tsize 128 overhead 48 linklayer atm<br>
><br>
> Elapsed time is 1042.06 seconds.<br>
> Done...<br>
> ans = [](0x0)<br>
><br>
><br>
> Could my VDSL2 be using ATM? so i have the wrong overhead set?<br>
<br>
</span>        Yes in theory it could, but I am almost 100% certain it is not doing that (AFAICT ISPs try to get rid of all ATM equipment ASAP). But I also believe you have the wrong overhead specified... (if you insist on the keywords try pppoe-ptm). Now, please keep in mind that you properly need to "model" the encapsulation on the bottleneck link, if your ISP uses a traffic shaper on the otherside of your link you need to actually model that shapers settings. As far as I can see, ISPs will model the per packet overhead roughly correctly, but will reduce the bandwidth from the sync values reported by the modem, this requires a few iterations of trial and error to get right. Also some ISPs also use VLAN tags on the bottleneck link...<br>
<br>
Hope this helps...<br>
<br>
Best Regards<br>
        Sebastian<br>
<div><div class="gmail-h5"><br>
Here is tc output<br></div></div></blockquote><div><br></div><div>root@OpenWrt-Mi3G:~# tc -s qdisc</div><div>qdisc noqueue 0: dev lo root refcnt 2</div><div> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)</div><div>qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn</div><div> Sent 13974072314 bytes 14402910 pkts (dropped 0, overlimits 0)</div><div>  maxpacket 17032 drop_overlimit 0 new_flow_count 132368 ecn_mark 0</div><div>  new_flows_len 0 old_flows_len 0</div><div>qdisc noqueue 0: dev br-lan root refcnt 2</div><div> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)</div><div>qdisc cake 8069: dev eth0.1 root refcnt 2 bandwidth 31500Kbit diffserv4 dual-dsthost nat rtt 50.0ms raw total_overhead 14 hard_header_len 14 mpu 64</div><div> Sent 89833020 bytes 59632 pkt (dropped 5, overlimits 44617 requeues 0)</div><div> backlog 0b 0p requeues 0</div><div> memory used: 14112b of 4Mb</div><div> capacity estimate: 31500Kbit</div><div>                   Bulk  Best Effort        Video        Voice</div><div>  thresh       1968Kbit    31500Kbit    15750Kbit     7875Kbit</div><div>  target          9.2ms        2.5ms        2.5ms        2.5ms</div><div>  interval       56.7ms       50.0ms       50.0ms       50.0ms</div><div>  pk_delay          7us        4.3ms        3.5ms        3.2ms</div><div>  av_delay          0us        183us        173us        271us</div><div>  sp_delay          0us          7us          8us          7us</div><div>  pkts                4          408        20384        38841</div><div>  bytes             717        64851     30954992     58820110</div><div>  way_inds            0            0            0            0</div><div>  way_miss            4           64            4           11</div><div>  way_cols            0            0            0            0</div><div>  drops               0            0            5            0</div><div>  marks               0            0            0            0</div><div>  ack_drop            0            0            0            0</div><div>  sp_flows            0            0            0            0</div><div>  bk_flows            0            0            1            0</div><div>  un_flows            0            0            0            0</div><div>  max_len           189         1536         2988         2988</div><div><br></div><div>qdisc cake 8067: dev eth0.2 root refcnt 2 bandwidth 2440Kbit diffserv4 dual-srchost nat rtt 50.0ms raw total_overhead 14 hard_header_len 14 mpu 64</div><div> Sent 3780967 bytes 33806 pkt (dropped 130, overlimits 12207 requeues 0)</div><div> backlog 10860b 9p requeues 0</div><div> memory used: 116928b of 4Mb</div><div> capacity estimate: 2440Kbit</div><div>                   Bulk  Best Effort        Video        Voice</div><div>  thresh      152496bit     2440Kbit     1220Kbit      610Kbit</div><div>  target        119.1ms        7.4ms       14.9ms       29.8ms</div><div>  interval      238.3ms       54.9ms       62.4ms       77.3ms</div><div>  pk_delay          0us      101.5ms        8.2ms          7us</div><div>  av_delay          0us       49.7ms        2.6ms          0us</div><div>  sp_delay          0us        6.8ms        245us          0us</div><div>  pkts                0        22757        11178           10</div><div>  bytes               0      3029896       951692         1096</div><div>  way_inds            0            0            0            0</div><div>  way_miss            0           61            3            3</div><div>  way_cols            0            0            0            0</div><div>  drops               0          130            0            0</div><div>  marks               0            0            0            0</div><div>  ack_drop            0            0            0            0</div><div>  sp_flows            0            1            1            0</div><div>  bk_flows            0            1            0            0</div><div>  un_flows            0            0            0            0</div><div>  max_len             0        11700          120          179</div><div><br></div><div>qdisc noqueue 0: dev wlan1 root refcnt 2</div><div> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)</div><div>qdisc noqueue 0: dev wlan0 root refcnt 2</div><div> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)</div><div>qdisc fq_codel 0: dev tun0 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5.0ms interval 100.0ms memory_limit 4Mb ecn</div><div> Sent 304 bytes 4 pkts (dropped 0, overlimits 0)</div><div>  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0</div><div>  new_flows_len 0 old_flows_len 0</div><div><br></div><div>Best regards,</div><div>Mark </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5">
><br>
> here is my tc -s qdisc output<br>
><br>
> root@OpenWrt-Mi3G:~# tc -s qdisc<br>
> qdisc noqueue 0: dev lo root refcnt 2<br>
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)<br>
> qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn<br>
>  Sent 3460986864 bytes 3651814 pkts (dropped 0, overlimits 0)<br>
>   maxpacket 17032 drop_overlimit 0 new_flow_count 29673 ecn_mark 0<br>
>   new_flows_len 0 old_flows_len 0<br>
> qdisc noqueue 0: dev br-lan root refcnt 2<br>
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)<br>
> qdisc cake 8055: dev eth0.1 root refcnt 2 bandwidth 30Mbit diffserv4 dual-dsthost nat rtt 50.0ms ptm overhead 22 via-ethernet total_overhead 22 hard_header_len 14<br>
>  Sent 20012069 bytes 35472 pkt (dropped 10, overlimits 7587 requeues 0)<br>
>  backlog 0b 0p requeues 0<br>
>  memory used: 36684b of 4Mb<br>
>  capacity estimate: 30Mbit<br>
>                    Bulk  Best Effort        Video        Voice<br>
>   thresh       1875Kbit       30Mbit       15Mbit     7500Kbit<br>
>   target          9.7ms        2.5ms        2.5ms        2.5ms<br>
>   interval       57.2ms       50.0ms       50.0ms       50.0ms<br>
>   pk_delay          0us        5.6ms        855us         15us<br>
>   av_delay          0us        436us         28us         10us<br>
>   sp_delay          0us         27us          8us          6us<br>
>   pkts                0        33679          457         1346<br>
>   bytes               0     19869595        80517        69940<br>
>   way_inds            0          249            0            0<br>
>   way_miss            0         3099           19            7<br>
>   way_cols            0            0            0            0<br>
>   drops               0           10            0            0<br>
>   marks               0            0            0            0<br>
>   ack_drop            0            0            0            0<br>
>   sp_flows            0            1            1            0<br>
>   bk_flows            0            1            0            0<br>
>   un_flows            0            0            0            0<br>
>   max_len             0         7064         2982          350<br>
><br>
> qdisc cake 8053: dev eth0.2 root refcnt 2 bandwidth 2400Kbit diffserv4 dual-srchost nat rtt 50.0ms ptm overhead 22 via-ethernet total_overhead 22 hard_header_len 14<br>
>  Sent 23218772 bytes 35904 pkt (dropped 205, overlimits 27550 requeues 0)<br>
>  backlog 0b 0p requeues 0<br>
>  memory used: 94752b of 4Mb<br>
>  capacity estimate: 2400Kbit<br>
>                    Bulk  Best Effort        Video        Voice<br>
>   thresh        150Kbit     2400Kbit     1200Kbit      600Kbit<br>
>   target        121.1ms        7.6ms       15.1ms       30.3ms<br>
>   interval      242.2ms       55.1ms       62.6ms       77.8ms<br>
>   pk_delay          0us       29.5ms         19us        4.4ms<br>
>   av_delay          0us        3.8ms          1us        2.3ms<br>
>   sp_delay          0us         50us          1us          9us<br>
>   pkts                0        34979           31         1099<br>
>   bytes               0     23342354         2930       162457<br>
>   way_inds            0          177            0            0<br>
>   way_miss            0         2003           27           16<br>
>   way_cols            0            0            0            0<br>
>   drops               0          205            0            0<br>
>   marks               0            0            0            0<br>
>   ack_drop            0            0            0            0<br>
>   sp_flows            0            1            0            0<br>
>   bk_flows            0            1            0            0<br>
>   un_flows            0            0            0            0<br>
>   max_len             0         8342           98          598<br>
><br>
> qdisc noqueue 0: dev wlan1 root refcnt 2<br>
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)<br>
> qdisc noqueue 0: dev wlan0 root refcnt 2<br>
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)<br>
> qdisc fq_codel 0: dev tun0 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5.0ms interval 100.0ms memory_limit 4Mb ecn<br>
>  Sent 304 bytes 4 pkts (dropped 0, overlimits 0)<br>
>   maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0<br>
>   new_flows_len 0 old_flows_len 0<br>
><br>
> Thanks,<br>
> Mark<br>
</div></div>> ______________________________<wbr>_________________<br>
> Cake mailing list<br>
> <a href="mailto:Cake@lists.bufferbloat.net">Cake@lists.bufferbloat.net</a><br>
> <a href="https://lists.bufferbloat.net/listinfo/cake" rel="noreferrer" target="_blank">https://lists.bufferbloat.net/<wbr>listinfo/cake</a><br>
<br>
</blockquote></div><br></div></div>