Multiple child queues with fq_codel

  • Is it possible to have more than one child queue below each pipe so that we can assign different weights? The gui will let me create them but i have no idea how to set them both as fq_codel via cmd line.


  • @areynot I'm a little shaky on the details here myself, but my understanding is that the scheduler (fq_codel) is associated with the pipe (limiter), and that any child queues thereof inherit that scheduler. I have two child queues for each of my two limiters, and I use this command (via the shellcmd package) to configure them:
    ipfw sched 1 config pipe 1 type fq_codel limit 4096 quantum 300 && ipfw sched 2 config pipe 2 type fq_codel limit 4096

    Notice how the command only references schedulers and pipes directly, not child queues. That said, the output from ipfw sched show is confusing, because it only displays two of my four child queues, and seems to show them associated with the wrong limiters (see this post). My suspicion is that this is a flaw of the command rather than the configuration, but I can't be certain. I do know that my upload and download bandwidth is limited as I would expect, and that I get A grades from the dslreports speed test. But it would be nice to know for sure whether it's set up the way I think it is.

  • Thank you so much, i have tried creating more queues no matter what ipfw sched show says and they actually work like a charm.

    Your post now raises the following question, what are the quantum and limit parameters for?

  • @areynot Here is a Linux man page for fq_codel with some descriptions of the various parameters:

    I settled on a quantum of 300 for my upload pipe because I only have 10Mbps upload and both of these sources:
    suggest that 300 is a good value to give interactive flows a boost at lower bandwidths.

    For the limit, the latter source actually suggests that a limit of 1000 or less is reasonable for bandwidths at or below 1Gbps, so mine may be higher than optimal. As with anything like this, tuning is going to be highly dependent on your specific network conditions and goals. But for home use, I think it's fair to say that setting the quantum to 300 on your upload pipe and using limits of 4096 or below should do fine.

    Again though, I don't claim any fq_codel expertise and I'd be happy for anyone with more knowledge on the subject to either confirm or deny this advice :)

  • Thanks so much for the info!

    So let me get this clear ill quote both links here

    On the first one it reads;

    quantum=300   # fq_codel quantum 300 gives a boost to interactive flows
          # At higher bandwidths (50Mbit+) don't bother

    And on the second one;

    We have generally settled on a quantum of 300 for usage below 100mbit as this is a good compromise between SFQ and pure DRR behavior that gives smaller packets a boost over larger ones.

    So my connection is 50dl/5ul... should I set quantum to 300 on both UL and DL?

  • @areynot That's a tough call, since that's right on the edge of where the conventional wisdom seems to say that it matters. Setting the quantum lower gives an advantage to smaller packets, so I think the idea is that UDP traffic (like VoIP) will end up with a de facto higher priority. In practice, I'd be surprised if you could notice the difference. If I were you, with a symmetric 50Mbps connection, I'd probably be inclined to just leave the quantum at its default setting. But it's easy to try both and see if it makes any detectable difference too.

Log in to reply