RSS won't enable

Started by clarknova, May 13, 2023, 02:17:44 AM

Previous topic - Next topic
OPNsense 23.1.7_3-amd64

This is a dual-core Pentium G4400 with 8x Intel i210 NICs.

I followed the guide to enable RSS, setting all the tunables, then rebooted, but RSS is still showing disabled. As far as I can tell my hardware should be supported. Am I mistaken? Did I do something wrong?

https://docs.opnsense.org/troubleshooting/performance.html

# sysctl -a | grep rss
net.inet.rss.bucket_mapping: 0:0 1:1
net.inet.rss.enabled: 0
net.inet.rss.debug: 0
net.inet.rss.basecpu: 0
net.inet.rss.buckets: 2
net.inet.rss.maxcpus: 64
net.inet.rss.ncpus: 2
net.inet.rss.maxbits: 7
net.inet.rss.mask: 1
net.inet.rss.bits: 1
net.inet.rss.hashalgo: 2
hw.bxe.udp_rss: 0
hw.ix.enable_rss: 1

root@ldc:~ # netstat -Q
Configuration:
Setting                        Current        Limit
Thread count                         1            1
Default queue limit                256        10240
Dispatch policy                 direct          n/a
Threads bound to CPUs         disabled          n/a

Protocols:
Name   Proto QLimit Policy Dispatch Flags
ip         1   1000   flow  default   ---
igmp       2    256 source  default   ---
rtsock     3    256 source  default   ---
arp        4    256 source  default   ---
ether      5    256 source   direct   ---
ip6        6   1000   flow  default   ---

Workstreams:
WSID CPU   Name     Len WMark   Disp'd  HDisp'd   QDrops   Queued  Handled
   0   0   ip         0     1     2835        0        0       91     2926
   0   0   igmp       0     0        0        0        0        0        0
   0   0   rtsock     0     2        0        0        0       23       23
   0   0   arp        0     0     7393        0        0        0     7393
   0   0   ether      0     0    10262        0        0        0    10262
   0   0   ip6        0     0        0        0        0        0        0

You only need these settings in System->Settings->Tunables:

net.isr.bindthreads = 1
net.isr.maxthreads = -1
net.inet.rss.enabled = 1


Could you verify they are really there?
In theory there is no difference between theory and practice. In practice there is.

May 13, 2023, 09:38:38 PM #2 Last Edit: May 13, 2023, 09:43:39 PM by clarknova
This is what I have. I haven't made any changes to the tunables since rebooting.

root@ldc:~ # grep isr /boot/loader.conf
net.isr.bindthreads="1"
net.isr.maxthreads="-1"

root@ldc:~ # sysctl -a | grep net.isr
net.isr.numthreads: 1
net.isr.maxprot: 16
net.isr.defaultqlimit: 256
net.isr.maxqlimit: 10240
net.isr.bindthreads: 0
net.isr.maxthreads: 1
net.isr.dispatch: direct

root@ldc:~ # grep rss /boot/loader.conf
net.inet.rss.bits="1"
net.inet.rss.enabled="1"

root@ldc:~ # sysctl -a | grep net.rss
net.inet.rss.bucket_mapping: 0:0 1:1
net.inet.rss.enabled: 0
net.inet.rss.debug: 0
net.inet.rss.basecpu: 0
net.inet.rss.buckets: 2
net.inet.rss.maxcpus: 64
net.inet.rss.ncpus: 2
net.inet.rss.maxbits: 7
net.inet.rss.mask: 1
net.inet.rss.bits: 1
net.inet.rss.hashalgo: 2


I notice that net.isr.numthreads: 1. I expected this value to be 2, since I have net.inet.rss.bits="1" On another (quad-core) system I have bits set to 2 and numthreads is 4 as expected.

edit: I also see that net.isr.bindthreads: 0 shows up in sysctl -a even though I have net.isr.bindthreads="1" in loader.conf, and likewise maxthreads: 1 despite setting maxthreads="-1"