LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   possible memory leak?? (https://www.linuxquestions.org/questions/linux-general-1/possible-memory-leak-193953/)

matt80 06-15-2004 07:27 PM

possible memory leak??
 
Can any guru's help me out here?? I think i might have a major memory leak.. My system boots up and only uses around 80MB of actual Memory during the bootup.. within 24 hours, I have nothing but 8 MB left a lot of times, and sometimes it hard locks my machine after it runs out of virtual mem as well.. Currently, I am running httpd, mysql, and sendmail (only one web site on this server) which uses vBulletin PHP scripts. I am running Apache 2.0.40 and 2.4.20-28.8smp #1 SMP Thu Dec 18 12:25:21 EST 2003 i686 i686 i386 GNU/Linux, and MySQL 3.23.58 My machine previously had no problems and ran months and months without using even half the amount of memory. but right now im having to reboot it once every other day to free up the mem and keep it form hard locking on me.. Anyone with any suggestions is greatly appreciated!

I've listed TOP information if it will help?
Code:

50 processes: 49 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
CPU1 states:  0.0% user,  0.1% system,  0.0% nice, 99.0% idle
Mem:  513468K av,  505840K used,    7628K free,      0K shrd,  184884K buff
Swap: 1044216K av,    4996K used, 1039220K free                  219220K cached

  PID USER    PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM  TIME COMMAND
 8808 root      12  0  1032 1032  848 R    0.9  0.2  0:00 top
    1 root      8  0  104  84    52 S    0.0  0.0  0:06 init
    2 root      9  0    0    0    0 SW    0.0  0.0  0:00 keventd
    3 root      19  19    0    0    0 SWN  0.0  0.0  0:01 ksoftirqd_CPU0
    4 root      18  19    0    0    0 SWN  0.0  0.0  0:00 ksoftirqd_CPU1
    5 root      9  0    0    0    0 SW    0.0  0.0  0:06 kswapd
    6 root      9  0    0    0    0 SW    0.0  0.0  0:02 kscand/DMA
    7 root      9  0    0    0    0 SW    0.0  0.0  5:11 kscand/Normal
    8 root      9  0    0    0    0 SW    0.0  0.0  0:00 kscand/HighMem
    9 root      9  0    0    0    0 SW    0.0  0.0  0:00 bdflush
  10 root      9  0    0    0    0 SW    0.0  0.0  0:01 kupdated
  11 root      -1 -20    0    0    0 SW<  0.0  0.0  0:00 mdrecoveryd
  17 root      9  0    0    0    0 SW    0.0  0.0  0:00 scsi_eh_0
  18 root      9  0    0    0    0 SW    0.0  0.0  0:00 scsi_eh_1
  21 root      9  0    0    0    0 SW    0.0  0.0  0:07 kjournald
  77 root      9  0    0    0    0 SW    0.0  0.0  0:00 khubd
  147 root      9  0    0    0    0 SW    0.0  0.0  0:00 kjournald
  452 root      9  0  368  356  288 S    0.0  0.0  0:00 syslogd
  456 root      9  0    56    4    0 S    0.0  0.0  0:00 klogd
  508 root      9  0  468  336  224 S    0.0  0.0  0:01 sshd
  521 root      8  0  536  484  396 S    0.0  0.0  0:00 xinetd
  533 root      9  0  152    4    0 S    0.0  0.0  0:00 safe_mysqld
  565 mysql      9  0 12156 9804  2332 S    0.0  1.9  0:25 mysqld
  582 root      9  0  992  512  368 S    0.0  0.0  0:07 sendmail
  591 smmsp      9  0  720  312  228 S    0.0  0.0  0:00 sendmail
  603 root      8  0  6644 5928  4112 S    0.0  1.1  0:58 httpd
  612 root      9  0  216  216  144 S    0.0  0.0  0:00 crond
  621 daemon    9  0  188  188  128 S    0.0  0.0  0:00 atd
  628 root      9  0    48  48    0 S    0.0  0.0  0:00 mingetty
  629 root      9  0    44  44    0 S    0.0  0.0  0:00 mingetty
  630 root      9  0    40  40    0 S    0.0  0.0  0:00 mingetty
  631 root      9  0    40  40    0 S    0.0  0.0  0:00 mingetty
  632 root      9  0    40  40    0 S    0.0  0.0  0:00 mingetty
  633 root      9  0    40  40    0 S    0.0  0.0  0:00 mingetty
 8754 root      10  0  1496 1496  1140 S    0.0  0.2  0:00 bash


jim mcnamara 06-16-2004 11:45 AM

go to www.sourceforge.net and download valgrind. It reports memory leaks. You run it in the context of another process.

The other choice is to google for known memory problems with the software + version you just started running.

MBH 07-01-2004 11:07 PM

Hi!

I know this thread is OLD! but I had the same problem and I was sniffing around in LQ till I found you ^_^

Yesterday I was reading about Linux commands and stuff and came across the term "Nice", The lower the nice, the higher the priority of the process

If you're using KDE, hit ctrl+esc to view the process table, click on nice tab untill you get "MDRECOVERYD" on top, its nice=-20, so I thought, the hell with it .. and changed it to -10

* My total memory=512MB ram & 2GB swap
Before :: 12MB free ram
After :: 300MB free ram !!!!!!

Can someone tell me what's MDRECOVERYD doing "pigging" my memory ?!?!

* I just installed KDE 3.2.3 + kernel 2.4.26, this never happened before! my memory never got below 312MB

* I'm not new to LQ, I just never login ;p


All times are GMT -5. The time now is 01:49 AM.