Help w/ FQ-Codel

Started by EFaden, September 04, 2020, 02:25:33 PM

Previous topic - Next topic
Hey Everyone,

I'm struggling to get FQ-Codel working correctly and could use some suggestions.  I have been using

https://www.lullabot.com/articles/eliminating-robots-and-voip-glitches-with-active-queue-management
and
https://forum.opnsense.org/index.php?topic=7423.0

as a guide, but my numbers are not what I think they should be.  Mostly on my download I seem to be loosing about 50 Mbps, but I'm not sure why.  My connection is a 300/30 Mbps cable line.  Here is what I have setup so far.

Pipes:
  Downstream Pipe -
   Bandwidth => 290 (300 Mbps minus about 3% for overhead)
   Metric => Mbps
   Mask => None, Codel Off, Pie Off
   Advanced Options -
     Scheduler Type => FlowQueue-Codel
     FQ-Codel ECN Checked
     All others default/blank

Upstream Pipe
   Bandwidth => 29 (29 Mbps minus about 3% for overhead)
   Metric => Mbps
   Mask => None, Codel Off, Pie Off
   Advanced Options -
     Scheduler Type => FlowQueue-Codel
     FQ-Codel ECN Checked
     All others default/blank

Queues:
  Upstream High Priority Queue (From lullabot link, for TCP ACK and DNS)
    Weight 10
    Pipe - Upstream Pipe
    All Others Default

  Upstream Regular Priority Queue
    Weight 1
    Pipe - Upstream Pipe
    All Others Default

  Downstream Regular Priority Queue
    Weight 1
    Pipe - Downstream Pipe
    All Others Default

Rules

#1, Interface WAN, Source Any, Destination 10.0.0.0/24 (LAN Network), Direction Both, Queue Downstream Regular

#10, Interface WAN, Proto TCP ACK Only, Source 10.0.0.0/24 (LAN Network), Destination Any , Direction Both, Queue Upstream High Priority

#11, Interface WAN, Proto TCP, Source 10.0.0.0/24 (LAN Network), Destination Any, Destination Port 53, Direction Both, Queue Upstream High Priority

#20, Interface WAN, Source 10.0.0.0/24 (LAN Network), Destination Any, Direction Both, Queue Upstream Regular Priority


With these settings I get an A on bufferbloat and my upstream seems to be great, but I seem to loose about 50 mbps on my downstream.

Any thoughts?  Suggestions?

Thanks

When you only have ONE queue, you can just leave it, or try weight 100

Seems to have fixed it now.  Thanks!

October 31, 2020, 06:26:19 PM #3 Last Edit: October 31, 2020, 07:05:53 PM by devilkin
Quote from: EFaden on September 04, 2020, 07:23:29 PM
Seems to have fixed it now.  Thanks!

What did you change? I'm having the same issue - speed should be around 300Mbit, hitting max 130Mbit when I activate the rules.

My setup:


# ipfw sched show
10004: 290.000 Mbit/s    0 ms burst 0
q75540  50 sl. 0 flows (1 buckets) sched 10004 weight 0 lmax 0 pri 0 droptail
sched 10004 type FQ_CODEL flags 0x0 0 buckets 0 active
FQ_CODEL target 5ms interval 100ms quantum 1514 limit 10240 flows 1024 ECN
   Children flowsets: 10001 10003
10005:  19.000 Mbit/s    0 ms burst 0
q75541  50 sl. 0 flows (1 buckets) sched 10005 weight 0 lmax 0 pri 0 droptail
sched 10005 type FQ_CODEL flags 0x0 0 buckets 0 active
FQ_CODEL target 5ms interval 100ms quantum 1514 limit 10240 flows 1024 ECN
   Children flowsets: 10004 10002 10000
10002:  64.000 Kbit/s    0 ms burst 0
sched 10002 type WF2Q+ flags 0x0 0 buckets 0 active
10003:  64.000 Kbit/s    0 ms burst 0
sched 10003 type WF2Q+ flags 0x0 0 buckets 0 active
10000: 100.000 Mbit/s    0 ms burst 0
sched 10000 type WF2Q+ flags 0x1 256 buckets 0 active
    mask:  0x00 0xffffffff/0x0000 -> 0x00000000/0x0000
10001:  10.000 Mbit/s    0 ms burst 0
sched 10001 type WF2Q+ flags 0x1 256 buckets 0 active
    mask:  0x00 0xffffffff/0x0000 -> 0x00000000/0x0000


Download pipe
- Bandwidth 290Mbit/s
- Scheduler:FQ-Codel
- FQ-Codel ECN on

Upload pipe
- Bandwidth 19Mbit/s
- Scheduler:FQ-Codel
- FQ-Codel ECN on

Queues:
Download Queue
- Weight 1
- Pipe: Download Pipe

Voip Download Queue
- Weight: 50
- Pipe: Download Pipe

Voip Upload Queue
- Weight: 50
- Pipe: Upload Pipe

Upload Queue
- Weight: 1
- Pipe: Upload Pipe

High Prio Queue
- Weight: 100
- Pipe: Upload Pipe

Rules:
Prioritize ACK
- #: 1
- Int: WAN
- Proto: tcp (ack)
- Src: 192.168.0.0/16 (my LAN supernet)
- Dest: any
- Target: high prio queue

Prioritize DNS
- #: 2
- Int: WAN
- Proto: ip
- Src: <ip addresses of my DNS boxes>
- Dest: any / port 53
- Target: high prio queue


Prioritize VoipUP
- #: 3
- Int: WAN
- Proto: ip
- Src: <ip addresses of my voip>
- Dest: any
- Target: Voip upstream queue

Prioritize Voip Down
- #: 4
- Int: WAN
- Proto: ip
- Src: <any>
- Dest: <ip addresses of my voip>
- Target: Voip downstream queue

Normal Upload
- #: 5
- Int: WAN
- Proto: ip
- Src: 192.168.0.0/16 (my LAN supernet)
- Dest: any
- Target: upload queue

Normal Download
- #: 6
- Int: WAN
- Proto: ip
- Src: <any>
- Dest: 192.168.0.0/16 (my LAN supernet)
- Target: Download Queue



First off, I'd disable ECN, just dropping the packets seems to work better.
Second, weighted queueing doesn't work with fq_codel, so you might as well just use one queue with weight 100 instead.