This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory out of control

After update 5.101 my memory usage has sky rocketed from 400MB to over 850MB!!!

I am now using swap about 40MB. This is not good. This update was supposed to improve performance on HTTP Proxy. Well it doesn't. It is slower and the memory usage is just unacceptable.

I have tried to go into processes and see what is chewing up memory and this is what I get:

root         1  0.0  0.0   448  228 ?        S    Feb02   0:04 init [3] 
root         2  0.0  0.0     0    0 ?        SW   Feb02   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SWN  Feb02   0:00 [ksoftirqd_CPU0]
root         4  0.0  0.0     0    0 ?        SW   Feb02   0:01 [kswapd]
root         5  0.0  0.0     0    0 ?        SW   Feb02   0:01 [bdflush]
root         6  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kupdated]
root         7  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kinoded]
root        17  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kjournald]
root        62  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kjournald]
root        63  0.0  0.0     0    0 ?        SW   Feb02   0:08 [kjournald]
root        64  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kjournald]
root        65  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kjournald]
root        66  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kjournald]
root        67  0.0  0.0     0    0 ?        SW   Feb02   0:00 [kjournald]
root       217  0.0  0.0  1780  884 ?        S    Feb02   0:27 /sbin/syslog-ng -f /etc/syslog-ng.conf
root     21316  0.0  0.3  5048 3288 ?        S    00:00   0:00  \_ /usr/bin/perl /usr/local/bin/sarg-logger.pl -f blocked
root     21317  0.0  0.3  5044 3288 ?        S    00:00   0:00  \_ /usr/bin/perl /usr/local/bin/sarg-logger.pl -f access
root     21318  0.0  0.3  4760 3068 ?        S    00:00   0:00  \_ /usr/bin/perl /usr/local/bin/reporter/vpn-reporter.pl
root     21319  0.0  0.5  7316 5584 ?        S    00:00   0:01  \_ /usr/bin/perl /usr/local/bin/reporter/ips-reporter.pl
root     21320  0.0  0.3  5232 3552 ?        S    00:00   0:01  \_ /usr/bin/perl /usr/local/bin/reporter/cfilter-reporter.pl
root     21321  0.0  0.3  4752 3076 ?        S    00:00   0:00  \_ /usr/bin/perl /usr/local/bin/reporter/pfilter-reporter.pl
root     21322  0.0  0.3  5236 3560 ?        S    00:00   0:00  \_ /usr/bin/perl /usr/local/bin/reporter/smtp-reporter.pl
root     21323  0.0  0.3  4920 3432 ?        S    00:00   0:00  \_ /usr/bin/perl /usr/local/bin/reporter/admin-reporter.pl
root     21324  0.0  0.7  8816 7388 ?        S    00:00   0:00  \_ /usr/bin/perl /usr/local/bin/notifier.pl
root     31476  0.0  0.0     0    0 ?        Z    06:49   0:00      \_ [license_info.pl] 
root       294  0.0  0.0     0    0 ?        SW   Feb02   0:00 [khubd]
root       308  0.0  0.0  1396  576 ?        S    Feb02   0:00 /usr/sbin/cron
root       318  0.0  0.0  4040  852 ?        S    Feb02   0:00 /usr/sbin/sshd -4 -f /etc/ssh/sshd_config
root       413  0.0  0.2  5780 2388 ?        S    Feb02   0:06 /usr/local/bin/alicd -L syslog --daemon --loglevel 2
root       418  0.3  0.8 12272 8604 ?        S    Feb02   4:02 /usr/bin/confd 127.0.0.1:16498 /etc/confd/dispatcher.xml /etc/confd/ /etc/confd/error_codes.xml
root       428  0.0  0.2  5672 2688 ?        S    Feb02   0:16 /usr/bin/dns_resolver 127.0.0.1:16498 /etc/confd/dispatcher.xml /etc/confd/ /etc/confd/error_codes.xml
root       435  0.0  0.9 14064 9788 ?        S    Feb02   0:20 /usr/bin/v4watcher 127.0.0.1:16498 /etc/confd/dispatcher.xml /etc/confd/ /etc/confd/error_codes.xml
root       472  0.0  0.2  5304 2336 ?        S    Feb02   0:01 /usr/sbin/httpd -f /etc/httpd/httpd.conf
root     19311  0.0  0.0  1236  468 ?        S    Feb02   0:00  \_ /bin/logger -t httpd -p local6.notice
wwwrun   19312  0.0  0.2  5304 2400 ?        S    Feb02   0:00  \_ /usr/sbin/fcgi- -f /etc/httpd/httpd.conf
wwwrun     410  0.4  1.6 22408 16744 ?       S    08:04   0:01  |   \_ /var/wfe/index.fpl
wwwrun   19313  0.0  0.2  5692 2888 ?        S    Feb02   0:00  \_ /usr/sbin/httpd -f /etc/httpd/httpd.conf
wwwrun     411  0.0  0.2  5704 2880 ?        S    08:04   0:00  \_ /usr/sbin/httpd -f /etc/httpd/httpd.conf
wwwrun     616  0.0  0.8 12924 8460 ?        S    08:08   0:00      \_ /var/wfe/syscall.pl
wwwrun     617  0.0  0.0  2580  744 ?        R    08:08   0:00          \_ /bin/ps auwxf
root       600  0.0  2.6 29676 27416 ?       S    Feb02   0:37 /var/mdw/mdw_daemon.pl
root       631  0.2  0.7  9568 7424 ?        S    Feb02   2:35 /usr/local/bin/selfmonng.pl
root       632  0.0  0.0  1232  448 ?        S    Feb02   0:00 /usr/local/bin/daemon-watcher selfmonng.pl /usr/local/bin/selfmonng.pl & 23
root       633  0.0  0.0  1356  544 tty1     S    Feb02   0:00 /sbin/mingetty --noclear --no-hostname tty1
root       634  0.0  0.0  1356  544 tty2     S    Feb02   0:00 /sbin/mingetty --no-hostname tty2
root       635  0.0  0.0  1356  544 tty3     S    Feb02   0:00 /sbin/mingetty --no-hostname tty3
root       636  0.0  0.0  1356  544 tty4     S    Feb02   0:00 /sbin/mingetty --no-hostname tty4
root       637  0.0  0.2  7352 2220 ?        S    Feb02   0:00 /var/aua/aua.bin /etc/wfe/conf/aua_main_config.ini
root       414  0.0  0.0     0    0 ?        Z    08:04   0:00  \_ [aua.bin] 
root       687  0.0  0.0     0    0 ?        SW   Feb02   0:00 [eth2]
root       722  0.0  0.0     0    0 ?        SW   Feb02   0:00 [eth1]
root       739  0.0  0.0     0    0 ?        SW   Feb02   0:00 [eth0]
root       832  0.0  0.2  4344 2540 ?        SN   Feb02   0:04 /usr/sbin/snmpd -c /etc/snmpd.conf -Ls daemon
root       876  0.0  0.0  1296  476 ?        S    Feb02   0:00 /usr/sbin/pptpd
chroot     924  0.0  0.1  8120 1552 ?        S    Feb02   0:00 /bin/exim -bd -q20m
chroot     948  0.0  0.8 15556 8632 ?        S    Feb02   0:04 /usr/bin/mrpopper
chroot    1588  0.0  0.8 15556 8632 ?        S    Feb02   0:01  \_ /usr/bin/mrpopper
root      1058  0.0  0.2  8244 2944 ?        S    Feb02   0:00 /usr/bin/weed 127.0.0.1:16464 /etc/weed/weed.xml
root      1059  0.0  0.2  8244 2944 ?        S    Feb02   0:00  \_ /usr/bin/weed 127.0.0.1:16464 /etc/weed/weed.xml
root      1062  0.0  0.2  8244 2944 ?        S    Feb02   0:00      \_ /usr/bin/weed 127.0.0.1:16464 /etc/weed/weed.xml
root      1069  0.0  0.0  3512  440 ?        S    Feb02   0:00 /sbin/squidf -sYD
chroot    1071  0.4  0.7 16900 8104 ?        S    Feb02   5:14  \_ (squid) -sYD
chroot    1075  0.0  0.0  1216  236 ?        S    Feb02   0:00      \_ (dummy_auth)
chroot    1076  0.0  0.0  1216  236 ?        S    Feb02   0:00      \_ (dummy_auth)
chroot    1077  0.0  0.0  1216  236 ?        S    Feb02   0:00      \_ (dummy_auth)
chroot    1078  0.0  0.0  1216  236 ?        S    Feb02   0:00      \_ (dummy_auth)
chroot    1079  0.0  0.0  1216  236 ?        S    Feb02   0:00      \_ (dummy_auth)
chroot    1080  0.0  0.0  1216  276 ?        S    Feb02   0:00      \_ (unlinkd)
root      1091  0.0  1.9 27332 20020 ?       S    Feb02   0:00 /usr/bin/perl -T -w /usr/bin/spamd -d
root      1260  0.0  2.4 33876 24560 ?       S    Feb02   0:08  \_ /usr/bin/perl -T -w /usr/bin/spamd -d
root      1261  0.0  2.3 33324 23880 ?       S    Feb02   0:07  \_ /usr/bin/perl -T -w /usr/bin/spamd -d
root      1262  0.0  2.3 33816 24376 ?       S    Feb02   0:07  \_ /usr/bin/perl -T -w /usr/bin/spamd -d
root      1263  0.0  2.2 32848 23284 ?       S    Feb02   0:06  \_ /usr/bin/perl -T -w /usr/bin/spamd -d
root      1264  0.0  2.2 31804 22388 ?       S    Feb02   0:07  \_ /usr/bin/perl -T -w /usr/bin/spamd -d
root      1116  0.0  0.0  2120  748 ?        S    Feb02   0:00 /usr/sbin/dhcpd -lf /var/state/dhcp/dhcpd.leases eth0
root      1394  0.0  0.1  3444 2028 ?        S    Feb02   0:08 /usr/sbin/named
chroot    1437  0.0  0.0  2244  512 ?        S    Feb02   0:00 /bin/sockd -D
chroot    1438  0.0  0.0  2244  496 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    1439  0.0  0.0  2364  752 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    1440  0.0  0.0  2268  532 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    1444  0.0  0.0  2268  532 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    1445  0.0  0.0  2244  364 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    1446  0.0  0.0  2260  500 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    1546  0.0  0.0  2244  280 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    8946  0.0  0.0  2244  520 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    8948  0.0  0.0  2244  524 ?        S    Feb02   0:00  \_ /bin/sockd -D
chroot    8996  0.0  0.0  2244  520 ?        S    Feb02   0:00  \_ /bin/sockd -D
root      1756  0.2  2.4 49892 25344 ?       S    Feb02   3:16 /sbin/snort_inline -D -Q -c /etc/snort/snort.conf
root      4370  0.0  0.6 41784 6108 ?        S    Feb02   0:00 /usr/bin/hyperdyper
root      4371  0.0  0.6 41784 6108 ?        S    Feb02   0:00  \_ /usr/bin/hyperdyper
root      4375  0.5  0.6 41784 6108 ?        S    Feb02   6:55      \_ /usr/bin/hyperdyper
root      4380  0.0  0.6 41784 6108 ?        S    Feb02   0:12      \_ /usr/bin/hyperdyper
root      4381  0.0  0.6 41784 6108 ?        S    Feb02   0:08      \_ /usr/bin/hyperdyper
root      4382  0.0  0.6 41784 6108 ?        S    Feb02   0:17      \_ /usr/bin/hyperdyper
root      4383  0.0  0.6 41784 6108 ?        S    Feb02   0:21      \_ /usr/bin/hyperdyper
root      4388  0.0  0.6 41784 6108 ?        S    Feb02   0:20      \_ /usr/bin/hyperdyper
root      4389  0.0  0.6 41784 6108 ?        S    Feb02   0:21      \_ /usr/bin/hyperdyper
root      4390  0.0  0.6 41784 6108 ?        S    Feb02   0:22      \_ /usr/bin/hyperdyper
root      4391  0.0  0.6 41784 6108 ?        S    Feb02   0:16      \_ /usr/bin/hyperdyper
root      4396  0.0  0.6 41784 6108 ?        S    Feb02   0:06      \_ /usr/bin/hyperdyper
root      4397  0.0  0.6 41784 6108 ?        S    Feb02   0:20      \_ /usr/bin/hyperdyper
root      4398  0.0  0.6 41784 6108 ?        S    Feb02   0:11      \_ /usr/bin/hyperdyper
root      4399  0.0  0.6 41784 6108 ?        S    Feb02   0:14      \_ /usr/bin/hyperdyper
root      4407  0.0  0.6 41784 6108 ?        S    Feb02   0:13      \_ /usr/bin/hyperdyper
root      4408  0.0  0.6 41784 6108 ?        S    Feb02   0:19      \_ /usr/bin/hyperdyper
root      4409  0.0  0.6 41784 6108 ?        S    Feb02   0:14      \_ /usr/bin/hyperdyper
root      4413  0.0  0.0  5184  240 ?        S    Feb02   0:00 /usr/sbin/localhttpd -f /etc/httpd/httpd-loopback.conf
wwwrun    4417  0.0  0.1  5232 1052 ?        S    Feb02   0:00  \_ /usr/sbin/localhttpd -f /etc/httpd/httpd-loopback.conf
wwwrun    4857  0.0  0.1  5232 1048 ?        S    Feb02   0:00  \_ /usr/sbin/localhttpd -f /etc/httpd/httpd-loopback.conf
wwwrun   11410  0.0  0.1  5232 1392 ?        S    Feb02   0:00  \_ /usr/sbin/localhttpd -f /etc/httpd/httpd-loopback.conf
root     31474  0.0  1.0 11492 10300 ?       S    06:49   0:01 /opt/kav/bin/aveserver -c /etc/kav/5.0/kav4mailservers.conf
root     31480  0.0  1.0 11540 10444 ?       S    06:49   0:02  \_ /opt/kav/bin/aveserver -c /etc/kav/5.0/kav4mailservers.conf
root     31481  0.0  1.0 11604 10512 ?       S    06:49   0:04  \_ /opt/kav/bin/aveserver -c /etc/kav/5.0/kav4mailservers.conf
root     31482  0.0  1.0 11548 10456 ?       S    06:49   0:04  \_ /opt/kav/bin/aveserver -c /etc/kav/5.0/kav4mailservers.conf
root     31483  0.0  1.0 11564 10472 ?       S    06:49   0:03  \_ /opt/kav/bin/aveserver -c /etc/kav/5.0/kav4mailservers.conf
root     31486  0.0  1.0 11564 10468 ?       S    06:49   0:03  \_ /opt/kav/bin/aveserver -c /etc/kav/5.0/kav4mailservers.conf

It seems that both snort and my aveserver are taking between 1 and 4% of my memory.

I only have 20 packet filters. And like I said this all started after update 5.101. I have tried reboots and shutdowns and it still goes right back up.

Can anybody help me?


This thread was automatically locked due to age.
Parents
  • If you are only using 40 megs of swap you are fine.  The system will use most of available memory for file caching if a process is not actively using it.  This is normal linux behavior.  What features of ASL do you have turned on?

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • My hardware is listed below. I use HTTP Proxy standard mode with virus and content scanning. Pop3 proxy with spam and virus scanning. SOCKS Proxy, and DNS Proxy. IDS/IPS is also used. I have one PPTP Vpn but only used when I need to remote access my home from work. Like I said before it only started happening when I updated to 5.101. Before that I wasn't using any swap and my memory usage was a steady 400MB, but now it fluctuates from 755 - 850MB.
Reply
  • My hardware is listed below. I use HTTP Proxy standard mode with virus and content scanning. Pop3 proxy with spam and virus scanning. SOCKS Proxy, and DNS Proxy. IDS/IPS is also used. I have one PPTP Vpn but only used when I need to remote access my home from work. Like I said before it only started happening when I updated to 5.101. Before that I wasn't using any swap and my memory usage was a steady 400MB, but now it fluctuates from 755 - 850MB.
Children
  • Again i would not be concerned.  Since you have a gig of ram and only swapping 40 megs..this is not a problem.  With the latest kernel update i have left the swapfile on in my box now as well.  If you start getting 20% of your ram or more in swap then you ahve an issue.

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Ok then why is there such a performance degregration to http performance?

    Before 5.101 web pages took half the time to load compared to now. I have not changed any config settings so the only attributation to this performance hit has to be the update, right?
  • [ QUOTE ]
    My hardware is listed below. I use HTTP Proxy standard mode with virus and content scanning. Pop3 proxy with spam and virus scanning. SOCKS Proxy, and DNS Proxy. IDS/IPS is also used. I have one PPTP Vpn but only used when I need to remote access my home from work. Like I said before it only started happening when I updated to 5.101. Before that I wasn't using any swap and my memory usage was a steady 400MB, but now it fluctuates from 755 - 850MB. 

    Ok then why is there such a performance degregration to http performance?

    Before 5.101 web pages took half the time to load compared to now. I have not changed any config settings so the only attributation to this performance hit has to be the update, right? 

    [/ QUOTE ]

     You are using the most cpu intensive setup i have seen on such a low powered machine.  The biggest stumbling point of the k6 series was their math co processors.  Using the a/v and ips and spam filters are very math co intensive and i think your k6-2 is simply falling down.  I could turn on a/v and anti-spam on my machine in the same configuration as you have(it performs about the same as your k6-2 500 in math calculations) and i would see the same slow performance.  I would say you got lucky with running everything you are running before 5.101.  Fire up ssh and use loginuser.  Then type top.  Set it to 1 second updates and look at your loads.  I bet they average well above 1 unless all you have is just one computer that is rarely used.  I would turn off the anti-spam..and http a/v or get a faster cpu.  I run the following:

    http proxy in transparent mode with content filtering, dns proxy, dhcp, pop3 w a-v, smtp as outgoing server with a-v using my isp smtp as smarthost, IPS, 8 NAT rules and 12 packet filter rules.  My loads average .71 with the occsional spike up to 2 during intensive logging runs.  I have 4 machine behind the server two of them servers.  One of the servers is a counter-strike and teamspeak server.

    That being said the  usage of memory is right inline with established linux norms.  Your cpu is simply falling over under the weight it is having to handle.  Heck I am lucky 5.1 is even allowed to install on this machine rofl.

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • To get a more detailed list of used memory:
    Login to console. Type in:
    cat /proc/meminfo
    There you can see the amount of data in the cache and buffer. These memory is freed as soon as a process needs more memory. So you have to subtract the cache and buffers from the global value to get the real used memory. The memory graph in the webadmin -> reporting already does that for you.

    Xeno
  • there's an even easier way:

    Login as xeno noted above..but simply type free

    It wil give you a simpler breakdown of everything.

    Owner:  Emmanuel Technology Consulting

    http://etc-md.com

    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

    PfSense w/Suricata, ntopng, 

    Other addons to follow

  • Thanks guys for all the help. I updated my firewall today to 5.102 and my memory usage went back down to normal range. My cpu levels have dropped as well, but they were never really high. I am not using any swap now. Guess I will wait and see what effect an update has before updating mine. Maybe I should do a test system.

    Anyways thanks again guys for all the help.