Netgate SG-1000 microFirewall

Author Topic: Bufferbloat & Wifi Woes  (Read 306 times)

0 Members and 1 Guest are viewing this topic.

Offline adminadmin

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Bufferbloat & Wifi Woes
« on: January 26, 2018, 07:50:21 pm »
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.

Offline Nullity

  • Hero Member
  • *****
  • Posts: 977
  • Karma: +97/-9
    • View Profile
Re: Bufferbloat & Wifi Woes
« Reply #1 on: January 28, 2018, 12:34:16 am »
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.
Please correct any obvious misinformation in my posts.
-Not a professional; an arrogant ignoramous.

Offline adminadmin

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Bufferbloat & Wifi Woes
« Reply #2 on: January 28, 2018, 09:47:28 am »
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.

Offline Harvy66

  • Hero Member
  • *****
  • Posts: 2324
  • Karma: +213/-12
    • View Profile
Re: Bufferbloat & Wifi Woes
« Reply #3 on: January 28, 2018, 11:46:53 am »
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.

Offline gsmornot

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Re: Bufferbloat & Wifi Woes
« Reply #4 on: January 28, 2018, 05:37:33 pm »
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.

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9823
  • Karma: +1111/-311
    • View Profile
Re: Bufferbloat & Wifi Woes
« Reply #5 on: January 28, 2018, 06:16:27 pm »
codelq on the wifi device should help but it would have to be done there - where the buffering is being done.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline adminadmin

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Bufferbloat & Wifi Woes
« Reply #6 on: January 28, 2018, 10:05:43 pm »
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.

:shrug: 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...