> > SFQ is very useful as a leaf qdisc. But by default, its internal queue
> > length is 128 which is too much for small classes or even for
> > not-so-fast links. Changing SFQ_DEPTH in net/sched/ sch_sfq.c to
about
> > 10-20 results in flows responding much faster to bandwidth changes.
I''m not sure I understand what problem is being described, but I
suspect it''s the same one I''ve observed: in a low rate class a
long
queue gives a long delay. In general it''s better to just drop a
packet than to delay it for more than a few seconds. One approach
is to change the queue size. In the current sfq this is pretty easy
(easier to make it smaller than larger), but that solution has some
drawbacks. First you do have to recompile. Second you still only get
one length for all queues. The "right" way is to make the queue
length a parameter that can be set independently for each queue.
However this is not an easy change to make for SFQ. Even if it were
made, you''d end up having to supply two dependent pieces of data,
a rate limit and a queue length.
I propose a much easier solution: a time limit on packets. The easy
implementation is to check the packet''s "age" in dequeue, and
if
stale, drop the packet and dequeue another. The extra cost of a queue
that''s longer than necessary is the space used for storing the packets
that will eventually be dropped and the cost of the enqueue and
dequeue that would have been avoided if the packet had been dropped
before enqueuing.
I''ve make such a change in my local variant of SFQ.
However I think it would make more sense to set and enforce this age
limit on a global basis. The obvious advantage (if you believe that
you want the same age limit for all queues anyway) is that you change
one piece of code and specify one limit instead of changing the code
and specifying the limit for every qdisc.
The most global possible place would be after dequeing for the root
qdisc for the device (in net/core/dev.c). That turns out to be TOO
global, though, cause it interacts in the wrong way with rate limits.
If you rate limit some class and enqueue at slightly more than the
specified rate you end up dropping all of the packets.
The best I can see is that every qdisc that does rate limiting should
also support an age limit. So I propose my SFQ modification be moved
to HTB (and any others that anyone still wants to use and is willing
to change).
BTW, anyone interested in trying to improve SFQ please let me know.
The local variant mentioned above no longer does SFQ, but contains a
lot that would be worth backporting.