[Cake] Enforcing video quality question

John Sager john at sager.me.uk
Sat Feb 20 10:09:50 EST 2021



On 20/02/2021 11:53, Toke Høiland-Jørgensen wrote:
> John Sager <john at sager.me.uk> writes:
> 
>> You will need to specify the hosts explicitly, unless you can live with them
>> all sharing one bandwidth class. In that case if you have more than one
>> using bandwidth they would share the bandwidth in that class equally. I
>> assume from your original post that you want each host to be limited in
>> bandwidth to a specific value, but to do that you need a class for each host
>> in the ingress HTB.
> 
> Just do enough classes that you can cover the whole IP space? At least
> for IPv4 that's trivial; for IPv6 you'll probably need to hash and hope
> that there are not too many collisions...

Thinking about that, one could set up, say 16 classes for 16 marks and 
generate the marks using the HMARK target. That could hash on src,dst and 
include the ports if necessary. Then the connections would distribute across 
the HTB classes. However one video connection would generate multiple flows 
(DNS, metadata, etc before & perhaps during the video flow) so simultaneous 
video sessions from several users would likely interfere with each other.

My current solution marks on source IP address or MAC address so all the 
traffic for one host goes into one class.

John

> 
>> What you probably need is a scheduler that has a limit per flow up to
>> an overall ceiling beyond which it shares equally. I'm not aware that
>> any of the schedulers do anything like that.
> 
> If you use FQ-CoDel as the leaf qdisc in HTB you'll get flow scheduling
> to each host. There won't be a per-flow *limit*, but you'll get nice
> scheduling of all flows going towards each host.
> 
> -Toke
> 


More information about the Cake mailing list