[Cake] overhead and mpu
ryan at mounce.com.au
Tue Sep 5 02:49:11 EDT 2017
Firstly to nitpick, DOCSIS doesn't 'sync' in the traditional xDSL
sense and more or less operates at a fixed speed at the physical layer
(DOCSIS 3.1 changes this a bit but it is irrelevant to what you're
trying to achieve here). The modem and CMTS are typically capable of
high speeds however the coax is a shared medium. The actual speed you
see as an end user is typically defined by a shaper in the CM / CMTS
in order to present the illusion of a reliable fixed speed pipe and to
create an artificial model to charge more for higher speeds.
So, it depends where and how that "50Mbps" is defined. It is typical
for a MSO / cable ISP to actually under-sell and over-deliver on the
headline speed, e.g. in my ISP's case advertising "100/2Mbps" on
paper, configuring the shapers at 120/2.5Mbps (which is inclusive of
18 bytes overhead and padding for frames smaller than 64 bytes), which
then results in real world application layer throughput somewhere
between those two values (~114/2.4Mbps on something like speedtest.net
in ideal conditions). As far as cake is concerned, 120/2.5 is the
important figure here.
You want to configure cake with the 'docsis' keyword (equivalent to
overhead of 18 bytes on top of IP, and 64 byte MPU inclusive of
Ethernet header), and 'bandwidth' that is about 99% of whatever your
ISP configures the modem for your plan.
The only problem is that you normally can't view what the modem is
actually configured for, so you need to do some testing which comes
down to trial and error. My technique to configure the upstream rate
was to configure cake for a speed slightly above that of my actual
connection, continuously ping a nearby server on the internet, and
then start a large file upload. The modem's buffer quickly fills up
and latency increases until the buffer is full and packets are being
dropped. From this point I kept re-configuring cake and slightly
reducing the bandwidth until the buffer started to clear and pings
slowly returned to baseline. In my case I observed this at 2499Kbps
(suggesting that my modem's shaper is configured for precisely
2500Kbps), however I use 2496Kbps as the final value so that the
buffer clears slightly faster in case is a 'burp' for whatever reason
that fills it.
Why is the MPU 64? Good question, that is an Ethernet thing defined in
the 70's and inherited by DOCSIS many years later. But yes, this
results in a minimum Ethernet payload of 46 bytes.
Re: hard_header_len, it's been months since I have dug into the source
and I have since forgotten the internal details. I understood it once
upon a time, my advise is to not concern yourself with this.
What I do remember for sure is that from the user configuration
perspective everything is relative to IP packets. It doesn't matter
what layer cake 'sees' internally, this is abstracted away from the
user in order to present a consistent interface.
TL;DR just use the 'docsis' keyword and forget everything you know
about overhead and mpu. That's why it's there, so that nobody else
ever has to go through the pain I did when fine-tuning cake for my
On 5 September 2017 at 15:30, Dennis Fedtke <dennisfedtke at gmail.com> wrote:
> Hi Ryan,
> Thanks for you answers.
> Lets assume again ethernet over docsis connection at 50 Mbit/s.
> So to get 50 Mbit/s ethernet perfomance, the docsis link speed needs to be
> set at a higher link speed to compensate for the 18 header ethernet
> overhead, or?
> The docsis link syncs at exactly 50Mbit/s. When cake is set to exactly
> 50Mbit/s, it is actually set at a higher speed then the link actually is.
> For mpu why 64?
> I assume minimum 46bytes ethernet payload + 18bytes header?
> But why does cake use hard_header_len for the header size which is 14 bytes?
> I don't know how packet sheduler system works, but maybe it is not needed to
> include the ethernet header.
> cake does work on ip pakets or? so this is layer3 i think.
> the hole thing with ethernet headers is happening in layer2.
> This would change the minimum packet size to 46 or?
> Cake mailing list
> Cake at lists.bufferbloat.net
More information about the Cake