100% Swap
-
Dear Community,
I observed 100% swap on my pfsense dashboard version 2.5.2 .
I have 48gb of ram and pfblock-ng installed . Swap 100% of 4095 MiB , how to over come this issue?Regards
-
pfblock-ng installed
pfblock-ng will work fine with one (1) Giga byte of memory.
But if you select all the feeds , you'll be loading a lot of files, and some of them are very big. Download them yourself one by one to check.
Still .... really .... you have a pfSense with 48 Gb and you ran out of memory .... I'm impressed.
Can you show your :
edit : maybe you found memory issue.
Good news : the problem is solved.
Just upgrade, as 2.5.2 is old. -
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 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.
-
@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
-
ahh ok :=) so there should not be the problem as i postet
-
@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.
-
there you go.
-
@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?
-
@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%.
-
@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
-
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
-
@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.
-
Same thing here on a ZFS 22.05 :
no swap.
I didn't install, Netgate did that for me ;)
-
@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?
-
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.
why does my 22.05 not have one?
Because you're not needing it ? ;)
-
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..
-
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. -
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-spaceSteve
-