Fix for lowmem systems



  • This is a fork of the discussion from here: http://forum.pfsense.org/index.php/topic,66188.0.html

    Summary:
    1. we have Memory problems with our 256MB Alix board because PHP forking takes a lot of memory. When several PHP processes run at once we run out of memory and processes get killed or not started.
    2. The real reason for our problems is that we run to much services on a small system, but at the moment we have no chance to get a bigger one to Nepal.
    3. That's why we wrote a patch that delays the startup by waiting till the memory usage is stabilized. So when the PHP fork ends it works and releases the memory the startup / boot process proceeds.
    4. The patch didn't make it into the official release because it does not really fix the problem but is just a workaround.

    Whats new:
    Just in case somebody has the same problems with low memory systems, we have  published our fix here: https://github.com/International-Nepal-Fellowship/pfsense-low-mem-patch

    Read the instructions carefully before applying the patch.

    Next Steps:
    next I will try to compile ermals fix of check_reload_status and see what happens.
    If it makes a difference, and I'm quite sure it will I will write here about it.



  • Note: this patch only helps with the boot process, i.e. if you are getting "killed: out of swap space" during bootup and randomly losing critical things.

    When other real-time run-time events happen, like a WAN or OpenVPN link going down and up, then it is also possible that the system runs out of memory while check_reload_status is forking off a bunch of actions.

    You can also install the Service Watchdog package. That will help restart processes that you care about if they go missing. A side-effect of that is that Service Watchdog itself uses memory when it wakes up each minute - so if you have an unfortunate coincidence of Service Watchdog and interface down/up events it can make it harder to find a bit of free memory for those few seconds.

    If you have stable real interfaces and stable (or no) site-to-site VPN links, then you will run happily on 256MB Alix and never notice transient lack of free memory.



  • Hi,

    is possible if someone make a compile pfSense Lite version for low end box like alix. I think it very more fantastic.


  • Netgate Administrator

    pfSense was originally the 'maxi' version of m0n0wall so you could argue that that's pfSense lite. Doesn't have the flexibiloity of pfSense but has a much smaller footprint.
    http://m0n0.ch/wall/

    Steve


Log in to reply