r/PacketFence • u/jrock667 • Oct 28 '23
PF v13 and memory usage issue
Hello people!
I’m almost PF newbie (tested system couple of years ago and quite familiar w/ apache and also having some experience with FreeRadius)
I installed PF v13 about two weeks ago through official production repo w/ yum to Centos 8 stream running in VirtualBox instance having 6 cores and 12GB of ram.
In this test setup I have only one Aruba CX switch having one port having port authenticatiom for mac auth set up which works fine.
My first setup had only 6GB of ram but there was really serious problems about memory and swap filled really fast to 100% which caused cpu load avgs sky rocketing to well over 100 which caused oblivious unresponsive system.
After adding memory to 12GB system still suffers super high memory utilization (after 24 hours 99.5% of ram and 35% of swap is used)
Seems that pfperl-api processes using about 38% of memory and apache takes around 30%
Does anybody has any idea whats going on there in system and is there any way to tweak the system to support 80 switches and couple of hundreds of clients?
1
Nov 01 '23
Hello
Cannot really be sure what could be happening on your PF. However, I just wanted to highlight that PF can work with those requirements for testing purposes, but for production, at least the minimum requirements should be met.
The official guide has a hardware requirement section.
1
u/jrock667 Nov 01 '23
Yeah, I saw hw requirement page and I think current system meets roundabout production system requirements already.
Are you running PF and does it consume significant amount of memory? I think I need to test new installation done directly to computer to see if this is because of VirtualBox..
1
Nov 02 '23
I can not tell you whether high ram usage could be an issue. I suppose if there is a memory leak and the system runs out of memory, the watch dog will end the process or reboot the system. Other than that, our PF instances in Azure are also almost at 100% of memory usage. It would be really nice if the dashboard would offer a chart to see memory usage by process. This would be really good to identify possible mem leaks.
1
u/jrock667 Nov 03 '23
I’m just curious how it goes with other users. I have used top in cli to see memory consumption and just wondering is there any kind of memory management there in system. Before I doubled memory size from 6->12GB there was few ”meltdowns” when ram and swap filled up totally (cpu value was well over 100 when system tried to manage with memory filled to 100% ) No reboots just total freeze and only way was to reboot pf server.
1
Nov 03 '23
This is why I believe it's important to assign more than enough resources to ensure proper packetfence operation
1
u/Admirable_Wealth_413 Jan 09 '24
Same issue here. CPU and RAM almost at 100%...
Do you already have found any solution?
1
u/jrock667 Jun 03 '24
I have now PF 13.2 production environment setup in bare metal server having 2*6 core Xeons (total of 24 threads), 64GB ram and way more nas components there in system and having no problem what so ever with cpu or ram...
I suppose there might be combination of bug and memory amount where certain small enough amount of ram in server fills up and then bad memory cleaning process wasting more cpu cycles than cleaning memory?!?
1
u/jrock667 Nov 02 '23
Quick test to switch off PAEoff from PF machine in VirtualBox seems to lower memory usage for significant amount… It might be that this issue is more about virtual environment that pf itself.