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

    Strange swap usage in pfsense virtualized

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 876 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.
    • M
      maba
      last edited by maba

      Hello,
      I have a problem with the use of swap in pfsense ! so i must reboot it after some time to not use swap. It's not a "memory leak" but i can't says why this happen.
      the esxi host have 8g ram , others vms have allocated aprox 1.7Gb ram , and pfsense have allocated 4.5Gb ram. It's a little over commit memory but it is working.

      Capture.JPG

      But focus on pfsense ... when vm boot it stabilise at aprox 40% usage of the 4.5gb ram , cpu usage is about let says 12% at idle ... the most demanding service is suricata who is working on two interfaces , many others services are running on the pfsense.
      There are spikes in memory usage (i think when suricata or pfblocker update rules but not sure) to aprox 60% of the 4.5Gb ram . until now all is normal ...
      Then there is a "big spike" who eat up maximum 90% of ram (not even 100%) then the swap appears :(

      it's strange pfsense use swap even if the memory is not fully used ! it triggers the usage of swap when the ram is used at 60% !

      so now i'am going to stop suricata to see if it's him who is doing this ! any tips are welcome to help me to stop this pfsense usage of swap (i can't add more ram on the host).

      thanks !

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

        What pfSense version are you running?

        There are a few known issues affecting memory usage in 23.01. You should install the System Patches package and then apply the recommended patches.

        Steve

        1 Reply Last reply Reply Quote 0
        • M
          maba
          last edited by

          pfsense and packages are up to date , the version is 2.6.0.release .
          I will check patches. thanks ;)

          1 Reply Last reply Reply Quote 0
          • M
            maba
            last edited by

            Nope, seem worse with the recommended patches , i must reboot sooner (one day :( ). I will try disabling suricata once for all to test. 4.5 Go Ram for a router seem enough for me ... is there any ways to see what is the process who trigger the use of swap ?

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by jimp

              These docs are targeted at CE 2.7.0/Plus 23.01 but much of the info also applies to older versions:

              • https://docs.netgate.com/pfsense/en/latest/hardware/memory.html
              • https://docs.netgate.com/pfsense/en/latest/hardware/tune-zfs.html

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 1
              • M
                maba
                last edited by

                Thanks ! i will try that !

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.