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

    warning: increase kern.maxswzone or reduce amount of swap.

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 2 Posters 698 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.
    • JonathanLeeJ
      JonathanLee
      last edited by

      Hello fellow Netgate Community members can you please help?

      I am using an external SWAP for when ClamAV updates it is a resource hog so it comes online does swap after the update the system normalizes.

      With pfsense 24 I am now seeing this new error on os boot.

      Here is the error

      warning: increase kern.maxswzone or reduce amount of swap.
      warning: total configured swap (24421446 pages) exceeds maximum recommended amount (3382560 pages).
      

      This is my swapinfo output for non update mode

      Shell Output - swapinfo
      Device          512-blocks     Used    Avail Capacity
      /dev/da0         195371568  2695656 192675912     1%
      

      Make sure to upvote

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

        You've added 24G of SWAP?

        JonathanLeeJ 2 Replies Last reply Reply Quote 0
        • JonathanLeeJ
          JonathanLee @stephenw10
          last edited by

          @stephenw10 I actually have a 100GB drive that is fully formatted for use with swap

          Make sure to upvote

          1 Reply Last reply Reply Quote 0
          • JonathanLeeJ
            JonathanLee @stephenw10
            last edited by

            @stephenw10

            Screenshot 2024-12-16 at 17.05.34.png Screenshot 2024-12-16 at 17.05.05.png

            Make sure to upvote

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

              Hmm, generally you should use ~2x the RAM size. Anything more than that is usually not useful. How much SWAP is it actually using?

              JonathanLeeJ 1 Reply Last reply Reply Quote 0
              • JonathanLeeJ
                JonathanLee @stephenw10
                last edited by JonathanLee

                @stephenw10 only a little bit is ever used, and it’s only during updates or when snort has massive blocked ip addresses. It does also normalize after resources are freed. I wanted to originally use an SSD but the manufacture said it will fail also FreeBSD forum said to use a physical drive/flash drive that use of an SSD will cause premature drive failure. I can’t find a manufacture that has an SSD specifically for swap use. I like how it looks like I have 100gb swap, no memory overload attacks here it would go forever, I can picture someone attempting an overflow attack and just waiting and waiting

                Make sure to upvote

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

                  Hmm, well you are probably actually descreasing resources by using memory for the swap index that isn't really needed. But probably not be much I have no real idea what the numbers involved there are.

                  JonathanLeeJ 1 Reply Last reply Reply Quote 0
                  • JonathanLeeJ
                    JonathanLee @stephenw10
                    last edited by

                    @stephenw10 I might have to reformat the micro HDD it’s one big zfs parition

                    Make sure to upvote

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