Tunables

Started by MagikMark, November 02, 2023, 06:05:43 AM

Previous topic - Next topic
Hi!

I'm new to opnsense.  I was making entries in the tunables section.  After reboot I noticed that the very same entries were also made in Loader.conf.  Isn't this redundant?  Can I  make the entries in Loader.Local.conf instead?

If you make the entries in loader.conf only they will be lost after a reboot. The entire text file configuration of OPNsense is generated from what you enter in the UI. Only UI or API settings are persistent.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

It's only redundant for the ones being redundant ;) It's not that easy to follow all changes and not all tunables (loader environment variables) are even known to sysctl and sometimes between FreeBSD releases that also changes.

Of course you can also manually operate /boot/loader.conf.local


Cheers,
Franco

Quote from: franco on November 02, 2023, 07:32:42 AM
Of course you can also manually operate /boot/loader.conf.local
While technically correct - I would never argue with @franco ;) - please don't do that. If you do, anyway, these settings will not be part of a configuration backup. So don't come back complaining, later.

Like with TrueNAS everything that can be configured in the UI or API should be configured in the UI or API.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hehehe, I never said it was a good idea :)


Cheers,
Franco

Thanks guys.  I just moved from the otherside.  Trying to learn things

Don't worry. Questions are good. Some things changed over the years for different reasons.


Cheers,
Franco

Hey Franco,

Can you refer me to a site with lisings of all tunables that are still valid for OPNsense.  Not so sure if what I'm putting are still working

Thanks

Documentation that applies to OPNsense:

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

Getting a list of all tunables in FreeBSD:
sysctl -a

HTH,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Thanks Patrick.

Does it mean if the entry is not found on that list, it has been deprecated

If an entry does not exist in the list generated directly on the command line - yes, that means this particular entry does not exist anymore.

The documented list specifically for OPNsense is of course by no means exhaustive but simply tries to cover the two most common areas in which one might want to set certain kernel related parameters differently from the default.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

> that means this particular entry does not exist anymore.

Unfortunately that's not true for early boot environment variables such as "hw.uart.console".

Also kernel modules not loaded will also not have their sysctls present.


Cheers,
Franco

Thank you for your thoughts guys.  Greatly appreciated