• 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.4m
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.
  • K
    KOM @occamsrazor
    last edited by Sep 19, 2018, 2:06 PM

    @occamsrazor Conventional wisdom says to measure your WAN link speed several times throughout the week, at various times of the day, and then use 90-95% of your LOWEST value.

    O 1 Reply Last reply Sep 19, 2018, 2:12 PM Reply Quote 0
    • O
      occamsrazor @KOM
      last edited by Sep 19, 2018, 2:12 PM

      @kom Thanks. I was doing some testing last night with the fq_codel download bandwidth set to 50Mbit, and when I was running a popular torrent I hit a sustained download rate of over 100Mbit. So it would seem to me that this "limit" isn't actually a hard limit. Can that be right? Or does fq_codel only affect TCP traffic (my torrent client is set to use uTP)

      pfSense CE on Qotom Q355G4 8GB RAM/60GB SSD
      Ubiquiti Unifi wired and wireless network, APC UPSs
      Mac OSX and IOS devices, QNAP NAS

      K 1 Reply Last reply Sep 19, 2018, 4:46 PM Reply Quote 0
      • K
        KOM @occamsrazor
        last edited by Sep 19, 2018, 4:46 PM

        @occamsrazor I have no idea. I'm fairly dumb when it comes to QoS, and know just enough to be dangerous. I haven't played with codel at all.

        1 Reply Last reply Reply Quote 0
        • D
          dtaht
          last edited by Sep 19, 2018, 4:54 PM

          you should not be able to achieve a higher rate than htb (hfsc?) specifies. There are a lot of ways to configure htb wrong (like not classifying all packets correctly), there have also been bugs in some versions.

          Your initial result (2mbits!?) implied to me you'd got the kbit or mbit setting wrong.

          The oddity of your current result implies you are putting utp traffic into another bin entirely. try to build the simplest possible thing that feeds all packets into a single fq_codel instance. Post your code.

          The fq part of fq codel works on all packets, the codel part works well on anything that is tcp-friendly, which certainly includes utp and quic.

          I don't know enough about bsd to help, we found trying to configure this stuff in the linux sqm-scripts so painful that we ended up replacing it all with the one-liner that is sch_cake.

          O 1 Reply Last reply Sep 19, 2018, 5:52 PM Reply Quote 0
          • O
            occamsrazor @dtaht
            last edited by Sep 19, 2018, 5:52 PM

            @dtaht said in Playing with fq_codel in 2.4:

            you should not be able to achieve a higher rate than htb (hfsc?) specifies. There are a lot of ways to configure htb wrong (like not classifying all packets correctly), there have also been bugs in some versions.

            What is HTB? And my understanding is with fq_codel we are not using HFSC? I followed the video so I have the WANDown and WANup limiters under the limiters section, but when I click on "By Interface" > "WAN" I don't have anything enabled in that section, and nothing in the "By Queue" section....... should I?

            Post your code.

            I'm doing it all through the GUI. Is there a command to show the configuration easily?

            @kom said in Playing with fq_codel in 2.4:

            @occamsrazor ............know just enough to be dangerous.

            Same here :-)

            pfSense CE on Qotom Q355G4 8GB RAM/60GB SSD
            Ubiquiti Unifi wired and wireless network, APC UPSs
            Mac OSX and IOS devices, QNAP NAS

            1 Reply Last reply Reply Quote 0
            • D
              dtaht
              last edited by Sep 19, 2018, 6:06 PM

              What you folk are calling a limiter, I call a shaper. The two most common algorithms are token bucket and hfsc. google 'em. I have no idea which or an alternative are being used in the "limiter" concept here (?), nor do I have any idea how this gui is configured, I'm hoping others that are more familiar with bsd and pfsense can chime in. I'm just the co-founder of the bufferbloat project and care deeply seeing about seeing rfc8290 get deployed properly everywhere.

              I do think you need to enable things on the wan and queue sections but all I can point to at the moment is how to set up "sqm" properly on things like openwrt. Perhaps one of those tutorials would help in creating an analogy for this OS?

              https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm

              1 Reply Last reply Reply Quote 1
              • G
                gsmornot
                last edited by gsmornot Sep 24, 2018, 3:31 PM Sep 24, 2018, 3:30 PM

                I'm trying this with a gigabit service and so far no matter what instructions I follow codelq performs better for me. With codelq I see an A each time on the dslreports test. With fq_codel I see a C.

                00001: 900.000 Mbit/s 0 ms burst 0
                q65537 50 sl. 0 flows (1 buckets) sched 1 weight 0 lmax 0 pri 0 droptail
                sched 1 type FQ_CODEL flags 0x0 0 buckets 0 active
                FQ_CODEL target 5ms interval 100ms quantum 1514 limit 10240 flows 1024 ECN
                Children flowsets: 1
                00002: 940.000 Mbit/s 0 ms burst 0
                q00002 50 sl. 0 flows (1 buckets) sched 2 weight 1 lmax 0 pri 0 AQM CoDel target 5ms interval 100ms ECN
                sched 2 type FQ_CODEL flags 0x0 0 buckets 0 active
                FQ_CODEL target 5ms interval 100ms quantum 1514 limit 10240 flows 1024 ECN
                Children flowsets: 2

                1 Reply Last reply Reply Quote 0
                • H
                  Hugovsky
                  last edited by Hugovsky Sep 24, 2018, 4:04 PM Sep 24, 2018, 4:03 PM

                  Remember to flush firewall states between each test.

                  EDIT: what is your hardware and what packages do you use?

                  1 Reply Last reply Reply Quote 0
                  • G
                    gsmornot
                    last edited by Sep 24, 2018, 6:36 PM

                    Hardware is SG-3100 and packages are Avahi, nut, openvpn client export, and pfblockerng. So, not a lot. Overall the network is great, the only time I see the score is testing. I'm just saying my score is better with codelq than fq-codel after following the video guide. I reset states between testing.

                    D 1 Reply Last reply Sep 24, 2018, 6:38 PM Reply Quote 0
                    • D
                      dtaht @gsmornot
                      last edited by Sep 24, 2018, 6:38 PM

                      @gsmornot your post was fq_codel both times... Does your bandwidth change vs a vs codelq? If you are running out of cpu...

                      G 1 Reply Last reply Sep 24, 2018, 7:23 PM Reply Quote 0
                      • S
                        sensemann
                        last edited by sensemann Sep 24, 2018, 7:10 PM Sep 24, 2018, 7:08 PM

                        Hello!

                        I want to priorize two things:

                        1. video-livestream (one server in my DMZ)
                        2. VoIP
                          So thats guaranteed that these to applications always have enough bandwidth.
                          -> If the videostream need all, give them all (expect some 100kbit for the telephones).

                        How can I reach this goal with fq_codel in 2.4.4?

                        I already did the setup which was shown in the youtube-video/hangout with the effect, that the download is now around 175Mbit and the upload only 170KBit! (my cable line is around 220 down, 20Mbit up)

                        00001: 215.000 Mbit/s    0 ms burst 0
                        q65537  50 sl. 0 flows (1 buckets) sched 1 weight 0 lmax 0 pri 0 droptail
                         sched 1 type FQ_CODEL flags 0x0 0 buckets 0 active
                         FQ_CODEL target 5ms interval 100ms quantum 1514 limit 10240 flows 1024 ECN
                           Children flowsets: 1
                        00002:  20.000 Mbit/s    0 ms burst 0
                        q65538  50 sl. 0 flows (1 buckets) sched 2 weight 0 lmax 0 pri 0 droptail
                         sched 2 type FQ_CODEL flags 0x0 0 buckets 0 active
                         FQ_CODEL target 5ms interval 100ms quantum 1514 limit 10240 flows 1024 ECN
                           Children flowsets: 2
                        
                        

                        Thanks for help in advance!
                        sensemann

                        ? 1 Reply Last reply Sep 24, 2018, 11:52 PM Reply Quote 0
                        • G
                          gsmornot @dtaht
                          last edited by Sep 24, 2018, 7:23 PM

                          @dtaht said in Playing with fq_codel in 2.4:

                          @gsmornot your post was fq_codel both times... Does your bandwidth change vs a vs codelq? If you are running out of cpu...

                          Not sure I follow the reply. In each case for testing I use pretty much all of the CPU. The SG3100 is a fanless ARM processor. Enough for line rate gigabit but maybe pushing it for fq_codel but that is just a guess. CodelQ, setup via shaper (vs limiter for fq_codel) seems to perform just a bit better for my setup. Do you think its CPU related?

                          1 Reply Last reply Reply Quote 0
                          • A
                            adx442
                            last edited by Sep 24, 2018, 8:45 PM

                            So, I was using the System Patches package to apply the fq_codel GUI elements to 2.4.3.

                            When I move to 2.4.4, I assume if I don't apply that patch, everything will remain as it is now? Just checking before I upgrade.

                            1 Reply Last reply Reply Quote 0
                            • G
                              goodthings
                              last edited by Sep 24, 2018, 10:42 PM

                              Hello!
                              My connection without any limiters is 105/16, overall A, bufferbloat B, quality A.
                              When I activate fq_codel as per https://youtu.be/o8nL81DzTlU?t=518 with 100/15, the upload bufferbloat improves to only ~22ms but download bufferbloat skyrockets (1000ms avg, 3000ms max) in dslreports. Overall C, bufferbloat F, quality A+.

                              I tried a lot of things but the result is the same, even when I drop the bandwidths to 75% of actual, download buffer bloat always ends up way worse than without any limiters. Tried a lot of things, ECN on/off, firewall rules floating or LAN, etc, all the same. I did exactly what the youtube video suggested, why would I get such a result?

                              q65539  50 sl. 0 flows (1 buckets) sched 3 weight 0 lmax 0 pri 0 droptail
                               sched 3 type FQ_CODEL flags 0x0 0 buckets 1 active
                               FQ_CODEL target 5ms interval 100ms quantum 1514 limit 5120 flows 1024 ECN
                                 Children flowsets: 1
                              BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
                                0 ip           0.0.0.0/0             0.0.0.0/0     63870 95546322 76 114000 363
                              00004:  15.000 Mbit/s    0 ms burst 0
                              q65540  50 sl. 0 flows (1 buckets) sched 4 weight 0 lmax 0 pri 0 droptail
                               sched 4 type FQ_CODEL flags 0x0 0 buckets 1 active
                               FQ_CODEL target 5ms interval 100ms quantum 1514 limit 10240 flows 1024 NoECN
                                 Children flowsets: 2
                                0 ip           0.0.0.0/0             0.0.0.0/0      263    14216  0    0   0
                              

                              any ideas/suggestions would be welcome.

                              1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User
                                last edited by Sep 24, 2018, 11:50 PM

                                @goodthings What hardware do you have? It might be that fq_codel being active is causing your CPU to spike too hard.

                                If you've already got great bufferbloat figures you can rest happy anyway I'd think.

                                G 1 Reply Last reply Sep 25, 2018, 12:38 AM Reply Quote 0
                                • ?
                                  A Former User @sensemann
                                  last edited by Sep 24, 2018, 11:52 PM

                                  @sensemann FQ_CODEL doesn't give you knobs to tweak flows, if you want that, you want to use ALTQ.
                                  The idea of FQ_CODEL is that it doesn't let any single flow starve out the others, so your live videostream and your VoIP should just keep working even if a user triggers off a large torrent.

                                  Given the terrible upload speed, maybe you have a CPU limitation, what hardware are you doing this on?

                                  1 Reply Last reply Reply Quote 0
                                  • G
                                    goodthings @A Former User
                                    last edited by Sep 25, 2018, 12:38 AM

                                    @muppet My hardware is a Netgate SG-2220. There are no other packages running, so the CPU (in top via ssh) seems to peak at 25% load at 100 Mbit.

                                    I experimented some more and find that fq_codel on upload and no queue on download seems to give me the best results. As soon as I enable fq_codel for downloads the bufferbloat jumps from 100ms to 2000ms under load and 15ms to 750ms idle according to dslreports. This is even with 30 Mbit set in the limiter. Similar results with PIE. Curious what could cause this. Tried from different clients, same results.

                                    ? W 2 Replies Last reply Sep 25, 2018, 12:39 AM Reply Quote 0
                                    • ?
                                      A Former User @goodthings
                                      last edited by A Former User Sep 25, 2018, 3:36 AM Sep 25, 2018, 12:39 AM

                                      @goodthings It's a good question - I'm unsure how much testing FQ_CODEL has had on the ARM chipsets, maybe it's just not compatible?

                                      EDIT: This is bollocks, the SG-2200 is not ARM based.

                                      W 1 Reply Last reply Sep 25, 2018, 3:32 AM Reply Quote 0
                                      • W
                                        w0w @A Former User
                                        last edited by Sep 25, 2018, 3:32 AM

                                        @muppet

                                        What ARM chipset are you talking about?

                                        ? 1 Reply Last reply Sep 25, 2018, 3:38 AM Reply Quote 0
                                        • ?
                                          A Former User @w0w
                                          last edited by Sep 25, 2018, 3:38 AM

                                          @w0w Sorry, I totally farked up. I was conflating the SG-3100 post above which is ARM based, but @goodthings has an Intel Atom.

                                          I think I will stop posting about stuff I don't fully understand, my apologies all.

                                          1 Reply Last reply Reply Quote 1
                                          455 out of 1108
                                          • First post
                                            455/1108
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.