Slow incremental Memory usage



  • Hi

    I have a Alix 2-3 its been running fine and a few weeks ago I took the plunge and updated to

    2.1-RELEASE (i386)
    built on Wed Sep 11 18:16:44 EDT 2013

    I've been noticing a slow increase in memory usage over the last couple of weeks - from about 40 -50 % to about 81 % this morning ?

    Anyone have any idea what might be the cause of this and what I might do to sort it?

    I dropped into the cli and ran top - there is not much in the way of process's running

    Although I did notice an instance of tcpdump running (/usr/sbin/tcpdump -s 256 -v -S -l -n -e -ttt -i pflog0 ) is this something that is used for the gui?

    ps aux | awk '{print $2, $4, $11}' | sort -k2r | head -n 10

    Generated the following

    87220 9.3 /usr/local/bin/php
    21829 7.5 /usr/local/sbin/lighttpd
    56574 6.3 /usr/local/bin/php
    21848 5.5 /usr/local/bin/php
    22487 5.5 /usr/local/bin/php
    71213 3.2 /usr/local/sbin/dhcpd
    48058 27.5 /usr/sbin/tcpdump
    73128 2.6 /usr/local/bin/ntpd
    97218 1.3 sshd:
    66691 1.1 /usr/local/sbin/dnsmasq

    Any thoughts ides?

    TIA

    Steve



  • What packages do you have installed?



  • Its a very minimal install - no additional packages

    Running

    [2.1-RELEASE][admin@pfsense.localdomain]/root(2): pkg_info

    pkg_info: no packages installed

    Steve



  • Other than firewall rules, DHCP and DNS Forwarder, whatbuilt-in features are you using? OpenVPN? Dynamic DNS? Gateways with failover/load-balancing?
    I am interested to see how much of a base configuration this happens on, because my Alix systems seem to also "lose memory" slowly over time.



  • Other than firewall rules, DHCP and DNS Forwarder, whatbuilt-in features are you using?

    Not much! -
    1 custom nat rule
    Couple of firewall rules (2!) on top of a standard setup

    No ip sec
    No traffic Shaping

    What I'll do is have a look at it tomorrow and run the same ps aux command mentioned earlier and hopefully it will show us what is on the increase! (I have a feeling it may be PHP related )



  • Ok so again this morning I had a look at my machine and it's gone from 81 % to 84 % Memory usage

    ps aux | awk '{print $2, $4, $11}' | sort -k2r | head -n 10

    Every thing is exactly the same as yesterday with 1 exception!

    87220 9.3 /usr/local/bin/php
    21829 7.1 /usr/local/sbin/lighttpd
    56574 6.3 /usr/local/bin/php
    21848 5.5 /usr/local/bin/php
    22487 5.5 /usr/local/bin/php
    71213 3.2 /usr/local/sbin/dhcpd
    48058 28.4 /usr/sbin/tcpdump
    73128 2.6 /usr/local/bin/ntpd
    55669 1.3 sshd:  <–------------------------------------? sshd process is smaller?!
    66691 1.1 /usr/local/sbin/dnsmasq

    I'll run the script on 20 process and see if we can glean more info!

    87220 9.3 /usr/local/bin/php
    21829 7.1 /usr/local/sbin/lighttpd
    56574 6.3 /usr/local/bin/php
    21848 5.5 /usr/local/bin/php
    22487 5.5 /usr/local/bin/php
    71213 3.2 /usr/local/sbin/dhcpd
    48058 28.4 /usr/sbin/tcpdump
    73128 2.6 /usr/local/bin/ntpd
    55669 1.3 sshd:
    66691 1.1 /usr/local/sbin/dnsmasq
    15556 1.0 /usr/sbin/sshd
    8539 0.9 awk
    319 0.9 /sbin/devd
    67715 0.9 /bin/tcsh
    66295 0.6 login
    44703 0.6 /usr/sbin/syslogd
    16876 0.6 /usr/local/bin/rrdtool
    59592 0.6 /bin/sh
    8470 0.5 ps
    11878 0.5 /usr/sbin/inetd

    Might re start ssh process see if that makes a difference

    any thoughts on the above appreciated!

    Steve

    PS just re started and ssh is now taking up more mem
    This is strange!



  • It would also be useful to monitor the amount of user/kernel/free… memory splitup. If it is a memory leak in a driver or kernel module then it would not show up in a particular process.
    I thought about doing all this, then I thought FreeBSD10, 2,2 snapshots, these sort of things could be fixed by any of 1,000 fixes to FreeBSD between 8.3 and 10.0. So I was planning to grab a 2.2 snapshot (when they start building again) and try it on Alix 2D13, then monitor that for memory.



  • I'll keep monitoring this - although I've also updated recently so I still don't have enough data

    What I'm seeing is a very slow increase of Mem usage at about 1 % per day

    I'll see if I can find any other data that may point back to a mem issue

    Steve



  • OK so I up dated to 2.1.3 the most recent release and for the last 3 days my memory allocation has been sitting at 46 %
    Don't know what the dev guys did but she is looking nice and stable now!

    Thanks

    Steve


Log in to reply