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

Vm.swap_enabled sysctl

Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
5 Posts 2 Posters 2.3k 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.
  • F
    firewalluser
    last edited by Dec 22, 2014, 3:53 PM

    In this message https://forum.pfsense.org/index.php?topic=85175.msg467405#msg467405 it says there is an option in the System, Advanced, System Tunables tab, an option to switch off the swap file in version 2.1.x.

    I dont see this option in 2.2 RC, has it been removed or changed, or is there another/better way to switch off swap?

    My swap is currently sized at 16GB with 8GB of ram, and use on avg about 6% of the ram.

    Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

    Asch Conformity, mainly the blind leading the blind.

    1 Reply Last reply Reply Quote 0
    • C
      cmb
      last edited by Dec 22, 2014, 9:25 PM

      That wasn't saying it was there in the list, rather noting it can be added there. Not really any reason to disable it, unless you really want the system to crash if it'd get to a point where it needs swap. It won't touch it unless it's needed.

      So you can add it there, but you most likely don't want to.

      1 Reply Last reply Reply Quote 0
      • F
        firewalluser
        last edited by Dec 23, 2014, 6:36 AM

        I did add it after posting to see what would happen, it still shows the swap in the status page, but I also wondered whether using
        vm.swappiness=0 would be a better compromise to reduce disk writes instead, although I prefer a range of vm.swappiness=10 to vm.swappiness=40 on some Linux.

        http://en.wikipedia.org/wiki/Swappiness

        This option kern.ipc.shm_use_phys=1 will make shared memory not swap if the swap file has not been disabled, used by Postgres SQL amongst others, but apparently this will also stop shared memory regions from being included into a coredump, which might also be a feature if they get included in the system crash reports?

        Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

        Asch Conformity, mainly the blind leading the blind.

        1 Reply Last reply Reply Quote 0
        • C
          cmb
          last edited by Dec 23, 2014, 4:56 PM

          That doesn't make the swap go away, just prevents it from being used (though that might require a reboot). vm.swappiness is a Linux thing that doesn't exist on FreeBSD.

          Unless you're actually hitting swap, in which case you should have more RAM, whether or not swap is enabled has no impact on disk writes as it won't be touched.

          1 Reply Last reply Reply Quote 0
          • F
            firewalluser
            last edited by Dec 23, 2014, 8:41 PM

            It sounds like freebsd works the opposite way to the windows swap files, in that windows will use swap irrespective of ram, but with freebsd it sounds like its used only when physical ram is exceeded, and Linux does a bit of both with the swappiness option.

            Just wanted to make sure I was not inadvertently prematurely ageing my firewall.

            Thanks for the info.

            Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

            Asch Conformity, mainly the blind leading the blind.

            1 Reply Last reply Reply Quote 0
            1 out of 5
            • First post
              1/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received