Open RubenKelevra opened 1 year ago
Btw as it's not explained in the man page: How does the “bandwidth” per tin work?
The source code documents:
The priority queue operates according to a weighted DRR scheme, combined with
a bandwidth tracker which reuses the shaper logic to detect which side of the
bandwidth sharing threshold the tin is operating. This determines whether a
priority-based weight (high) or a bandwidth-based weight (low) is used for
that tin in the current pass.
But sorry, I just can't understand it without further explanations. How will the bandwidth setting per tin affect the traffic?
I'm sorry, could you add the actual codepoint to your above table?
It's been a really long time since I thought seriously about the design choices we made. One thing I felt strongly about was the need to fix the priority inversion that CS1 represents in a strict precedence setup common in 2003, (and still today), when it had been redefined to mean "background" around then. Later on I kind of gave up on making CS1 behave (it's prioritized on switches over CS0, and deprioritized on wifi), and embraced the LE codepoint.
I don't know what you mean by diffserv?-prio in this table.
What you are describing could be a mistake, or intentional, i mostly advocated for adoption of the diffserv3 layout of these priorities as they most closely matched wondershaper (2002), and more recently diffserv4 (more bandwidth for videoconferencing). I asked the list to look at it.... in cake, all forms of traffic can borrow, so even background traffic can use 100% of the bandwidth if no other traffic is present.
On 22 Dec, 2022, at 10:13 pm, @RubenKelevra @.***> wrote:
How does the “bandwidth” per tin work? Is this a hard limit and traffic in this tin can't use more bandwidth? Or is this kind of the “minimum” bandwidth and traffic in this tier get this bandwidth guaranteed if lower tins send also a lot of data?
It's basically the latter "guarantee" model, but not purely so. More precisely, a tin has one priority (in the form of a round-robin weighting) to deliver traffic at rates up to and including its own bandwidth threshold, and a different priority (weighting), usually much lower, above that threshold.
In Diffserv3 and Diffserv4, the "background" tin is implemented using a high below-threshold priority relative to the "best effort" tin, but a low bandwidth threshold. In Diffserv8, both priorities are low and (IIRC) equal, while the bandwidth threshold is high since it no longer plays a role. Both approaches ensure that background traffic is not starved, but doesn't interfere much with more important traffic. Using the bandwidth threshold mechanism theoretically has a latency benefit over using only the weighting, but it might be difficult to measure in practice.
I'll say that Diffserv3 and Diffserv4 got significantly more attention and testing in the later stages of CAKE's development. Practical use of Diffserv in a home-networking context is just not fine-grained enough to justify 8 tins; it's much better suited to 3, one each for low-latency, high-throughput, and altruistic traffic types.
I'm currently doing some work on the man page and noticed that diffserv8 is implemented differently than diffserv3/4 in terms of bandwidth and quantum settings. I'm not sure if that is really intentionally. While the two background classes in Diffserv8 get's a very low bandwidth share set in Diffserv3/4 and a low quantum, the opposite is the case in Diffserv8.
Bandwidth
Quantum (set in the cakeconfig* functions)