OK here are the test results as you requested:FreeBSD 12.1 (pf enabled):[root@fbsd1 ~]# uname -rv12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC[root@fbsd1 ~]# top -aSHlast pid: 2954; load averages: 0.44, 0.42, 0.41 up 0+01:38:55 20:13:46132 threads: 10 running, 104 sleeping, 18 waitingCPU: 0.0% user, 0.0% nice, 19.7% system, 5.2% interrupt, 75.1% idleMem: 10M Active, 6100K Inact, 271M Wired, 21M Buf, 39G FreeSwap: 3968M Total, 3968M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 11 root 155 ki31 0 96K RUN 5 94:58 95.25% [idle{idle: cpu5}] 11 root 155 ki31 0 96K CPU1 1 93:26 83.69% [idle{idle: cpu1}] 11 root 155 ki31 0 96K RUN 0 94:44 73.68% [idle{idle: cpu0}] 11 root 155 ki31 0 96K CPU4 4 93:15 72.51% [idle{idle: cpu4}] 11 root 155 ki31 0 96K CPU3 3 93:36 64.80% [idle{idle: cpu3}] 11 root 155 ki31 0 96K RUN 2 92:55 62.29% [idle{idle: cpu2}] 0 root -76 - 0 480K CPU2 2 0:05 34.76% [kernel{if_io_tqg_2}] 0 root -76 - 0 480K CPU3 3 0:14 33.49% [kernel{if_io_tqg_3}] 12 root -52 - 0 304K CPU0 0 26:23 29.62% [intr{swi6: task queue}] 0 root -76 - 0 480K - 4 0:05 23.31% [kernel{if_io_tqg_4}] 0 root -76 - 0 480K - 0 0:05 12.31% [kernel{if_io_tqg_0}] 0 root -76 - 0 480K - 1 0:04 10.01% [kernel{if_io_tqg_1}] 12 root -88 - 0 304K WAIT 5 3:55 2.28% [intr{irq264: mfi0}] 0 root -76 - 0 480K - 5 0:06 1.88% [kernel{if_io_tqg_5}] 2954 root 20 0 13M 3676K CPU5 5 0:00 0.02% top -aSH 12 root -60 - 0 304K WAIT 0 0:01 0.01% [intr{swi4: clock (0)}] 0 root -76 - 0 480K - 4 0:02 0.01% [kernel{if_config_tqg_0}]Single Thread:[ ID] Interval Transfer Bandwidth Retr[ 4] 0.00-10.00 sec 8.45 GBytes 7.26 Gbits/sec 802 sender[ 4] 0.00-10.00 sec 8.45 GBytes 7.26 Gbits/sec receiver10 Threads:[ ID] Interval Transfer Bandwidth Retr[SUM] 0.00-10.00 sec 9.85 GBytes 8.46 Gbits/sec 2991 sender[SUM] 0.00-10.00 sec 9.83 GBytes 8.45 Gbits/sec receiverFreeBSD 12.1 with OPNsense Kernel (pf enabled):[root@fbsd1 ~]# uname -rv12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC[root@fbsd1 ~]# fetch https://pkg.opnsense.org/FreeBSD:12:amd64/20.7/sets/kernel-20.7.2-amd64.txz[root@fbsd1 ~]# mv /boot/kernel /boot/kernel.old[root@fbsd1 ~]# tar -C / -xf kernel-20.7.2-amd64.txz[root@fbsd1 ~]# kldxref /boot/kernel[root@fbsd1 ~]# reboot[root@fbsd1 ~]# uname -rv12.1-RELEASE-p8-HBSD FreeBSD 12.1-RELEASE-p8-HBSD #0 b3665671c4d(stable/20.7)-dirty: Thu Aug 27 05:58:53 CEST 2020 root@sensey64:/usr/obj/usr/src/amd64.amd64/sys/SMP[root@fbsd1 ~]# top -aSHlast pid: 43891; load averages: 0.99, 0.49, 0.20 up 0+00:04:28 20:29:24131 threads: 13 running, 100 sleeping, 18 waitingCPU: 0.0% user, 0.0% nice, 62.5% system, 3.5% interrupt, 33.9% idleMem: 14M Active, 1184K Inact, 270M Wired, 21M Buf, 39G FreeSwap: 3968M Total, 3968M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 0 root -76 - 0 480K CPU3 3 0:08 81.27% [kernel{if_io_tqg_3}] 0 root -76 - 0 480K CPU1 1 0:09 74.39% [kernel{if_io_tqg_1}] 0 root -76 - 0 480K CPU5 5 0:08 73.20% [kernel{if_io_tqg_5}] 0 root -76 - 0 480K CPU0 0 0:21 71.79% [kernel{if_io_tqg_0}] 11 root 155 ki31 0 96K RUN 4 4:09 54.15% [idle{idle: cpu4}] 11 root 155 ki31 0 96K RUN 2 4:09 51.30% [idle{idle: cpu2}] 0 root -76 - 0 480K CPU2 2 0:05 40.10% [kernel{if_io_tqg_2}] 0 root -76 - 0 480K - 4 0:09 37.60% [kernel{if_io_tqg_4}] 11 root 155 ki31 0 96K RUN 0 4:03 26.48% [idle{idle: cpu0}] 11 root 155 ki31 0 96K RUN 5 4:14 25.87% [idle{idle: cpu5}] 11 root 155 ki31 0 96K RUN 1 4:09 24.32% [idle{idle: cpu1}] 12 root -52 - 0 304K RUN 2 1:12 20.63% [intr{swi6: task queue}] 11 root 155 ki31 0 96K CPU3 3 4:00 17.30% [idle{idle: cpu3}] 12 root -88 - 0 304K WAIT 5 0:10 1.47% [intr{irq264: mfi0}]43891 root 20 0 13M 3660K CPU4 4 0:00 0.03% top -aSH 21 root -16 - 0 16K - 4 0:00 0.02% [rand_harvestq] 12 root -60 - 0 304K WAIT 1 0:00 0.02% [intr{swi4: clock (0)}]Single Thread:[ ID] Interval Transfer Bandwidth Retr[ 4] 0.00-10.00 sec 2.89 GBytes 2.48 Gbits/sec 0 sender[ 4] 0.00-10.00 sec 2.89 GBytes 2.48 Gbits/sec receiver10 Threads:[ ID] Interval Transfer Bandwidth Retr[SUM] 0.00-10.00 sec 8.16 GBytes 7.01 Gbits/sec 4260 sender[SUM] 0.00-10.00 sec 8.13 GBytes 6.98 Gbits/sec receiverI included the "top -aSH" output again because my general observation between OPNsense kernel and FreeBSD 12.1 stock kernel is the "[kernel{if_io_tqg_X}]" process usage. Even on an actual OPNsense 20.7.2 installation I notice the exact same behavior of the "[kernel{if_io_tqg_X}]" being consistently higher and throughput significantly slower, specifically on single threaded tests. Note that both of the top outputs were only from the 10 thread count tests only as I did not think to capture them during the single threaded test.I can't help but think that whatever high "[kernel{if_io_tqg_X}]" on the OPNsense kernel means is starving the system of throughput potential.Thoughts? Next steps I can run and provide results from?
My first thought was maybe shared forwarding, but you have this with pfsense 2.5 too, correct?
Ok, iflib, so it's related to 12.X-only, but strange it doesn't happen to vanilla 12.1https://forums.freebsd.org/threads/what-is-kernel-if_io_tqg-100-load-of-core.70642/
Do you still test with this hardware?Dell T20 (Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz (4 cores))
Overall usage core wise when loading the FW.16 cores but only few are used. Its like multicore usage in either IDS or PF is limited.