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

    100% Swap

    Scheduled Pinned Locked Moved General pfSense Questions
    26 Posts 8 Posters 2.0k 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.
    • O
      OpIT GmbH
      last edited by

      there is a problem with pfblocker-ng in the actual pfsense version

      /usr/local/pkg/pfblockerng/pfblockerng.inc
      Vrom: $r = explode(')', $result, 2);
      To $r = explode(' ', $result, 2);

      Reboot pfsense

      fireodoF S 2 Replies Last reply Reply Quote 0
      • ?
        A Former User @scorpoin
        last edited by

        @scorpoin said in 100% Swap:

        I have 48gb of ram and pfblock-ng installed . Swap 100% of 4095 MiB , how to over come this issue?

        I have a small pfSense+ 22.05 and 4 GB of RAM and I
        installed squid & squidguard, clamav, snort and pfBlockerng
        and pfSense is using 34 % - 42 % of all ram. The other pfSense installation is sorted with 64 GB RAM and there
        is all like the other system installed and running but with more lists and more space for ram disk usage so it is
        using something around 52 GB - 56 GB but running
        liquid and smooth. BGB IP lists (peers), much snort rules,
        extra clamav signature DBs, many pfblockerng lists and
        huge squidguard lists so you will see it is more pointed
        to;

        • how many lists are installed
        • how many rules are in game
        • how much virus av signatures DBs are loaded
        • RAM disk is used
        • tunings or tuneables are set up

        You may be better going with another or bigger SSD/HDD/NVME/mSATA or you may set up a swap file.

        Inserting more ram or setting up less rules and/or lists may be also nice.

        1 Reply Last reply Reply Quote 0
        • fireodoF
          fireodo @OpIT GmbH
          last edited by

          @opit-gmbh said in 100% Swap:

          there is a problem with pfblocker-ng in the actual pfsense version

          The Threadstarter is running pfsense version 2.5.2 😏

          Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
          SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
          pfsense 2.8.0 CE
          Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

          1 Reply Last reply Reply Quote 0
          • O
            OpIT GmbH
            last edited by

            ahh ok :=) so there should not be the problem as i postet

            1 Reply Last reply Reply Quote 0
            • S
              scorpoin @OpIT GmbH
              last edited by

              @opit-gmbh said in 100% Swap:

              there is a problem with pfblocker-ng in the actual pfsense version

              /usr/local/pkg/pfblockerng/pfblockerng.inc
              Vrom: $r = explode(')', $result, 2);
              To $r = explode(' ', $result, 2);

              Reboot pfsense

              I would give it a try and will let you know.

              1 Reply Last reply Reply Quote 0
              • S
                scorpoin @Gertjan
                last edited by

                @gertjan
                Screenshot(10).png

                there you go.

                johnpozJ 1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @scorpoin
                  last edited by johnpoz

                  @scorpoin 47.12 F is your temp? that can't be correct either.. Can it? Why would swap be 100% when your no where close to using your ram?

                  Something for sure is out of wack.

                  How is your load at 1, but you show no cpu usage?

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    scorpoin @johnpoz
                    last edited by scorpoin

                    @johnpoz at the time I took screen shot cpu load decrease but it stays between 2 - 6% . But my concern here is to over come swap which is 100%.

                    johnpozJ 1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @scorpoin
                      last edited by

                      @scorpoin from what you posted I don't trust any of those.. I don't even have a swap file on my pfsense. I do not believe it creates one by default to be honest. Or it gives you an option during install..

                      what does swapinfo show you? What is the output of top?

                      top -o size

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

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

                        It does create a swap partition by default, nominally double the RAM size but......

                        There's no way you should ever be using the SWAP space for memory with 48GB of RAM. However the SWAP is also used for dumping crash reports. That would be a massive amount of crash data though. Have you seen any crashes?

                        Steve

                        johnpozJ 1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator @stephenw10
                          last edited by

                          @stephenw10 I doubt I would of gone with anything other than default - does ZFS not create swap, does it not show it. I see no swap with swapinfo, I see no swap in the system widget, I see no swap listed with top, etc.

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          GertjanG 1 Reply Last reply Reply Quote 0
                          • GertjanG
                            Gertjan @johnpoz
                            last edited by

                            Same thing here on a ZFS 22.05 :

                            a01b0153-8480-45b4-9ea4-ab878b059af7-image.png

                            no swap.

                            I didn't install, Netgate did that for me ;)

                            No "help me" PM's please. Use the forum, the community will thank you.
                            Edit : and where are the logs ??

                            johnpozJ 1 Reply Last reply Reply Quote 0
                            • johnpozJ
                              johnpoz LAYER 8 Global Moderator @Gertjan
                              last edited by johnpoz

                              @gertjan yeah that is what I am running 22.05 zfs.. Im going to fire up my vms and check them they are running 2.6 and 2.7

                              edit: ok that is odd, my 2.6 vm which is running zfs does show swap.. None of it being used, but it has a 2G swap.. swapinfo shows it..

                              So why does my 22.05 not have one?

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.8, 24.11

                              GertjanG 1 Reply Last reply Reply Quote 0
                              • GertjanG
                                Gertjan @johnpoz
                                last edited by Gertjan

                                @johnpoz said in 100% Swap:

                                So why does my 22.05 not have one?

                                You installed yours from scratch ?
                                Mine is a SG4100 and when I opened it, it had still Texan air in it.

                                No, wait, it was 22.02 and I upgraded straight to 22.05.

                                @johnpoz said in 100% Swap:

                                why does my 22.05 not have one?

                                Because you're not needing it ? ;)

                                No "help me" PM's please. Use the forum, the community will thank you.
                                Edit : and where are the logs ??

                                johnpozJ 1 Reply Last reply Reply Quote 0
                                • johnpozJ
                                  johnpoz LAYER 8 Global Moderator @Gertjan
                                  last edited by

                                  @gertjan said in 100% Swap:

                                  Because you're not needing it ? ;)

                                  hehehe - that is true.. But still curious, I doubt I would of clicked on no swap in setup. I don't recall if this was clean install of 22.05 or upgrade from 22.02...

                                  Not something I am worried about, just more curious is all. I don't recall ever seeing swap ever be used in pfsense, as far back as I can remember even when I do recall swap being listed on the system widget, etc..

                                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                                  If you get confused: Listen to the Music Play
                                  Please don't Chat/PM me for help, unless mod related
                                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                                  GertjanG ? 2 Replies Last reply Reply Quote 0
                                  • GertjanG
                                    Gertjan @johnpoz
                                    last edited by Gertjan

                                    @johnpoz

                                    This intrigues me :

                                    @stephenw10 said in 100% Swap:

                                    However the SWAP is also used for dumping crash reports.

                                    and this is nice to know : swap is a scratch pad for crash dumps !
                                    If the drive went bad, and the OS crashes, it will dumping the crash dump not on the head of a sick drive / root partition.

                                    Not that I can not recall that the pfSense OS ( FreeBSD) crashed on me ...
                                    I do see a lot of PHP errors, nearly daily these days.

                                    No "help me" PM's please. Use the forum, the community will thank you.
                                    Edit : and where are the logs ??

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

                                      Possibly because it's running from eMMC? The installer chooses different defaults depending on what it's installing to, the size of the install target.
                                      Everything I've checked here has swap expect where I disabled it. Or on ARM devices where the image is written out directly.

                                      Yes, not being able to retain crash dumps is a serious consideration when disabling SWAP:
                                      https://docs.netgate.com/pfsense/en/latest/development/panic-information.html#install-without-swap-space

                                      Steve

                                      GertjanG 1 Reply Last reply Reply Quote 0
                                      • ?
                                        A Former User @johnpoz
                                        last edited by

                                        @johnpoz said in 100% Swap:

                                        as far back as I can remember even when I do recall swap being listed on the system widget, etc..

                                        22.05 Swap.jpg

                                        This is right but also if you need really much ram, it is not fully filled automatically.

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          scorpoin
                                          last edited by scorpoin

                                          swapinfo
                                          Device 1K-blocks Used Avail Capacity
                                          /dev/label/swap0 4194300 4194120 180 100%

                                          top-info.png

                                          Well it does create swap on installation it does not ask me how much space do you need during pfsense installtion.

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            scorpoin
                                            last edited by

                                            well I did swapoff -a and then swapon -a

                                            Swap become 0 :) .

                                            Hope this will help some one else as well.

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