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

    Playing with fq_codel in 2.4

    Scheduled Pinned Locked Moved Traffic Shaping
    1.1k Posts 123 Posters 1.6m Views
    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.
    • D
      dtaht @Pentangle
      last edited by

      @pentangle It's in openbsd... please point a freebsd packager at it. https://repology.org/metapackage/flent/versions

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

        @dtaht Unfortunately I'm one of those Windows experts who has little or no knowledge of BSD aside from what the GUI gives. I'll leave that to someone competent in it.

        1 Reply Last reply Reply Quote 0
        • S
          sciencetaco @dtaht
          last edited by

          @dtaht said in Playing with fq_codel in 2.4:

          @pentangle It's in openbsd... please point a freebsd packager at it. https://repology.org/metapackage/flent/versions

          ahh, this would be ideal. The only other hardwired hosts I have to test from are either raspberry pi or an ancient mac mini - pretty sure the mini is the reason my flent tests show such a different picture than when i test using netperf on the pfsense router.

          here was my latest: charter can't tell me what i'm provisioned for, so i don't know if i have 400mb or 300mb, so i adjusted my shaper down to 290 from 390:

          flent rrul run

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

            @sciencetaco Is that a live link? What's your "before" result? That would give you an exact idea as to what you are getting from them, and an even more exact would be running the tcp_download test instead of rrul. What's a dslreports on a before setting? You can try watching your link quality on the cablemodem itself also. Bad SNR there can be a problem.

            (helps to have the flent.gz files)

            Still don't know why you aren't getting close to the set rate. (can the limiter burst size be tuned?) Another thing to try is setting the codel algo to kick in (for test purposes) much later, like target 30ms, but I'm still pointing fingers at the limiter/cpu context switch latency, out of cpu, etc.........

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

              Going back to my alice's restaurant quote (which is an arcane bit of americana - you can lose 20 minutes to this https://www.youtube.com/watch?v=W5_8U4j51lI&start_radio=1&list=RDW5_8U4j51lI , easily, it's a thanksgiving tradition here)

              (I think y'all are mostly in england or the continent?)

              and being sad about how few views the various core bufferbloat presos jim, I and others have done ( https://www.youtube.com/results?search_query=bufferbloat ) - even the highly entertaining one by stephen hemminger ( https://www.youtube.com/watch?v=y5KPryOHwk8&t=828s ) only has 3k views (take 10 minutes out of your life, it's great, but not as great as alice's restaurant)

              and seeing https://www.youtube.com/results?search_query=fq_codel+pfsense have 30k views...

              I'd love to try to get some of what we've discussed and solved above with flent into a script and talk with a good presenter like lawrence or Mark Furneaux to get more folk to pay attention....

              video is not my forte. But you can get anything you want at alice's restaurant.

              1 Reply Last reply Reply Quote 0
              • S
                sciencetaco @dtaht
                last edited by sciencetaco

                @dtaht said in Playing with fq_codel in 2.4:

                @sciencetaco Is that a live link? What's your "before" result? That would give you an exact idea as to what you are getting from them, and an even more exact would be running the tcp_download test instead of rrul. What's a dslreports on a before setting? You can try watching your link quality on the cablemodem itself also. Bad SNR there can be a problem.

                (helps to have the flent.gz files)

                Still don't know why you aren't getting close to the set rate. (can the limiter burst size be tuned?) Another thing to try is setting the codel algo to kick in (for test purposes) much later, like target 30ms, but I'm still pointing fingers at the limiter/cpu context switch latency, out of cpu, etc.........

                link is live, only traffic is 1 streaming client.

                I disbled my limiters and ran a few tests, as you suggested. Here are the outputs:

                tcp_down limited:

                tcp_down limit

                rrul46 without a limiter:

                rrul46 no limit

                tcp_down no limit:

                tcp_download no limit

                i really appreciate everyone that's taken the time to take a look at my output and offer suggestions. thank you all.
                flent .gz files: (4 of them in the tarball)
                0_1539269433292_flent.tar

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

                  @sciencetaco your limited and unlimited tcp_download plots are essentially the same. latency is good. Sure you turned it off? Otherwise your latency is not bad

                  Otherwise the fact that four flows do a bit better than one implies that we have a flow per CMTS channel (take a look at your cmts config and see how many channels are operational), or a limit on my tcp stack on this server (I usually test with four flows) or your receive window... (which btw, I'd not considered before on this thread - I can't do much testing of the real world at real rtts outside the lab. At short RTTs I can certainly do 1gb on various hardware)

                  There's some hint that powerboost might be on with charter (first 20 sec solid then a major drop (yea, optimizing for speedtest)).

                  but heck, rather than fiddle with the tcp config, try killing it with a hammer. try using

                  --te=download_streams=16 tcp_ndown

                  with the limiter on and off. Cool that you just tested both ipv6 and ipv4 at the same time, also. I kind of hope we end up with a "superscript" that has all 10 tests nicely done in a row... against someone elses server.

                  The totals plot is much easier to deal with.

                  thx for sharing the flent data! However I meant to go to bed about 8 hours ago... bbl

                  1 Reply Last reply Reply Quote 0
                  • G
                    gsakes
                    last edited by

                    @ dtaht Here are the results with ack filter on the outbound interface, and ecn enabled:

                    alt text

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

                      @gsakes That result is a thing of beauty. If only the whole internet worked like that.

                      G 1 Reply Last reply Reply Quote 0
                      • G
                        gsakes @dtaht
                        last edited by

                        @dtaht lol - i must be reading that wrong - that result is actually better?

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

                          @gsakes well post the flent files? and tc -s stats? to my eye - tcp up/download occilations are less, bandwidth ruler flat, uplink bandwidth improved by a few percent, and induced latency cut from 5ms to about 4. Love to do a comparison plot.

                          Another flent trick is you can lock the scaling to one plot when flipping between them, so your first plot had more occilations than you see here. I think... let me scroll back

                          5 years of work for those few percentage points compared to the orders of magnitude win fq_codel was... but I'll take it, and frame it.

                          G 1 Reply Last reply Reply Quote 0
                          • G
                            gsakes @dtaht
                            last edited by

                            @dtaht Yes- frame it - it was worth it, no - really. Ok, here's without ack-filter, and ecn, I'll post those flent files next:

                            alt text

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

                              a comparison plot is easier if you make your -t 'text-to-be-included-in-plot' actually meaningful. :)

                              1 Reply Last reply Reply Quote 0
                              • G
                                gsakes
                                last edited by

                                Flent files for ack-filter/ecn:

                                0_1539273758800_rrul-2018-10-11T155505.344180.text-to-be-included-in-plot.flent.gz

                                1 Reply Last reply Reply Quote 0
                                • G
                                  gsakes
                                  last edited by

                                  @dtaht lol - ok - if you don't mind, give me the command line for what you want me to run, it'll be easier than for me looking through the gazillion test/combinations/options. Sure, text is easy, but let me know what other tests you want me to run:)

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

                                    I can fix it in post, but for a future run of any given new thing, it helps minute, hours, or months later if you run it with a meaningful title...

                                    -t 'gsakes_cake_noecn_noack-filter'

                                    or use the --notes option so you capture more of the basic test parameters.

                                    I'm personally sitting on top of a few hundred thousand rrul tests....

                                    Anyway, would love the prior noecn noackfilter test flent file before I try to get to bed

                                    1 Reply Last reply Reply Quote 0
                                    • G
                                      gsakes
                                      last edited by

                                      @dtaht said in Playing with fq_codel in 2.4:

                                      gsakes_cake_noecn_noack-filter'

                                      Sure thing:
                                      0_1539274464800_rrul-2018-10-11T161222.683165.gsakes_cake_noecn_noack-filter.flent.gz

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        gsakes
                                        last edited by

                                        @dtaht (facepalm) - Oh, I see - Flent's got a rather nice gui, now it makes sense:)

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

                                          going back to the fios example earlier. having fq_codel shaping at 48mbit appears to get more bandwidth than fios with 120ms worth of buffering at 50mbit does. Why? You get a drop, it takes 120ms to start recovery, you get a drop at the end of that recovery and the process repeats. Someone tell FIOS that engineering their fiber network to speedtest only works for 20 seconds.....

                                          It's kind of hard to see at this resolution but the green line's median and whiskers are locked solid at 48mbit while the other... (btw, I should go pull the actual data transferred out of flent, I didn't, but you can't actually trust it due to 120ms worth of occilation, anyway, but improved bandwidth here is real. As is the lowered latency.

                                          0_1539274813463_rrul_-_c2558_pfsense2.4.4_u10mbit_d48.5mbit_fios_shaped.png

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

                                            Hey all,

                                            here are some measurements

                                            Setup:
                                            0_1539274219699_Blank Diagram (1).jpeg

                                            Baseline measurement: Pc1 - Pc2 just via switch no sense involved:
                                            0_1539274370833_RRUL_no_shaper_vm_to_vm.png

                                            0_1539274374287_rrul-2018-10-11T071821.166928.no_shaper_vm_to_vm.flent.gz

                                            Measurement with sense without shaper:
                                            0_1539274522951_RRUL_no_shaper_sense_inbetween.png

                                            0_1539274525822_rrul-2018-10-11T073544.338424.no_shaper_sense_inbetween.flent.gz

                                            Then I started shaping/playing around(no methodology involved) to 100/100Mbit and played with tuneables.
                                            For me the only tuneables that were usefull were:

                                            machdep.hyperthreading_allowed="0"
                                            hw.igb.rx_process_limit="-1"
                                            

                                            For the setup i found out that i only adjusted quantum and turned off ecn.

                                            10000: 800.000 Mbit/s    0 ms burst 0 
                                            q75536  50 sl. 0 flows (1 buckets) sched 10000 weight 0 lmax 0 pri 0 droptail
                                             sched 10000 type FQ_CODEL flags 0x0 0 buckets 0 active
                                             FQ_CODEL target 5ms interval 100ms quantum 1518 limit 10240 flows 1024 NoECN
                                               Children flowsets: 10000 
                                            10001: 800.000 Mbit/s    0 ms burst 0 
                                            q75537  50 sl. 0 flows (1 buckets) sched 10001 weight 0 lmax 0 pri 0 droptail
                                             sched 10001 type FQ_CODEL flags 0x0 1024 buckets 0 active
                                             FQ_CODEL target 5ms interval 100ms quantum 1518 limit 10240 flows 1024 NoECN
                                               Children flowsets: 10001
                                            

                                            0_1539274934651_RRUL_100mbit1_1518.png

                                            0_1539274939477_rrul-2018-10-11T172420.808123.100mbit1_1518_down_noecn_upecn.flent.gz

                                            Finally i went up to 800Mbit

                                            0_1539274969781_RRUL_800mbit1_1518.png

                                            0_1539274972854_rrul-2018-10-11T174303.861055.800mbit1_1518_down_noecn_upecn.flent.gz

                                            maybe its interesting :D

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