[Cake] upstreaming cake in 2017?

Jonathan Morton chromatix99 at gmail.com
Fri Dec 23 04:53:25 EST 2016

>> As far as Diffserv is concerned, I explicitly assume that the standard RFC-defined DSCPs and PHBs are in use, which obviates any concerns about Diffserv policy boundaries.
> 	??? This comes close to ignoring reality. The RFCs are less important than what people actually send down the internet.

What is actually sent down the Internet right now is mostly best-effort only - the default CS0 codepoint.  My inbound shaper currently shows 96GB best-effort, 46MB CS1 and 4.3MB “low latency”.

This is called the “chicken and egg” problem; applications mostly ignore Diffserv’s existence because it has no effect in most environments, and CPE ignores Diffserv’s existence because little traffic is observed using it.

To solve the chicken-and-egg problem, you have to break that vicious cycle.  It turns out to be easier to do that on the network side, creating an environment where DSCPs *do* have effects which applications might find useful.

> coming up with a completely different system (preferable randomized for each home network) will make gaming the DSCPs much harder

With all due respect, that is the single most boneheaded idea I’ve come across on this list.  If the effect of applying a given DSCP is unpredictable, and may even be opposite to the desired behaviour - or, equivalently, if the correct DSCP to achieve a given behaviour is unpredictable - then Diffserv will *never* be used by mainstream users and applications.

>> Cake does *not* assume that DSCPs are trustworthy.  It respects them as given, but employs straightforward countermeasures against misuse (eg. higher “priority” applies only up to some fraction of capacity),
> 	But doesn’t that automatically mean that an attacker can degrade performance of a well configured high priority tier (with appropriate access control) by overloading that band, which will affect the priority of the whole band, no? That might not be the worst alternative, but it certainly is not side-effect free.

If an attacker wants to cause side-effects like that, he’ll always be able to do so - unless he’s filtered at source.  As a more direct counterpoint, if we weren’t using Diffserv at all, the very same attack would degrade performance for all traffic, not just the subset with equivalent DSCPs.

Therefore, I have chosen to focus on incentivising legitimate traffic in appropriate directions.

>> So, if Cake gets deployed widely, an incentive for applications to correctly mark their traffic will emerge.
> 	For which value of “correct” exactly?

RFC-compliant, obviously.

There are a few very well-established DSCPs which mean “minimise latency” (TOS4, EF) or “yield priority” (CS1).  The default configuration recognises those and treats them accordingly.

>> But almost no program uses CS1 to label its data as lower priority

See chicken-and-egg argument above.  There are signs that CS1 is in fact being used in its modern sense; indeed, while downloading the latest Star Citizen test version the other day, 46MB of data ended up in CS1.  Star Citizen uses libtorrent, as I suspect do several other prominent games, so adding CS1 support there would probably increase coverage quite quickly.

>> Cake also assumes in general that the number of flows on the link at any given instant is not too large - a few hundred is acceptable.  
> 	I assume there is a build time parameter that will cater to a specific set of flows, would recompiling with a higher value for that constant allow to taylor cake for environments with a larger number of concurrent flows?

There is a compile-time constant in the code which could, in principle, be exposed to the kernel configuration system.  Increasing the queue count from 1K to 32K would allow “several hundred” to be replaced with “about ten thousand”.  That’s still not backbone-grade, but might be useful for a very small ISP to manage its backhaul, such as an apartment complex FTTP installation or a village initiative.

 - Jonathan Morton

More information about the Cake mailing list