pfSense Gold Subscription

Author Topic: playing with fq_codel in 2.4  (Read 14231 times)

0 Members and 1 Guest are viewing this topic.

Offline tman222

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +6/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #150 on: October 22, 2017, 12:12:31 pm »
Thanks all for the feedback.  i do have a quick follow up question as I think that I may have misconfigured something:

I actually ended up creating two limiters, one at 100Mbit up/down, the other at 25Mbit up/down to use on a guest network.   Went through the same process and enabled fq_codel on the second set of limiters.  Applied the limiters inside the firewall rules on the guest network, but for some reason when I try to test out the configuration with a machine on the guest network I'm able to go faster than the limited speed of 25Mbit.  However, the interesting thing is that does not seem to be consistent - for instance:

1) When running a speedtest on speedtest.net I'm limited to just 25Mbit (as expected)
2) When running a speedtest on DSLReports I'm able to go well beyond 25Mbit (almost to full speed).

I haven't been able to try an iperf3 test yet unfortunately.  Could it be that something is misconfigured and that the 25Mbit limit is applied per flow vs. the queue as a whole?

Thanks in advance for any insight you might have.

P.S. Some thoughts regarding fq_codel vs. FAIRQ + Codel:  At least in my case, using fq_codel consistently results in a bufferbloat average (for both upload/download) under 10ms.  Using FAIRQ + Codel it often goes beyond that, but never higher than 15-20ms.  Ultimately, I suppose it's not really a big deal, but I found it interesting nonetheless.

Looks like the issue I was experiencing has to do with the Squid Proxy running on the guest network.  Similar to what was described here:

https://forum.pfsense.org/index.php?topic=132960.0

I'll go ahead and start a separate thread as I may need some help  configuring the proper rules to get this work.

Offline Chrismallia

  • Full Member
  • ***
  • Posts: 259
  • Karma: +20/-4
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #151 on: October 22, 2017, 01:04:26 pm »
Implementing fq_codel improved the dsl reports TO A AND B  but USING hfsc and CODEL I get better results  ALL A+, I tried a linux distro with fq_codel got same A,B and sometime C  but again with Pfsense HFSC and codel I get all A+, so for me I am getting better results with HFSC and Codel

Offline gsmornot

  • Jr. Member
  • **
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #152 on: October 22, 2017, 01:43:47 pm »
Implementing fq_codel improved the dsl reports TO A AND B  but USING hfsc and CODEL I get better results  ALL A+, I tried a linux distro with fq_codel got same A,B and sometime C  but again with Pfsense HFSC and codel I get all A+, so for me I am getting better results with HFSC and Codel
Did you configure manually or use the wizard? I used the wizard with HFSC selected and received better grades on dslreports but speed was much lower overall. The scores were better because the throttle was more aggressive. Would you be willing to share your config? Screenshots maybe. I would like to compare what I get using fq_codel as described in this thread.

Offline Harvy66

  • Hero Member
  • *****
  • Posts: 2212
  • Karma: +204/-12
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #153 on: October 23, 2017, 10:34:13 am »
It's possible that HFSC+ALTQ gives better rate limiting characteristics compared to IPFW.

Offline Chrismallia

  • Full Member
  • ***
  • Posts: 259
  • Karma: +20/-4
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #154 on: October 23, 2017, 11:23:19 am »
Implementing fq_codel improved the dsl reports TO A AND B  but USING hfsc and CODEL I get better results  ALL A+, I tried a linux distro with fq_codel got same A,B and sometime C  but again with Pfsense HFSC and codel I get all A+, so for me I am getting better results with HFSC and Codel
Did you configure manually or use the wizard? I used the wizard with HFSC selected and received better grades on dslreports but speed was much lower overall. The scores were better because the throttle was more aggressive. Would you be willing to share your config? Screenshots maybe. I would like to compare what I get using fq_codel as described in this thread.

Sure in dsl buffer bloat test I get half the speed but thats cos if it goes over that speed I get buffer bloat , but running a  normal speed test with same setup I get my full speed, so I only get half with dsl reports so for me HFSC and codel are  doing a fine Job but I am sure many more experts here can correct me. A other thing using ipfw limiters when using  the full upload speed it does not give example enough bandwidth plex remote users need, in hfsc it takes bandwidth from example the upload backup to the cloud and gives plex itS full 5mbps it needs

Offline cwagz

  • Full Member
  • ***
  • Posts: 118
  • Karma: +5/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #155 on: October 23, 2017, 08:23:54 pm »
I have fq_codel working on my system without issue.  I followed the screenshots from post #121.

Question:

If I apply the same lan / wan queues to the In / Out on my IPsec interface rule will bandwidth then be shared evenly between multiple IPsec clients?

I have several people that access server resources and it would be great if the bandwidth was shared evenly when everyone was trying to perform a get operation.

Thanks

Offline chrcoluk

  • Sr. Member
  • ****
  • Posts: 387
  • Karma: +20/-50
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #156 on: October 23, 2017, 08:56:55 pm »
to the guys saying they only had to enable in cli and "nothing" else.

You didnt do this step?

Quote
Start with a recent 2.4 snapshot. Create two root limiters, Download and Upload, and put 95% your maximum values in bandwidth. Create two queues under each, say LAN and WAN. For LAN, selection destination addresses for mask and source addresses for WAN. Modify the default outgoing firewall rule to use WAN under "in" pipe and LAN under "out" pipe.

Also the limiter is surviving all filter reload's?
pfSense 2.4
Qotom Q355G4 or Braswell N3150 with Jetway mini pcie 2x intel i350 lan - 4 gig Kingston 1333 C11 DDR3L
 - 60 gig kingston ssdnow ssd - ISP Sky UK

Offline gsmornot

  • Jr. Member
  • **
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #157 on: October 23, 2017, 09:09:49 pm »
to the guys saying they only had to enable in cli and "nothing" else.

You didnt do this step?

Quote
Start with a recent 2.4 snapshot. Create two root limiters, Download and Upload, and put 95% your maximum values in bandwidth. Create two queues under each, say LAN and WAN. For LAN, selection destination addresses for mask and source addresses for WAN. Modify the default outgoing firewall rule to use WAN under "in" pipe and LAN under "out" pipe.

Also the limiter is surviving all filter reload's?
Yes I did that step. When I say I only used the command line I mean I did not install a patch of any kind. I use Shellcmd package to run the command line again each time my system boots.

Offline Animosity022

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +4/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #158 on: October 25, 2017, 09:15:26 am »
Part of the challenge is trying to figure out what gives better performance is your ISP and what may or may not be going on with your local network.

I've got a 1Gb FIOS line and a pretty 'quiet' neighborhood so I tend to get a very consistent speed for up and download when I'm testing. Since it's not a pure 'lab' scenario, you can't really be sure of the variables in your testing.

I've noticed:
- FQ_Codel seems to have a bit less overhead than HFCS/Codel
- If I get my upload and download speeds set properly, I can straight A+s on any buffer bloat tests
- If I have multiple things going on or something not configured correctly, I tend to get problems
- If you are using a straight up limiter and equally sharing bandwidth across all LAN connections for an example, you won't see your max upload/download as you have it shared equally. To that point, in OPNSense, you would configure a limiter and "weight" your FW rules to prioritize what you wanted.

My rules would look like something like:

Code: [Select]
Limiters:
10000: 940.000 Mbit/s    0 ms burst 0
q75536  50 sl. 0 flows (1 buckets) sched 10000 weight 0 lmax 0 pri 0 droptail
 sched 75536 type FIFO flags 0x0 0 buckets 0 active
10001: 880.000 Mbit/s    0 ms burst 0
q75537  50 sl. 0 flows (1 buckets) sched 10001 weight 0 lmax 0 pri 0 droptail
 sched 75537 type FIFO flags 0x0 0 buckets 0 active


Queues:
q10002  50 sl. 0 flows (1 buckets) sched 10001 weight 100 lmax 0 pri 0  AQM CoDel target 5ms interval 100ms NoECN
q10003  50 sl. 0 flows (1 buckets) sched 10001 weight 10 lmax 0 pri 0  AQM CoDel target 5ms interval 100ms NoECN
q10000  50 sl. 0 flows (1 buckets) sched 10000 weight 100 lmax 0 pri 0  AQM CoDel target 5ms interval 100ms NoECN
q10001  50 sl. 0 flows (1 buckets) sched 10000 weight 10 lmax 0 pri 0  AQM CoDel target 5ms interval 100ms NoECN

Which created some buckets and than weighted by my firewall rules.

I try to use the concept simple is better as I have very limited rules and only really lower my plex download traffic and prioritize my gaming traffic. Everything else just falls into the defaults.

Offline belt9

  • Full Member
  • ***
  • Posts: 233
  • Karma: +24/-6
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #159 on: October 25, 2017, 10:20:33 am »
To that point, in OPNSense, you would configure a limiter and "weight" your FW rules to prioritize what you wanted.

It works the same way in pfSense. I weight my guest Network to 10% of my bandwidth.
So if there is no lan traffic then guest can use all the bandwidth. When someone on lan starts using bandwidth then it will throttle guest all the way until they get down to 10% as necessary.
It's great, limits without wasting bandwidth. Of course you can set hard limits as well if you need to.

Offline Animosity022

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +4/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #160 on: October 25, 2017, 10:30:58 am »
To that point, in OPNSense, you would configure a limiter and "weight" your FW rules to prioritize what you wanted.

It works the same way in pfSense. I weight my guest Network to 10% of my bandwidth.
So if there is no lan traffic then guest can use all the bandwidth. When someone on lan starts using bandwidth then it will throttle guest all the way until they get down to 10% as necessary.
It's great, limits without wasting bandwidth. Of course you can set hard limits as well if you need to.

Apologies as I don't mean to state the obvious so don't read into other than a statement, there is always traffic going on so if the plan is to share out across a LAN.

I always see some traffic going on which is specifically why I avoided equal sharing across my LAN and focused more on prioritizing hosts. All those Echos, ATVs and such are chatty :)

Offline belt9

  • Full Member
  • ***
  • Posts: 233
  • Karma: +24/-6
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #161 on: October 25, 2017, 02:07:45 pm »
I don't think you're understanding.

Example:
On a 100/100 limiter.
LAN is weight 90, Guest is weight 10.

LAN is unused, background traffic only (let's say ~2Kbps) - Guest has up to 99998Kbps of bandwidth available.
In short, guest is free to use as much of the available bandwidth as they want less whatever LAN is using (Guest can only ever take away 10% of the total available bandwidth from LAN. Likewise, LAN can only ever take away 90% of the total available from Guest).

So, neither network will be limited at all until the pipe is full. The same principle is true for clients within each individual network.

Equal sharing does not mean that your bandwidth is automatically divided up between the number of clients on the network and each is given a hard limit.
I.e., 100Mbps limiter with 10 clients on the network automatically limits those clients to 10Mbps each all the time. That does not happen. That scenario would only ever happen if the pipe was full and ALL 10 clients were asking for >10Mbps simultaneously. The instant even one client backed off, that clients bandwidth would be distributed back out into the pool of available bandwidth.

« Last Edit: October 25, 2017, 02:15:17 pm by belt9 »

Offline Animosity022

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +4/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #162 on: October 25, 2017, 02:11:16 pm »
I don't think you're understanding.

Example:
On a 100/100 limiter.
LAN is weight 90, Guest is weight 10.

LAN is unused, background traffic only (let's say ~2Kbps) - Guest has up to 99998Kbps of bandwidth available.
In short, guest is free to use as much of the available bandwidth as they want less whatever LAN is using (Guest can only ever take away 10% of the total available bandwidth from LAN. Likewise, LAN can only ever take away 90% of the total available from Guest).

So, neither network will be limited at all until the pipe is full. The same principle is true for clients within each individual network.

I understood what you said. I used the term "equally sharing bandwidth across all LAN connections" in my post and you repeated my example of weighting, which I said I used.

Offline belt9

  • Full Member
  • ***
  • Posts: 233
  • Karma: +24/-6
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #163 on: October 25, 2017, 02:16:43 pm »
Ok I see.

My point was that you made it sound like only opensense offered this feature, which is incorrect.

Offline Animosity022

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +4/-0
    • View Profile
Re: playing with fq_codel in 2.4
« Reply #164 on: October 25, 2017, 02:27:39 pm »
Ok I see.

My point was that you made it sound like only opensense offered this feature, which is incorrect.

Ah, ok as that wasn't my point. I just wanted to share that both the FQ-Codel and HFSC/Codel work well when configured right and my findings with quite a bit of testing was that FQ-Codel was more efficient but not by much and I had working results with both.