Reply To: cls_flow Flow Classifier

#51429

AtroposX
Member

http://oneitguy.com/blogs/netprince/fair-traffic-sharing-esfq-broken-switching-sfqexternal-classifiers

From some reading esfq is really used any more, only sfq is. Sfq allocates bandwidth in a class evenly amongst individual connections, the default linux way.

This script implements esfq’s support by using sfq with an external classifier.

An example of using this method, a class of 5megs download, with only two people using it, one person with 4 connections active, say 4 ftp download sessions, and the other person only has 1 ftp session active, the class will be evenly distributed amongst 5, so 1meg per the 5 connections.

Which is correct for the way sfq works, but is not “fair” to a human sense. It should be based on src/dst.

If the cls_flow module could be implemented, and state flow hash keys dst, then the bandwidth will be distributed based on the dst ip rather than by single connections, evenly distributing the bandwidth into 2 of 2.5megs each per person, resulting in fairness.

When more people get put into the class, say 8 more, making a total of 10 people, the 5meg class gets divided by 10, and turns into 512k per person, until the person stops talking, then that 512k goes back into the class for the others to use, and dynamically changes as needed.

In beta 14 you can do “modprobe cls_flow” and it shows up in lsmod as loaded, but when using the command of “tc filter add flow help” to get qa basic flow help, you get “Unknown filter “flow”, hence option “help” is unparsable. Perhaps it needs to be loaded in a preboot script, prior to QoS loading?

Any help would be appreciated, as this would make distributing bandwidth in a class much more efficient and fair. Too many people using p2p in a class with just basic sfq would ruin a class because of all of the connections it builds up, making the class useless for the other people. If based on cls_flow, all people would get their divided share fairly, and evenly.