Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Playing with fq_codel in 2.4

    Traffic Shaping
    123
    1.1k
    1.5m
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tman222
      last edited by

      I would try @TheNarc 's suggestions first. If you still experience drops, here are a couple more things to try:

      1. Reducing the quantum parameter on the algorithm to something lower like 300. Reference: https://www.bufferbloat.net/projects/codel/wiki/Best_practices_for_benchmarking_Codel_and_FQ_Codel/

      2. If that also does not help, you could create separate weighted queues under your limiters (e.g. one set of queues for VoIP and RDP traffic, another set for the other traffic) to ensure that VoIP and RDP are guaranteed a certain amount of bandwidth. This would also require you to create the appropriate firewall rules to route VoIP and RDP through the one set of queues, while the rest of the traffic would go through the other set of queues.

      Hope this helps.

      P 2 Replies Last reply Reply Quote 0
      • B
        bafonso
        last edited by bafonso

        As far as I know, there are no weights or priorities with FQ_CODEL. If you want such functionality you could try using QFQ + codel. From ipfw man page:

        implements the QFQ algorithm, which is a very fast variant of
        WF2Q+, with similar service guarantees and O(1) processing
        costs (roughly, 200-250ns per packet).
        

        Using QFQ + Codel works pretty well for me when it comes to sharing bandwith priority based.

        1 Reply Last reply Reply Quote 0
        • D
          dtaht @tman222
          last edited by

          @tman222 try your test further from the ap.

          1 Reply Last reply Reply Quote 0
          • D
            dtaht @Pentangle
            last edited by

            @pentangle normally things like voip "just work" with fq_codel. no classification required. https://www.researchgate.net/publication/327781871_Analysing_the_Latency_of_Sparse_Flows_in_the_FQ-CoDel_Queue_Management_Algorithm

            1 Reply Last reply Reply Quote 0
            • J
              jasonraymundo31
              last edited by

              how to do fq_codel on dual wan (load balancing + failover) setup?

              I tried to follow jim-p video on fq_codel, it works on single wan. but on dual it's not working.

              B 1 Reply Last reply Reply Quote 0
              • D
                dtaht
                last edited by

                1. More long duration flent based tests would help. I'm concerned about various bits of flakyness y'all are reporting, like dropping all connections at the end of a test.

                2. if there is someone out there that would like to send me a box to play with, or (or more simply) open up a ssh port, that would help.

                Z 1 Reply Last reply Reply Quote 0
                • B
                  bafonso @jasonraymundo31
                  last edited by

                  @knowbe4 said in Playing with fq_codel in 2.4:

                  how to do fq_codel on dual wan (load balancing + failover) setup?

                  I tried to follow jim-p video on fq_codel, it works on single wan. but on dual it's not working.

                  I have several gateways (WAN + VPNs) and I did it using limiter rules on LAN. They all get put into the same pipe. The tricky part with your setup is that your overall bandwidth is shared over two connections so if I were you I would use interface QoS per WAN interface and use a round-robin WAN assignment which is I'm assuming you are doing given you are doing load balancing. The only way to properly load balance and share bandwidth evenly between your customers would be to weight the random gateway assignment based on real time bandwidth usage, effectively load balancing the bandwidth as opposed to connections. I'm not sure such thing exists off the shelf.

                  1 Reply Last reply Reply Quote 0
                  • Z
                    zwck @dtaht
                    last edited by zwck

                    @dtaht

                    What exactly would you need, a port open on the pfsense so you could ssh into it and you could play with fq_codel. Or are you more interested in just pure data acquisition with a pfsense standard config using flent. I have not looked into flent, are there some guides i can follow? Or would it be already enough to setup a ubuntu vm and you'll do the rest.

                    D 1 Reply Last reply Reply Quote 0
                    • P
                      Pentangle @TheNarc
                      last edited by

                      @thenarc Sorry for the delay, this is my first time back in the office since I wrote my last post. I've tried adding masks to the queues but still get connections dying right at the end of the upload test. I can confirm when disabling the limiters the connections stay up.

                      1 Reply Last reply Reply Quote 0
                      • P
                        Pentangle @tman222
                        last edited by

                        @tman222 I'm holding my breath, but I think that Quantum change might have fixed this. It's not dropped this time. I'll try further tests later, but I suspect this might be the issue - thanks!

                        D 1 Reply Last reply Reply Quote 0
                        • P
                          Pentangle @tman222
                          last edited by

                          @tman222 Done a bunch more tests and no drops!! :) thanks.

                          1 Reply Last reply Reply Quote 0
                          • D
                            dtaht @zwck
                            last edited by dtaht

                            @zwck The easiest thing from my perspective would be for you to compile netperf with

                            ./configure --enable-demo

                            for this platform, run "netserver -N" on the box (open up the relevant port 12685 on both ipv6 and ipv4 if available), then I can flent test from anywhere if you give me the ip.

                            That's all flent needs to target tests at a box from the outside world. If you are extra ambitious you can also install irtt (it's in go) and open up it's udp port....

                            Flent has other good guidelines on flent.org if you wish to play with it yourself (the rrul test is the way to get the mostest fastest). but it involves installing a lot of python code somewhere.

                            Having ssh into the box also available would let me tcpdump and monitor other things (I'm not usually big on asking for access of that level, being able to target some tests at the box would be a start)

                            Z 1 Reply Last reply Reply Quote 0
                            • D
                              dtaht @Pentangle
                              last edited by

                              @pentangle You shouldn't have to fiddle with the quantum at all. You are saying that a quantum 300 works when a quantum 1514 does not? The quantum 300 thing is an optimization for very slow links, it shouldn't "cause connections to drop at the end of a test".

                              1 Reply Last reply Reply Quote 0
                              • T
                                tman222
                                last edited by

                                Hi @dtaht - the intuition behind my suggestion was to try to make the algorithm more "fair" since VoIP packets tend to be a bit smaller.

                                I was going off of what I read here:

                                https://www.bufferbloat.net/projects/codel/wiki/Best_practices_for_benchmarking_Codel_and_FQ_Codel/

                                "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."

                                @Pentangle also mentioned that his connection speed was 80/20.

                                Is this not the right way to think about the quantum?

                                D 1 Reply Last reply Reply Quote 0
                                • Z
                                  zwck @dtaht
                                  last edited by

                                  @dtaht said in Playing with fq_codel in 2.4:

                                  @zwck The easiest thing from my perspective would be for you to compile netperf with

                                  ./configure --enable-demo

                                  for this platform, run "netserver -N" on the box (open up the relevant port 12685 on both ipv6 and ipv4 if available), then I can flent test from anywhere if you give me the ip.

                                  That's all flent needs to target tests at a box from the outside world. If you are extra ambitious you can also install irtt (it's in go) and open up it's udp port....

                                  Flent has other good guidelines on flent.org if you wish to play with it yourself (the rrul test is the way to get the mostest fastest). but it involves installing a lot of python code somewhere.

                                  Having ssh into the box also available would let me tcpdump and monitor other things (I'm not usually big on asking for access of that level, being able to target some tests at the box would be a start)

                                  I mean i can set up an netperf server behind the pfsense, on it, might not be possible for me.

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    dtaht @tman222
                                    last edited by

                                    @tman222 It is a right way to think about the problem. :) However the OP was reporting "all my connections drop at the end of the test". There should be a "burp" at the beginning of the test as all the flows start, but i guess i don't know what he means by what he said.

                                    P 1 Reply Last reply Reply Quote 0
                                    • D
                                      dtaht @zwck
                                      last edited by

                                      @zwck If you can port forward or ipv6 for a box behind, that would work. Otherwise I tend to originate flent tests from the box(es) behind to one or more of our flent servers in the cloud.

                                      Z 1 Reply Last reply Reply Quote 0
                                      • Z
                                        zwck @dtaht
                                        last edited by

                                        @dtaht said in Playing with fq_codel in 2.4:

                                        @zwck If you can port forward or ipv6 for a box behind, that would work. Otherwise I tend to originate flent tests from the box(es) behind to one or more of our flent servers in the cloud.

                                        For that type of test should i just turn off any type of the traffic shaping or should i keep it running as i have it configured.

                                        D 1 Reply Last reply Reply Quote 0
                                        • D
                                          dtaht
                                          last edited by

                                          if the netgate folk could make that netperf (and irtt) available that would be very helpful overall. I really don't trust web based tests - most of them peak out at ~400mbit in the browser...

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            dtaht @zwck
                                            last edited by

                                            @zwck well, we're trying to determine how well the shaper is working, so we'd want it on for a string of tests and off for another string.

                                            Z 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.