From: Sebastian Moeller <moeller0@gmx.de>
To: Andy Furniss <adf.lists@gmail.com>
Cc: "lartc@vger.kernel.org" <lartc@vger.kernel.org>,
Alan Goodman <notifications@yescomputersolutions.com>,
"cerowrt-devel@lists.bufferbloat.net"
<cerowrt-devel@lists.bufferbloat.net>
Subject: Re: [Cerowrt-devel] Correctly calculating overheads on unknown connections
Date: Wed, 24 Sep 2014 18:23:37 +0200 [thread overview]
Message-ID: <16C372C8-70C4-4E62-A059-BF2C65A88CF0@gmx.de> (raw)
In-Reply-To: <54228C40.4050605@gmail.com>
Hi Andy,
On Sep 24, 2014, at 11:17 , Andy Furniss <adf.lists@gmail.com> wrote:
> Sebastian Moeller wrote:
>
>> Thanks for sharing your test case; I can repeat these results
>> exactly on my machines (I also tried htb instead hfsc for fun: same
>> result as to be expected see below). Looking back at
>> http://lxr.free-electrons.com/ident?i=qdisc_pkt_len_init (line
>> 2731):
>>
>> qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len ;
>>
>> I begin to realize this function is not responsible for adding
>> single wire packet’s ethernet header, but for figuring out in how
>> many on-the-wire packets to chop down a GSO packet , and add the
>> header overhead for the additional wire packets, I had completely
>> looked over the (gso-segs - 1) part, oops.
>
> Glad it helped - I know from trying, and giving up, how hard/error prone
> reading kernel code can be :-)
Especially when all one knows about C is basically from reading K&R with almost no hands-on coding experience ;)
>
>>
>> @cerowrt-devel: everyone using link layer ATM you might want to try
>> to reduce the the per packet overhead by 14… (but please test)
>
> Maybe you mean overhead calculated by a script?
Well in cerowrt’s SQM-scripts we expose the stab options so users can take link layer and overhead into account. If you naively determine the overhead, either with the help of the scrips I posted earlier or by looking it up on a table (if the encapsulation options are known) you will end up not handling the kernel’s auto-added overhead well. Currently SQM scripts does not expose PPP devices only ge00 (ethernet) so -14 seems currently the best recommendation in combination with “please test”. What I am curious after your message is what happens if the kernel terminates a pppoe connection but is connected to a “modem” via ethernet, what does the kernel do. And thanks to your pointers I know have an idea of how to test that ;)
>
> Just to be clear, I expect that wrt would be shaping on ppp, so you
> don't need to take 14 if that's the case.
Good to know.
>
>
>> So I stand corrected, you are right, tic’s stab automatically adds
>> the ethernet header. So I am off to repeat my netperf-wrapper tests
>> right now again with overhead of 30 instead of 44, again these tests
>> confirm your observation. Interestingly, it seems netperf-wrapper’s
>> RRUL test really is suited to figure out the overhead: while shaping
>> to 100% of line rate (on ADSL2+ where line rate rate is the net line
>> rate (after FEC)) specifying too small an overhead the ICMP latency
>> plot shows larger deviations from the expected unload RTT plus 10ms.
>> Too large an overhead however just decreases the good put bait while
>> leaving the latency well under control.
>
> I wouldn't word it like "stab adds ..." This is nothing to do with stab
> really - just the only length stab knows is skb->len and that means
> different things on different interfaces because of how the kernel works.
>
> (I haven't retested all this, but I doubt it's changed)
>
> On ppp skb->len = ip len
>
> On eth skb->len = ip len + 14
>
> On vlan skb->len = ip len + 18
So this is the information I actually wanted to find and then somehow thought qdisc_pkt_len_init() was the place. Do you by chance have any pointer where this assignment is handled?
>
> If you ran my script on various interfaces without stab I expect you
> would still be able to see the difference - everyone who does any tc on
> eth gets shaping with ip+14 sized packets.
>
> Even without tc involved I think you could see the difference looking at
> ip -s ls xxxx type stats on different interfaces.
Thanks again, & Best Regards
Sebastian
>
next prev parent reply other threads:[~2014-09-24 16:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <541C9527.1070105@yescomputersolutions.com>
[not found] ` <541DA8B5.70701@gmail.com>
2014-09-20 17:55 ` Dave Taht
2014-09-20 22:29 ` Andy Furniss
2014-09-21 18:35 ` Sebastian Moeller
[not found] ` <CAK1m8mPBWyg-sR-ekZGUhsOG-0HoZd3eJ-Q6HJpSLyN-J90kHg@mail.gmail.com>
2014-09-21 21:40 ` Alan Goodman
2014-09-22 9:05 ` Sebastian Moeller
2014-09-22 10:01 ` Andy Furniss
2014-09-22 10:20 ` Sebastian Moeller
2014-09-22 13:09 ` Alan Goodman
2014-09-22 19:52 ` Sebastian Moeller
2014-09-22 23:02 ` Alan Goodman
2014-09-23 9:32 ` Sebastian Moeller
2014-09-23 15:10 ` Andy Furniss
2014-09-23 17:47 ` Sebastian Moeller
2014-09-23 19:05 ` Andy Furniss
2014-09-23 22:16 ` Sebastian Moeller
2014-09-24 9:17 ` Andy Furniss
2014-09-24 16:23 ` Sebastian Moeller [this message]
2014-09-24 22:48 ` Andy Furniss
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/cerowrt-devel.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16C372C8-70C4-4E62-A059-BF2C65A88CF0@gmx.de \
--to=moeller0@gmx.de \
--cc=adf.lists@gmail.com \
--cc=cerowrt-devel@lists.bufferbloat.net \
--cc=lartc@vger.kernel.org \
--cc=notifications@yescomputersolutions.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