Bufferbloat & Wifi Woes



  • I know I'm conflating alot of things here, but I have a multi faceted situation trying to solve.

    Connection is gigE Fios. Mmax is about 840/840.

    I've been playing ALOT with Flent and netperf tests try to see where things break.

    My wifi buffer bloat is the weakest right now.

    Test: dslreports.com/speedtest

    I have terrible buffer bloat(Never above a C), ONLY on my 2.4 ghz network.
    The AP is an ASUS RC5300.

    On my 5 ghz networks B or better.

    Wired is always A or better.

    Some questions:
    Any idea why this occurs? And if so, only on the 2.4ghz?
    If that ^^^^ question doesn't have "merit" then what can I do in pfSense to help this along… ?

    PS: all of these tests are line of sight with router, 20 ft, same spot.



  • How bad is your WiFi interference, error-correction, re-transmits, etc? You can check via the Asus's CLI with the "wl" (IIRC) command.

    You might try AsusWRT-merlin, but only if you are a power-user who can conclude that it may improve your cituation, which it may not.

    WiFi troubles are hugely complex VS wired.



  • Thanks for reply. I am already Merlin, have been for years!

    Right, I know WiFi is very complex versus wired.

    However, I was wondering if there were any "classical" things that pfSense could do to help wifi networks, etc. Other than QoS on the port?

    I'll checkout the 'wl' command.



  • Current wifi is quite bloated. Wireless is very noisy with unreliable transmission rates that can swing many orders of magnitude in short time. In order to keep bandwidth high, there are very large buffers. Then you have the issue that wifi has built in re-transmission, making Layer 1 latency highly unpredictable.

    The proper way to deal with buffer bloat is to have all buffers dynamically size to real-time dequeuing rates to keep total buffering limited. No matter what you do, the buffer on the wifi device is too large. The only way to manage bufferbloat in a system that you cannot control the buffers is to insert a choke-point that you control, so you can control the buffering at the slowest point. The way to do this is by artificially limiting the choke-point to being slower than everything else, which includes wifi that swings from 1Gb/s to 1Mb/s. Just make pfSense limit to 0.9Mb/s, and you're golden.

    That was a bit exaggerated, but it shows the point. You might be able to get away with rate limiting to some slower rate that isn't so crazy low like 100Mb/s.

    Some other things you can do is to have an mu-mimo AP. Each non-overlapping beam has it's own queue. It's kind of required in order to allow concurrent transmissions to take advantage of "mu". "Air time fairness" is another potential issue if you have many generations of wifi devices, especially on 2.4ghz.

    The good news is 802.11ax is going to help with a lot of this and will apply to 2.4 and 5ghz.



  • @adminadmin:

    I know I'm conflating alot of things here, but I have a multi faceted situation trying to solve.

    Connection is gigE Fios. Mmax is about 840/840.

    I've been playing ALOT with Flent and netperf tests try to see where things break.

    My wifi buffer bloat is the weakest right now.

    Test: dslreports.com/speedtest

    I have terrible buffer bloat(Never above a C), ONLY on my 2.4 ghz network.
    The AP is an ASUS RC5300.

    On my 5 ghz networks B or better.

    Wired is always A or better.

    Some questions:
    Any idea why this occurs? And if so, only on the 2.4ghz?
    If that ^^^^ question doesn't have "merit" then what can I do in pfSense to help this along… ?

    PS: all of these tests are line of sight with router, 20 ft, same spot.

    I have gigabit as well. The only time I notice bufferbloat is when I’m sitting around on dslreports running tests. In regular use nothing is fast enough to saturate my connection and cause bufferbloat issues. Don’t take this the wrong way but are you solving an issue you’re having or are you solving a test result. If the latter don’t waste your time. The simple answer to remove bufferbloat is to decide where to choke the connection. If at your router make it slow enough to never over run the buffer. Speed will suffer but at least you will pass the test. Option 2 is to stop testing and just use your service. Solve issues if you have them but not because a Speedtest says you do.


  • Netgate

    codelq on the wifi device should help but it would have to be done there - where the buffering is being done.



  • @Harvy66:

    Then you have the issue that wifi has built in re-transmission, making Layer 1 latency highly unpredictable.

    "Air time fairness" is another potential issue if you have many generations of wifi devices, especially on 2.4ghz.

    Right… OK. I'm glad you replied, I thought layer 1 was "un-sniffable" without RF, thanks for confirming this! I figured it was the re-transmit, but I didn't know for sure. Would a "better" MTU or something help?

    What do you mean by Aritime Fairness? Like, should I turn it ON? or OFF? The Asus AC5300 has all of the facny MuMIMO options, but it's pretty opaque on what it actually does/help.

    @gsmornot I hear ya, however I'm a bit of a perfectionist, and for the first time around bench marking i want to get it right. Mainly having something highly repeatable. I've been using DSLReports but then got turned onto FLENT -which is netperf-wrapper in a nice interface.

    Thinking about this more, I should setup a Netperf server on my wired LAN side, and benchmark the Wifi first to there, then move to the pfSense.

    I've attached some examples of QoS with Flent. I've only managed to get ONE of the Upload, Download, or Latency at max performance, but never all at once.

    Ideally I want all of the lines to be very flat, with no deviance of the other classes or "random" looking data. In addition - never hitting 0mbit, keeping all values above 20 or some nice amount. You can see that it IS possible.

    🤷 Maybe I'll make a new thread on that, but it's mostly for WAN. It would be interesting to QoS the AP port...  hrm...

    ![Screen Shot 2018-01-28 at 11.03.42 PM.png](/public/imported_attachments/1/Screen Shot 2018-01-28 at 11.03.42 PM.png)
    ![Screen Shot 2018-01-28 at 11.03.42 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2018-01-28 at 11.03.42 PM.png_thumb)
    ![Screen Shot 2018-01-28 at 11.03.29 PM.png](/public/imported_attachments/1/Screen Shot 2018-01-28 at 11.03.29 PM.png)
    ![Screen Shot 2018-01-28 at 11.03.29 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2018-01-28 at 11.03.29 PM.png_thumb)
    ![Screen Shot 2018-01-28 at 11.03.21 PM.png](/public/imported_attachments/1/Screen Shot 2018-01-28 at 11.03.21 PM.png)
    ![Screen Shot 2018-01-28 at 11.03.21 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2018-01-28 at 11.03.21 PM.png_thumb)