Kernel Parameters on Tunables not working.

Started by rafaelbs, October 24, 2025, 05:38:26 AM

Previous topic - Next topic
Hi,

I have been trying to do change a few parameters to improve performance (https://docs.opnsense.org/troubleshooting/performance.html).

After adding the following tunables like:
net.isr.bindthreads = 1
net.isr.maxthreads = -1
net.inet.rss.enabled = 1

and reboot, nothing happens. When searching with sysctl -a, for example, still net.inet.rss.enabled shows 0.

There are not any other equals parameters conflicting. I already tried to change the loader.conf.local, which also did not work.

Any ideas about what am I doing wrong?

Thanks a lot.

How did you set the tuneables? Did you add them under "System: Settings: Tunables"?

Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Yes. I did under System: Settings: Tunables, but nothing happens.

We are running last version, completely updated.

I already tried with /boot/loader.conf.local and did not work.

That is virtually impossible. Did you apply the settings after creating the variables?

BTW: You should not edit configuration files by hand, as they will be overwritten by the OpnSense config. IDK if /boot/loader.conf.local is being honored. There is a folder /boot/loader.conf.d where files can be put.

That you can check: When you apply the tuneables settings, they should turn up in /boot/loader.conf ("fgrep net.isr.bindthreads /boot/loader.conf").
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

There's one isr setting that I believe really enables the rest, see attached image too.

net.isr.dispatch: deferred
Custom: ASRock 970 Extreme3 R2.0 / AMD FX-8320E / 32 GB DDR3 1866 / X520 & I350 / 500GB SATA

Quote from: jonny5 on October 24, 2025, 11:02:00 PMThere's one isr setting that I believe really enables the rest, see attached image too.

net.isr.dispatch: deferred

Interesting. I'd figure "net.inet.rss.enabled" would be the... enabler. I have "direct" (the default), and actual dispatch is mostly "hybrid":

root@fw:/home/user # sysctl net.isr
net.isr.numthreads: 16
net.isr.maxprot: 16
net.isr.defaultqlimit: 256
net.isr.maxqlimit: 10240
net.isr.bindthreads: 1
net.isr.maxthreads: 16
net.isr.dispatch: direct
root@fw:/home/user # sysctl net.inet | grep rss
net.inet.rss.bucket_mapping: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
net.inet.rss.enabled: 1
net.inet.rss.debug: 0
net.inet.rss.basecpu: 0
net.inet.rss.buckets: 8
net.inet.rss.maxcpus: 64
net.inet.rss.ncpus: 16
net.inet.rss.maxbits: 7
net.inet.rss.mask: 7
net.inet.rss.bits: 3
net.inet.rss.hashalgo: 2
root@fw:/home/user # netstat -Q
Configuration:
Setting                        Current        Limit
Thread count                        16          16
Default queue limit                256        10240
Dispatch policy                direct          n/a
Threads bound to CPUs          enabled          n/a

Protocols:
Name  Proto QLimit Policy Dispatch Flags
ip        1  1024    cpu  hybrid  C--
igmp      2    256 source  default  ---
rtsock    3    256 source  default  ---
arp        4    256 source  default  ---
ether      5    256    cpu  direct  C--
ip6        6  1024    cpu  hybrid  C--
ip_direct    9    256    cpu  hybrid  C--
ip6_direct    10    256    cpu  hybrid  C--
[...]

I believe the dispatch takes a bit of time to settle, but it's been a while since I set it up.