LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-05-2005, 01:16 PM   #1
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Rep: Reputation: 30
Memory Leak?!


As you can see hear http://www.linuxquestions.org/questi...hreadid=319515 I was having a problem with my memory.

Well, there I just thought that I needed a memory upgrade...now I'm not sure.

I have 256 MB of RAM..and I've never had a problem on any distro - memory-wise...untill now...and it seems to be progressing worse all the time. At that time..my swap was being used on average 15%. Now it's 35%...and my computer is getting slower and slower.

Is there any way to figure this out?

..I've started gnome by itself; nothing else open...but still..my swap was being used. Same on KDE.

As I've said...I've never had this problem before...ever.

Any ideas?

-RoaCh
 
Old 05-05-2005, 01:52 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Ideally, your memory usage should approach a balance near 100% physical RAM and 0% swap usage. Of course, nothing is ideal.

The command 'ps avx' Should provide you with a wealth of information on how each process is using memory.
 
Old 05-05-2005, 02:13 PM   #3
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Code:
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
    1 ?        S      0:01     14   451   228    68  0.0 init [5]
    2 ?        SN     0:00      0     0     0     0  0.0 [ksoftirqd/0]
    3 ?        S<     0:00      0     0     0     0  0.0 [events/0]
    4 ?        S<     0:00      0     0     0     0  0.0 [khelper]
    9 ?        S<     0:00      0     0     0     0  0.0 [kthread]
   19 ?        S<     0:00      0     0     0     0  0.0 [kacpid]
   88 ?        S<     0:00      0     0     0     0  0.0 [kblockd/0]
  128 ?        S      0:00      0     0     0     0  0.0 [pdflush]
  129 ?        S      0:00      0     0     0     0  0.0 [pdflush]
  131 ?        S<     0:00      0     0     0     0  0.0 [aio/0]
  130 ?        S      0:00      0     0     0     0  0.0 [kswapd0]
  724 ?        S      0:00      0     0     0     0  0.0 [kseriod]
 1089 ?        S<     0:00      0     0     0     0  0.0 [reiserfs/0]
 2204 ?        S<s    0:00     14     8  1463   392  0.1 /sbin/udevd -d
 2224 ?        S      0:00      0     0     0     0  0.0 [khpsbpkt]
 2772 ?        S      0:00      0     0     0     0  0.0 [khubd]
 3056 ?        S      0:00      0     0     0     0  0.0 [kgameportd]
 3390 ?        Ss     0:00      0   246  3001   564  0.2 /usr/bin/dbus-daemon-1
 3459 ?        Ss     0:00     13    92  1759   448  0.1 /sbin/syslog-ng
 3465 ?        Ss     0:00      7    19  1584   384  0.1 /sbin/klogd -c 1 -x -x
 3847 ?        S<     0:00      0     5  1454   296  0.1 [hwscand]
 5929 ?        S      0:00      0     0     0     0  0.0 [scsi_eh_0]
 5937 ?        S      0:00      0     0     0     0  0.0 [usb-storage]
 6141 ?        Ss     0:00      5    20  2127   528  0.2 /opt/gnome/bin/netdaemo
 6170 ?        Ss     0:00     10    28  2087   496  0.1 /sbin/resmgrd
 6196 ?        Ss     0:00      0     9  1498   328  0.1 /sbin/portmap
 6408 ?        Ss     0:00     46   248  6223   992  0.3 /usr/sbin/cupsd
 6412 ?        Ss     0:04     54   130  3353  1700  0.6 /usr/sbin/fam -t 4 -T 0
 6501 ?        Ssl    0:00     53    69  8662   924  0.3 /usr/sbin/nscd
 6554 ?        Ss     0:00      0    14  1457   404  0.1 /usr/sbin/acpid -c /etc
 6646 ?        S      0:00      0   172  2695   748  0.2 /usr/sbin/powersaved -d
 6762 ?        Ss     0:00      8    85  4650   736  0.2 /usr/lib/postfix/master
 6778 ?        S      0:00      3   129  4610   648  0.2 pickup -l -t fifo -u
 6779 ?        S      0:00     26   166  4609   672  0.2 qmgr -l -t fifo -u
 6785 ?        Ss     0:00      3    29  1722   540  0.2 /usr/sbin/cron
 6814 ?        Ss     0:00      1   123  2608   432  0.1 /opt/kde3/bin/kdm
 6832 ?        Ss     0:02     14   205  3650  1128  0.4 /usr/sbin/hald --daemon
 6836 ?        Ss     0:00      0   129  2374   528  0.2 /usr/sbin/xinetd
 6990 tty1     Ss+    0:00      0    14  1893   508  0.1 /sbin/mingetty --noclea
 6991 tty2     Ss+    0:00      0    14  1893   508  0.1 /sbin/mingetty tty2
 6992 tty3     Ss+    0:00      0    14  1893   508  0.1 /sbin/mingetty tty3
 6993 tty4     Ss+    0:00      0    14  1893   508  0.1 /sbin/mingetty tty4
 6994 tty5     Ss+    0:00      0    14  1893   508  0.1 /sbin/mingetty tty5
 6995 tty6     Ss+    0:00      0    14  1893   508  0.1 /sbin/mingetty tty6
 7089 ?        S      4:57   1275  1582 124501 13876  5.4 /usr/X11R6/bin/X -br -
 7090 ?        S      0:00      0   123  3688   768  0.3 -:0
 7115 ?        Ss     0:00      0   454  3381   872  0.3 /bin/sh /opt/kde3/bin/s
 7165 ?        Ss     0:00      0   246  2889   496  0.1 dbus-daemon-1 --fork --
 7166 ?        S      0:00      0    10  2689   524  0.2 /usr/bin/dbus-launch --
 7199 ?        Ss     0:00    108    38 26421  6516  2.5 kdeinit Running...
 7202 ?        S      0:00      9    38 23161  5516  2.1 dcopserver [kdeinit] dc
 7204 ?        S      0:00    122    38 25905  6628  2.5 klauncher [kdeinit] kla
 7208 ?        S      0:43    278    38 37757 11188  4.3 kded [kdeinit] kded
 7226 ?        S      0:04    249   154 46001 14612  5.7 /opt/kde3/bin/artsd -F
 7228 ?        S      0:00     21    38 26789  6704  2.6 kaccess [kdeinit] kacce
 7229 ?        S      0:00      0     8  1451   272  0.1 kwrapper ksmserver
 7231 ?        S      0:00     65    38 26885  6808  2.6 ksmserver [kdeinit] ksm
 7238 ?        S      0:16    566    38 32985 12300  4.8 kwin [kdeinit] kwin -se
 7252 ?        S      0:11    762    38 34185 10960  4.2 kdesktop [kdeinit] kdes
 7266 ?        S      0:01    102    38 36005  8008  3.1 knotify [kdeinit] knoti
 7287 ?        S      0:26    607    38 36933 12664  4.9 kicker [kdeinit] kicker
 7293 ?        S      0:07     65    38 27921  7620  2.9 klipper [kdeinit] klipp
 7299 ?        S      0:07     49    38 31621  7788  3.0 susewatcher [kdeinit] s
 7305 ?        S      0:06     80    38 33817  7720  3.0 suseplugger [kdeinit] s
 7311 ?        S      0:04    251    38 32929  8844  3.4 kmix [kdeinit] kmix -se
 7316 ?        S      0:06    251   312 30143  9252  3.6 kget -session 10c4696e7
 7320 ?        S      0:17   1483    38 55317 23952  9.3 konqueror [kdeinit] kon
 7559 ?        S      0:00      0   454  3117   868  0.3 /bin/sh /home/ravencrow
 7570 ?        S      0:00      0   454  3377   864  0.3 /bin/sh /home/ravencrow
 7575 ?        Sl     3:14   4057  9175 87212 40056 15.6 /home/ravencrow/Program
 7592 ?        S      0:00     23    48  4655  1004  0.3 /opt/gnome/lib/GConf/2/
 7944 ?        S      0:00     57    38 28981  6484  2.5 kio_file [kdeinit] kio_
26236 ?        S      0:00      2    38 26913  8636  3.3 kio_file [kdeinit] kio_
26247 ?        S      0:00      1    38 28557  7760  3.0 kio_file [kdeinit] kio_
26337 ?        S      0:00     17   454  3377  1016  0.3 /bin/sh /usr/lib/ooo-2.
26356 ?        Sl     0:16   1162   494 163837 33824 13.2 /usr/lib/ooo-2.0/progr
29444 ?        S      0:02     80    38 35257 18608  7.2 konsole [kdeinit] konso
29460 pts/1    Ss     0:00     12   454  3857  1848  0.7 /bin/bash
29481 pts/1    R+     0:00      1    93  2386   752  0.2 ps avx
Not much is being used..which leads to believe there is a memory leak. I close programs..yet my physical memory is being eaten up and the swap is still being used.

I just checked the KDE memory monitor...and 16 % of my swap is being used..and all I have open right now is firefox..and of course some background programs..but that should not be enough to use swap...from what I see =\
 
Old 05-05-2005, 02:45 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Swap will go up as your computer is used, once something is swapped out, it doesn't come back into memory without being used.

/home/ravencrow/Program seems to be eating a LOT of memory. I'm not sure what it is, you need to extend your display fully.
 
Old 05-05-2005, 02:58 PM   #5
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
That would be firefox.. =\
 
Old 05-05-2005, 03:30 PM   #6
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Ah, yes, firefox does eat memory somewhat. But that's to be expected. Try, from time to time, to run that same command and see if the memory usage of something continues to go up and up.
 
Old 05-05-2005, 03:54 PM   #7
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Ok thanks .
 
Old 05-05-2005, 11:45 PM   #8
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
Quote:
Originally posted by RoaCh Of DisCor
That would be firefox.. =\
yea if that's firefox then your build of firefox has big problems

here i'll open and load 3 more pages with firefox so 4 including this one then

Code:
 (11:42pm:05/05/05)
(gary) ~  $ ps vp  1149   
  PID TTY      STAT   TIME  MAJFL   TRS   DRS  RSS %MEM COMMAND
 1149 ?        S      0:00      0   473  4218 1360  0.1 /bin/sh /opt/firefox/bin/firefox
unless i'm missing something that's like 20 times less than yours is using ????

Last edited by foo_bar_foo; 05-05-2005 at 11:46 PM.
 
Old 05-06-2005, 08:50 PM   #9
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
That's what I don't understand..I've used suse rpm's...and also downloaded the tar.gz from the mozilla site..and used that. No matter what...the mem usage is ridiculously high! This happens on other programs too..and it shouldn't. It seems many programs are hogging tons of memory...when it shouldn't happen (and doesn't on other distros)...which I was thinking, maybe there's a problem with the kernel? Maybe I should recompile it?

Last edited by RoaCh Of DisCor; 05-06-2005 at 08:51 PM.
 
Old 05-07-2005, 01:26 AM   #10
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
yea i have never seen that so don't have a clue but it is ultimately the kernel doing it and glibc
or more importantly glibc running the kernel at least apps using glibc malloc() and free() or the dynamic memory allocation routines in libc++ (which is the tail and which is the dog ?) then the kernel takes over and manages it.

i can't even think of a guess but a misconfigured kernel is a good assumption to start with
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak?! nyk Programming 10 01-24-2005 08:08 PM
what is memory leak blackzone Programming 6 11-05-2004 11:32 AM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 10:39 AM
Memory Leak? eLinux Linux - General 2 09-20-2003 10:21 PM
Memory Leak FredrikN Linux - General 4 09-17-2002 04:16 PM


All times are GMT -5. The time now is 01:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration