3 minute read.Last Modified 2022-05-10 10:09 EDT
Be careful when adding or editing the default tunables. Changing the default tunables can make the system unusable.
TrueNAS allows you to add system tunables from the web interface. You can manually define tunables, or TrueNAS can run an autotuning script to attempt to optimize the system. Tunables are used to manage TrueNAS sysctls, loaders, and rc.conf options.
- loader specifies parameters to pass to the kernel or load additional modules at boot time.
- rc.conf enables system services and daemons and only takes effect after a reboot.
- sysctl configures kernel parameters while the system is running and generally takes effect immediately.
Adding a sysctl, loader, or
rc.confoption is an advanced feature. A sysctl immediately affects the kernel running the TrueNAS system, and a loader can adversely affect the TrueNAS boot process. Do not create a tunable on a production system before testing the ramifications of that change.
To configure a tunable, go to System > Tunables and click ADD.
Select the Type of tunable to add or modify. Enter the name of the loader, sysctl, or rc.conf variable to configure.
If you wish to create the system tunable but not immediately enable it, unset the Enabled checkbox. Configured tunables remain in effect until deleted or Enabled is unset.
We recommend restarting the system after making sysctl changes. Some sysctls only take effect at system startup, and restarting the system guarantees that the setting values correspond with what the running system uses.
TrueNAS provides an autotune script that optimizes the system depending on the installed hardware.
For example, if a pool exists on a system with limited RAM, the autotune script automatically adjusts some ZFS sysctl values to minimize memory starvation issues. Autotuning can introduce system performance issues. You must only use it as a temporary measure until you address the underlying hardware issue. Autotune always slows a RAM-starved system as it caps the ARC.
We do not recommend TrueNAS Enterprise customers use the autotuning script, as it can override any specific tunings made by iXsystems Support.
Enabling autotune runs the autotuner script at boot. To run the script immediately, reboot the system.
Any tuned settings appear in System > Tunables.
Deleting tunables created by the autotune only affects the current session. Autotune-set tunables regenerate every time the system boots. You cannot manually tune any setting the autotuner controlls.
To permanently change a value set by autotune, change the description of the tunable. For example, changing the description to “manual override” prevents autotune from reverting the tunable back to the autotune default value.