• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.
  • W
    w0w
    last edited by Apr 18, 2019, 6:01 PM

    I've rebuilt my network a bit, but I am not sure when this was happened — one PC behind pfSense always get the A or A+ rating and the other get the D or even lower grade rating on dslreports, both are on the same LAN. FQ_CODEL configuration is similar to the others in this thread except only that it is applied on the LAN side (LAN to any). When I disable limiters, then both PCs get A or A+ rating. Does anyone have an idea, what is going wrong?

    F 1 Reply Last reply Jan 15, 2020, 2:46 AM Reply Quote 0
    • O
      ohbobva
      last edited by ohbobva Jun 26, 2019, 8:17 PM Jun 26, 2019, 8:11 PM

      What about Dual WAN?

      I've used the previous post (https://forum.netgate.com/post/807490), with my best guess modifications for two WANs (duplicated rules for each WAN, and duplicated queues), and received good grades on the DSLReports test. However, I use a dual WAN fallover setup. I noticed, today, when WAN1 went down and PFSense switched to WAN2, all traffic stopped. Removing the floating rules fixed the issue.

      The two WANs have different speeds.

      Does anyone have this working with dual WAN setup (different WAN speeds) in a fallover configuration? If so, what do your floating rules look like?

      @uptownVagrant Do you have any suggestions to modify your steps for dual WAN w/ fallover?

      Thanks, in advance, for any suggestions.

      1 Reply Last reply Reply Quote 1
      • P
        provels
        last edited by Aug 19, 2019, 10:36 PM

        OK! I have fallen down the rabbit hole of bufferbloat! EEK!
        I've followed the Netgate video/slides on creating limiters without much benefit.
        I get a B for bufferbloat at DSLReports and A's for Quality and Overall.
        I have a 300/25 (advertised) Comcast cable connection. Tried changing the bandwidth down (reducing) , and the queue lengths (+/-/eliminating) w/o benefit. At this point, the DL queue length is set at 2000 and seems to be best so far. UL does not appear to be a problem. Any thing I can do short of getting a life? :)

        Peder

        MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
        BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

        U 1 Reply Last reply Aug 20, 2019, 12:05 AM Reply Quote 0
        • U
          uptownVagrant @provels
          last edited by Aug 20, 2019, 12:05 AM

          @provels without the limiter rules enabled, and your filters reloaded and old states killed, what speeds are you seeing when you run the dslreports.com/speedtest for 60 seconds? It could be that Comcast's burst capacity during short tests may be heavily skewing your results - I seem to remember the default test duration only being 20 seconds. I think you may have to create an account and go into the preferences of the speed test to increase upload and download duration to 60s. There's always the flent project if you're savvy.

          Another thought, depending on how close your current limiter config is to the Comcast circuit sustained cap, you may be running into some buffering on your cable modem. What DOCSIS version is your cable modem operating?

          I'm assuming you're testing with a computer attached to your router/switch with an Ethernet cable and not using Wi-Fi.

          You could try halving your advertised values in your limiters and then increasing from there after each test. Note, if you're using FQ_CoDel then the queue length that you set in the limiter config is not being used. FQ_CoDel manages queue lengths dynamically and works to dequeue packets within the target you set.

          Here's a guide that might help although I would suggest leaving target, interval, quantum, limit, and flows set as the pfSense defaults for the initial tests.:
          https://forum.netgate.com/topic/112527/playing-with-fq_codel-in-2-4/815

          Best of luck

          P 1 Reply Last reply Aug 20, 2019, 12:40 PM Reply Quote 0
          • P
            Pentangle
            last edited by Aug 20, 2019, 9:01 AM

            @ohbobva I'm running dual WAN with different speeds, and all you need to do is duplicate your setup. i.e. create four different limiters - upstream WAN1, upstream WAN2, downstream WAN1, downstream WAN2, and then a queue within each of those limiters. Set up four floating rules for WAN1-IPv4, WAN1-IPv6, WAN2-IPv4, WAN2-IPv6 and it all works as advertised. Be careful not to just create two queues within the same limiter as the limit will be the aggregate bandwidth of the two.

            J 1 Reply Last reply Aug 20, 2019, 9:35 AM Reply Quote 0
            • J
              jasonraymundo31 @Pentangle
              last edited by Aug 20, 2019, 9:35 AM

              @Pentangle said in Playing with fq_codel in 2.4:

              @ohbobva I'm running dual WAN with different speeds, and all you need to do is duplicate your setup. i.e. create four different limiters - upstream WAN1, upstream WAN2, downstream WAN1, downstream WAN2, and then a queue within each of those limiters. Set up four floating rules for WAN1-IPv4, WAN1-IPv6, WAN2-IPv4, WAN2-IPv6 and it all works as advertised. Be careful not to just create two queues within the same limiter as the limit will be the aggregate bandwidth of the two.

              I'm having hard time to follow you, do you mind taking a screenshot of your config ? Thanks in advance, very much appreciated.

              P 1 Reply Last reply Aug 26, 2019, 11:19 AM Reply Quote 0
              • P
                provels @uptownVagrant
                last edited by provels Aug 20, 2019, 1:47 PM Aug 20, 2019, 12:40 PM

                @uptownVagrant said in Playing with fq_codel in 2.4:

                Thanks very much for your quick reply ;)

                @provels without the limiter rules enabled, and your filters reloaded and old states killed, what speeds are you seeing when you run the dslreports.com/speedtest for 60 seconds? It could be that Comcast's burst capacity during short tests may be heavily skewing your results - I seem to remember the default test duration only being 20 seconds. I think you may have to create an account and go into the preferences of the speed test to increase upload and download duration to 60s. There's always the flent project if you're savvy.

                Did as you suggested, I get results as follows. Looked at flent, but I'm Windows. My upload is no issue, with or without limiters, but the download bloat is normally in the 60-90ms range.

                179/24 Mbps
                189/23
                169/24
                

                This result is pretty typical.
                🔒 Log in to view
                This is a typical result using the Ookla Speed Test (client version)
                🔒 Log in to view >

                Another thought, depending on how close your current limiter config is to the Comcast circuit sustained cap, you may be running into some buffering on your cable modem. What DOCSIS version is your cable modem operating?

                Modem is a Netgear CM600, DOCSIS 3.0, 24x8, Broadcom

                I'm assuming you're testing with a computer attached to your router/switch with an Ethernet cable and not using Wi-Fi.

                Yes, testing wired, but my pfSense is a VM running in Hyper-V and I'm testing from the host Desktop session. Maybe I'll wire up my laptop.

                You could try halving your advertised values in your limiters and then increasing from there after each test.

                I'll start by halving my DL BW and add from there.

                Note, if you're using FQ_CoDel then the queue length that you set in the limiter config is not being used. FQ_CoDel manages queue lengths dynamically and works to dequeue packets within the target you set.

                Noted and deleted.

                Here's a guide that might help although I would suggest leaving target, interval, quantum, limit, and flows set as the pfSense defaults for the initial tests.:
                https://forum.netgate.com/topic/112527/playing-with-fq_codel-in-2-4/815

                Best of luck

                Thanks for the tips. I'll check out the guide and report back. Thanks again! :)

                Peder

                MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                1 Reply Last reply Reply Quote 0
                • C
                  cwagz
                  last edited by Aug 21, 2019, 1:17 PM

                  I can start a new thread if more appropriate...

                  What is the best way to prioritize WiFi Calling traffic while using an FQ_CoDel limiter setup?

                  I have a setup with 30 - 80 WiFi clients. Currently using limiters and FQ_CoDel which seems to share the bandwidth very nicely. We have been having problems with WiFi Calling not being super reliable. We are in a cellular dead zone so people are relying on it.

                  I was able to improve WiFi calling reliability by changing the Firewall Optimization to Conservative and changing the outbound NAT mode to Automatic rule generation.

                  I would like to further optimize by making sure all the WiFi calling traffic has top priority.

                  1 Reply Last reply Reply Quote 0
                  • D
                    dtaht
                    last edited by Aug 21, 2019, 1:27 PM

                    This really is the thread from hell isn't it? I'd do a new thread.

                    Over on linux (and not bsd as yet), we did this:

                    https://www.usenix.org/system/files/conference/atc17/atc17-hoiland-jorgensen.pdf

                    Skip to the MOS score at the end, and work back. There's support now for intel, qca, and mediatek chips. However... if you can get the clients to dscp mark for the VO or VI queue for how your AP defines it, that helps in that direction, and
                    it is generally possible to build a more complicated qos/sqm setup that explicitly prioritizes voip out of the ipfw tools.

                    In general I'm a big believer in short (fair) queues and lots of 'em, and not huge on prioritization. sch_cake (also mentioned on this thread), has some built-in optimizations as well.

                    C 2 Replies Last reply Aug 21, 2019, 1:40 PM Reply Quote 0
                    • C
                      cwagz @dtaht
                      last edited by cwagz Aug 21, 2019, 1:41 PM Aug 21, 2019, 1:40 PM

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • C
                        cwagz @dtaht
                        last edited by Aug 21, 2019, 2:01 PM

                        @dtaht said in Playing with fq_codel in 2.4:

                        This really is the thread from hell isn't it? I'd do a new thread.

                        Over on linux (and not bsd as yet), we did this:

                        https://www.usenix.org/system/files/conference/atc17/atc17-hoiland-jorgensen.pdf

                        Skip to the MOS score at the end, and work back. There's support now for intel, qca, and mediatek chips. However... if you can get the clients to dscp mark for the VO or VI queue for how your AP defines it, that helps in that direction, and
                        it is generally possible to build a more complicated qos/sqm setup that explicitly prioritizes voip out of the ipfw tools.

                        In general I'm a big believer in short (fair) queues and lots of 'em, and not huge on prioritization. sch_cake (also mentioned on this thread), has some built-in optimizations as well.

                        Thank you, dthat. I will look at this information.

                        New thread:
                        https://forum.netgate.com/topic/145924/prioritize-wifi-calling-traffic-and-fq_codel

                        1 Reply Last reply Reply Quote 0
                        • P
                          provels
                          last edited by Aug 21, 2019, 3:06 PM

                          After limiters and rules are in effect and states have been initially cleared, is it necessary to dump the states every time a modification is made to the limiters during testing? Thanks.

                          Peder

                          MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                          BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                          X 1 Reply Last reply Aug 21, 2019, 6:05 PM Reply Quote 0
                          • X
                            xciter327 @provels
                            last edited by Aug 21, 2019, 6:05 PM

                            @provels said in Playing with fq_codel in 2.4:

                            After limiters and rules are in effect and states have been initially cleared, is it necessary to dump the states every time a modification is made to the limiters during testing? Thanks.

                            I clear them every time. Also monitor syslog to check if there are any errors.

                            1 Reply Last reply Reply Quote 1
                            • wgstarksW
                              wgstarks
                              last edited by Aug 24, 2019, 3:00 PM

                              I keep seeing these errors in my system log-

                              fq_codel_enqueue maxidx = 797
                              fq_codel_enqueue over limit
                              fq_codel_enqueue maxidx = 797
                              fq_codel_enqueue over limit
                              fq_codel_enqueue maxidx = 797
                              fq_codel_enqueue over limit
                              fq_codel_enqueue maxidx = 797
                              fq_codel_enqueue over limit
                              fq_codel_enqueue maxidx = 797
                              

                              They seem to show at random times maybe 2 or 3 times a week and will repeat for a few minutes before stopping. Not sure if they represent a problem or how to fix them? Could definitely use any advice.

                              Box: SG-4200

                              T 1 Reply Last reply Aug 25, 2019, 3:09 PM Reply Quote 0
                              • S
                                subzerogts
                                last edited by Aug 25, 2019, 2:10 PM

                                Hi guys, I'm new here and just followed the YouTube video from Netgate on how to set up fq codel with limiters. But then browsing this thread, I see people saying those settings are wrong and to use 'Tail Drop' as the queue management algorithm? I'm confused, why?

                                Also, any recommendation on settings I should use? I have a gigabit verizon fios connection. It's hit 940/900 on Verizon's test if I recall correctly. Actually the upload has gotten over 900 a few times, the download is usually 500-700 on normal speed test sites except Verizon's where it can hit 900+ (and dslreports which has gotten it to 800+ a few times). I have a Plex Media Server and a gaming machine on the network.

                                Using the settings from the YouTube vid got my Bufferbloat score to go from A to A+ in dslreports' test.

                                P T 2 Replies Last reply Aug 25, 2019, 2:45 PM Reply Quote 0
                                • P
                                  provels @subzerogts
                                  last edited by provels Aug 25, 2019, 3:07 PM Aug 25, 2019, 2:45 PM

                                  @subzerogts If you are at A+, I don't expect you have much to gain, LOL. I followed the video and also tried the tail drop config. Nothing seems to help me. Bloat is a B/C, Quality is A/B and Speed is D/F, even though the Ookla speedtest client gets me my advertised 300/25 to various local servers (even when limiting the Down limiter to 150. Nonsensical. Completely random speedtest-cli results testing from an inside server through pfSense and at the DSLReports test page. I don't know if maybe it's Comcast, my modem or what.
                                  🔒 Log in to view
                                  🔒 Log in to view

                                  Peder

                                  MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                                  BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                                  T 1 Reply Last reply Aug 25, 2019, 3:25 PM Reply Quote 0
                                  • P
                                    provels
                                    last edited by Aug 25, 2019, 3:01 PM

                                    If I want to disable the limiters, I know there are checkboxes for that. But if I just disable the floating rules and reset states, that gets them out of the system anyway, right?

                                    Peder

                                    MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                                    BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      tman222 @wgstarks
                                      last edited by Aug 25, 2019, 3:09 PM

                                      @wgstarks said in Playing with fq_codel in 2.4:

                                      I keep seeing these errors in my system log-

                                      fq_codel_enqueue maxidx = 797
                                      fq_codel_enqueue over limit
                                      fq_codel_enqueue maxidx = 797
                                      fq_codel_enqueue over limit
                                      fq_codel_enqueue maxidx = 797
                                      fq_codel_enqueue over limit
                                      fq_codel_enqueue maxidx = 797
                                      fq_codel_enqueue over limit
                                      fq_codel_enqueue maxidx = 797
                                      

                                      They seem to show at random times maybe 2 or 3 times a week and will repeat for a few minutes before stopping. Not sure if they represent a problem or how to fix them? Could definitely use any advice.

                                      @wgstarks - what are your fq-codel parameters set to? One thing you might try is increasing the the value for the limit parameter. Here is a a link to some good documentation on what each parameter does:

                                      http://caia.swin.edu.au/freebsd/aqm/downloads.html

                                      Hope this helps.

                                      wgstarksW 2 Replies Last reply Aug 25, 2019, 9:38 PM Reply Quote 0
                                      • T
                                        tman222 @provels
                                        last edited by Aug 25, 2019, 3:25 PM

                                        @provels said in Playing with fq_codel in 2.4:

                                        @subzerogts If you are at A+, I don't expect you have much to gain, LOL. I followed the video and also tried the tail drop config. Nothing seems to help me. Bloat is a B/C, Quality is A/B and Speed is D/F, even though the Ookla speedtest client gets me my advertised 300/25 to various local servers (even when limiting the Down limiter to 150. Nonsensical. Completely random speedtest-cli results testing from an inside server through pfSense and at the DSLReports test page. I don't know if maybe it's Comcast, my modem or what.
                                        🔒 Log in to view
                                        🔒 Log in to view

                                        @provels - how do the results change if you reduce the number of parallel streams during the DSL Reports speed test? Also, have you tried changing / tuning any of the fq-codel parameters?

                                        Something else I thought of: I admit that I don't know a lot about cable modems, but is buying a DOCSIS 3.1 cable modem an option? As far as I can tell DOCSIS 3.1 includes AQM part of the specification:

                                        https://tools.ietf.org/html/rfc8034

                                        Hope this helps.

                                        P 1 Reply Last reply Aug 25, 2019, 4:28 PM Reply Quote 0
                                        • T
                                          tman222 @subzerogts
                                          last edited by Aug 25, 2019, 3:41 PM

                                          @subzerogts said in Playing with fq_codel in 2.4:

                                          Hi guys, I'm new here and just followed the YouTube video from Netgate on how to set up fq codel with limiters. But then browsing this thread, I see people saying those settings are wrong and to use 'Tail Drop' as the queue management algorithm? I'm confused, why?

                                          Also, any recommendation on settings I should use? I have a gigabit verizon fios connection. It's hit 940/900 on Verizon's test if I recall correctly. Actually the upload has gotten over 900 a few times, the download is usually 500-700 on normal speed test sites except Verizon's where it can hit 900+ (and dslreports which has gotten it to 800+ a few times). I have a Plex Media Server and a gaming machine on the network.

                                          Using the settings from the YouTube vid got my Bufferbloat score to go from A to A+ in dslreports' test.

                                          When you select FQ_CODEL as scheduler you don't have to worry about setting up queue management algorithms for the queues because fq-codel manages per flow created packet queues automatically as part of fq-codel algorithm. This is why you don't really see any difference in performance if you e.g. select Codel as the queue management algorithm if you have FQ_CODEL selected.

                                          Having said that, fq-codel is a bit unique in this regard (in that it also manages per flow queues vs. just scheduling packets). In a way you can kind of think of fq-codel as a hybrid or all-in one packet scheduler and queue management algorithm. However, this is not the case for some of the other algorithms you have available to choose from as well as schedulers (e.g. QFQ, Round Robin, etc.). These are actually just scheduling algorithms that determine how packets should be dequeued from one more packet queues (e.g. Round Robin, weighted, etc.) When using one of these scheduling-only algorithms, you'll still have to setup packet queues and then choose an algorithm to manage those queues. In such as scenario, choosing a queue management algorithm will be important and will make a difference in performance.

                                          Hope this helps.

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