• swapon -a and swapoff -a

    General pfSense Questions
    4
    0 Votes
    4 Posts
    262 Views
    GertjanG

    Add to what is said above,
    The "swap off" will disable swap usage, see it as a flag information to the kernel.
    Not like "Windows", FreeBSD (the nix systems) use a dedicated swap partition, so you cant' see it, use it , or do something else with it.
    The "swap off" command just tells the kernel to start OOM processes as soon as there is not enough free RAM anymore, A process is elected to be 'terminated', using a selection criteria somewhat better as 'Russian roulette', but the result will be the same as nearly all processes are essential to the system : things will go downhill fast.
    On pfSense, the process with loads of RAM (the DNS cache) is often unbound, so unbound is asked to leave, leaving you without DNS (and unbound gets yelled at again ...).

    If "swap" gets used on a pfSense system, you can interpret this as a pretty solid confirmation that your system is 'to small' for the tasks you asked it to do. The solution has been identified, it's " add more RAM " .....

    "swapon -a" is actually that little extra safely net, that can do the little extra more for you when needed, and its warns you that you'll need to buy more DIMMs

  • 1 Votes
    25 Posts
    2k Views
    patient0P

    @stephenw10 I reported it as (possible) spam (category 'other) yesterday.

  • SG2100 128GB SSD and Swap

    General pfSense Questions
    28
    0 Votes
    28 Posts
    3k Views
    stephenw10S

    Not easily. Not as far as I know at least.

  • 0 Votes
    12 Posts
    5k Views
    GertjanG

    Log lines indicate the exact moment of the events :

    @leonroy said in Unbound was killed: out of swap space:

    Jan 11 13:01:33 unbound 63374 [63374:0] notice: Restart of unbound 1.12.0.

    and while it's starting - 15 seconds later :

    @leonroy said in Unbound was killed: out of swap space:

    Jan 11 13:01:48 unbound 63374 [63374:0] info: service stopped (unbound 1.12.0).

    and a small instance (< 1 second) :

    Jan 11 13:01:48 unbound 63374 [63374:0] notice: Restart of unbound 1.12.0.

    To make a long story, go to the Unbound / Resolver settings page and uncheck this :

    ffec4b58-bccf-4e36-8b6e-dc41c1cea202-image.png

    Stick a post-it on the pfSense box that says :
    "Check the resolver logs again after 48 hours and see how many stops/restarts happened the last 48 hours".
    If you find "a couple" or even less : issue solved.