Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Advanced > System Tunables vs. /boot/loader.conf.local and /boot/loader.conf

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    4 Posts 2 Posters 4.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rcfaR
      rcfa
      last edited by

      Still a BSD noob, since outside of pfSense I more or less exclusively deal with OS X, which is BSD-ish, but not in low level things.

      So the question is, what goes where?
      Advanced > System Tunables vs. /boot/loader.conf.local and /boot/loader.conf

      I noticed during getting TRIM enabled, that some things such as
      vm.kmem_size="435544320"
      were in /boot/loader.conf that I naively would have expected to be a line in the system tuneables.

      So what goes where? And does /boot/loader.conf.local take precedence over /boot/loader.conf i.e. when a value is set in this, which one wins?

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        The system tunables table in the webgui is the equivalent of the sysctl.conf file in FreeBSD. By having it in the gui changes to it get stored in the config.xml file. Anything you put in the table (or sysctl.conf) is equivalent to entering it at the command line.
        Things put in the loader.conf are fed to the kernel at a very early point in the boot. So values like the one you mentioned that need to be set before the kernel loads are put there. In pfSense loader.conf is the standard set of loader variables and they can change and be set by scripts that make up pfSense. loader.conf.local, which doesn't exist by default, is available for any custom changes. Values there will overide any in loader.conf and loader,conf.local is copied across a firmware update.

        As I understand it.  ;)

        Steve

        1 Reply Last reply Reply Quote 1
        • rcfaR
          rcfa
          last edited by

          Cool. Thanks!

          So basically, it's a matter of how early on the variable is needed in the life of the system. Makes sense. Of course, but that's a matter of BSD's design not of pfSense, it would be nice if one could discern from the name of a variable if it's needed at that early a stage in the game, and wouldn't have to "just know" or "just guess".

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Yes, it would.  ;)
            They are normally listed in the man page of whatever is generating them as either loader variables or sysctls. Many are tough to find though especially if it's something in the kernel for example.

            Steve

            1 Reply Last reply Reply Quote 0
            • DaddyGoD DaddyGo referenced this topic on
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.