* [Cake] Cake fix: diffserv4 priority quanta
@ 2015-05-04 3:58 Jonathan Morton
0 siblings, 0 replies; only message in thread
From: Jonathan Morton @ 2015-05-04 3:58 UTC (permalink / raw)
To: cake
My preferred cake fix is Death By Chocolate - and it’s been quite a while since I’ve had any. But this will have to do for now.
While drafting a paper to go with the code, I had to go back and think about the rationale for quite a few things, and this revealed that the quanta used for the priority layer in diffserv4 mode were incorrect. There are two sets of quanta here:
- The one used when the allocated bandwidth for the class has not been exceeded, which sets a priority balance. The ratios here need to be at least sufficient to allow any higher-priority class to force any lower-priority class out of the higher class's allocation; in practice it’s only necessary to consider adjacent pairs for this purpose.
- The one used when the allocated bandwidth for the class *has* been exceeded, which sets a bandwidth balance. The ratios here should correspond to the effective allocations when *all* classes are fully saturated; transitions between the bandwidth and priority balance states take care of any other case. The effective saturated allocation is the class’s own allocation *minus* the allocation of the class above it.
The basic allocations of the four classes in diffserv4 are:
Background: 100%
Best Effort: 15/16
Video: 3/4
Voice: 1/4
The effective saturated allocations are therefore:
Background: 1/16
Best Effort: 3/16
Video: 1/2
Voice: 1/4
It is now obvious that the quantum ratio between Best Effort and Background needs to be at least 16:1 in the priority balance, and should be 3:1 in the bandwidth balance. Ratios of 4:1 for the elevated-priority classes in priority balance are sufficient.
The quanta for the diffserv8 and precedence modes are already sane (although the bandwidth-balanced quantum for the highest class turns out low, but this doesn't matter in practice; exercise for the reader is to work out why). It helped, there, that the bandwidth allocations proceed geometrically (7:8 ratio in each step up) and are thus easier to calculate intuitively.
I’ve just pushed a corresponding patch to the net-next derived repo. I don’t have push access to the out-of-tree version.
- Jonathan Morton
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-04 3:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 3:58 [Cake] Cake fix: diffserv4 priority quanta Jonathan Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox