[Cake] Cake, low speed ADSL & fwmark

Jim Geo dim.geo at gmail.com
Tue Jul 28 12:51:27 EDT 2020


>
> > On 28 Jul, 2020, at 12:41 am, Jim Geo <dim.geo at gmail.com> wrote:
> >
> > Thank you for all the efforts you have done to make internet usable.
> >
> > I currently use htb & fq_codel in my low speed ADSL 6Mbps downlink/1 Mbps uplink. I use fwmark to control both uplink and downlink with good results in terms of bandwidth allocation. Streaming video is chopping bulk traffic successfully.
> >
> > Is setting up cake worth the effort at such low speeds? Would it reduce latency?
>
> Cake has a better-quality shaper than HTB does, and a more sophisticated flow-isolation scheme than fq_codel does.  These tend to matter more at low speeds, not less.  It's also generally easier to set up than a compound qdisc scheme.
>
> > Regarding fwmark can you please elaborate more on the calculations performed? Man page is not that helpful.
> >
> > My understanding is this:
> >
> > I use 1,2,3,4 as marks of traffic.
> > If I set the mask to 0xffffff[..] the marks will remain unchanged. Then right shifting will occur for the unset bits, so they will land on tins
> > 1,1,3,1
> >
> > Can you please correct me? If logical and performed between mask and mark value?
>
> Since there's only a few "tins" at a time used in Cake, and the fwmark is a direct mapping into those tins, a narrow mask is probably safer to use than a wide one.  The reason for the mask is so you can encode several values into different parts of the mark value.  The shift is simply to move the field covered by the mask to the low end of the word, so that it is useful to Cake.
>
> For your use case, a mask of 0xF will be completely sufficient.  It would allow you to specify mark values of 1-15, to map directly in the first 15 tins used by Cake, or a mark value of 0 to fall back to Cake's default Diffserv handling.  None of Cake's tin setups use more than 8 tins, and most use fewer.
>
>  - Jonathan Morton
>

Thanks for the info! I've noticed that by using 0xF, marks 1-4 become
tins 0-3. Tin 0 is special? I assumed it's for bulk traffic. I use
diffserv8.


More information about the Cake mailing list