LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-08-2007, 11:25 PM   #1
vwaldoguy
LQ Newbie
 
Registered: May 2003
Posts: 5

Rep: Reputation: 0
Memory Leak


Have a fresh install of FC6 running on a Pentium Celeron 331 (2.6 gHz) with 512mb of memory installed. After a fresh reboot, about 372 of the 512mb are used with about 135mb free. But, the machine steadily loses memory while on. FWIW, I run a lot of process on this machine via cron, both Perl and PHP scripts, numerous times throughout the day. The processes though only last for 2 to 30 seconds, then end. Here's a top output:

Code:
top - 05:20:39 up 1 day,  2:54,  1 user,  load average: 0.65, 0.42, 0.21
Tasks: 112 total,   3 running, 108 sleeping,   0 stopped,   1 zombie
Cpu(s):  8.0%us,  2.0%sy,  0.0%ni, 89.7%id,  0.0%wa,  0.3%hi,  0.0%si,  0.0%st
Mem:    506400k total,   497620k used,     8780k free,    22528k buffers
Swap:   917496k total,      128k used,   917368k free,   247604k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
19796 gempak    15   0 82128  13m  10m S  5.3  2.8   0:27.78 gnome-system-mo    
19744 gempak    15   0 40316  12m 9200 R  2.3  2.6   0:00.94 gnome-terminal     
 2366 root      15   0  220m  18m 7352 S  1.7  3.8   0:16.53 Xorg               
19733 gempak    15   0 29640 8480 6428 S  0.3  1.7   0:01.42 gkrellm            
19791 gempak    15   0  2160 1012  788 R  0.3  0.2   0:01.09 top                
    1 root      15   0  2032  648  556 S  0.0  0.1   0:00.73 init               
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0        
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0        
    4 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0         
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 events/0           
    6 root      17  -5     0    0    0 S  0.0  0.0   0:00.00 khelper            
    7 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread            
   48 root      20  -5     0    0    0 S  0.0  0.0   0:00.01 kblockd/0          
   49 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid             
  130 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 cqueue/0           
  131 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd      
  134 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
As you can see, after about a day of uptime, I've only got 5K free memory. Any ideas what might be not allowing the memory to recycle?

Here is the free output:
Code:
             total       used       free     shared    buffers     cached
Mem:        506400     498468       7932          0      22780     246512
-/+ buffers/cache:     229176     277224
Swap:       917496        128     917368
Here is the top output after a fresh reboot:
Code:
top - 05:29:49 up 3 min,  1 user,  load average: 0.43, 0.47, 0.20
Tasks: 110 total,   3 running, 107 sleeping,   0 stopped,   0 zombie
Cpu(s):  9.6%us,  2.3%sy,  0.0%ni, 87.0%id,  0.7%wa,  0.3%hi,  0.0%si,  0.0%st
Mem:    506400k total,   372088k used,   134312k free,    13988k buffers
Swap:   917496k total,        0k used,   917496k free,   171148k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 2365 root      15   0  215m  13m 7132 R  4.7  2.8   0:04.65 Xorg               
 2592 gempak    15   0 39748  12m 9152 R  3.0  2.5   0:00.67 gnome-terminal     
 2657 gempak    15   0  170m  40m  17m S  1.3  8.1   0:09.26 firefox-bin        
 2498 gempak    15   0 16388 7680 6168 S  1.0  1.5   0:00.34 metacity           
 2553 gempak    15   0 79336  10m 8024 S  0.7  2.1   0:00.42 wnck-applet        
 2180 xfs       18   0  3964 1820  780 S  0.3  0.4   0:00.02 xfs                
 2503 gempak    15   0 80616  11m 9036 S  0.3  2.4   0:00.80 gnome-panel        
 2505 gempak    15   0  115m  15m  12m S  0.3  3.1   0:00.65 nautilus           
    1 root      15   0  2032  644  556 S  0.0  0.1   0:00.72 init               
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0        
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0        
    4 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0         
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 events/0           
    6 root      17  -5     0    0    0 S  0.0  0.0   0:00.00 khelper            
    7 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kthread            
   48 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kblockd/0          
   49 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
and here is the free output after a fresh reboot

Code:
             total       used       free     shared    buffers     cached
Mem:        506400     380916     125484          0      14640     177000
-/+ buffers/cache:     189276     317124
Swap:       917496          0     917496
Any ideas?
Van

Thanks,

Last edited by vwaldoguy; 03-08-2007 at 11:35 PM.
 
Old 03-09-2007, 12:07 AM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,694

Rep: Reputation: 45
there is no problem here. this is the normal way linux handles memory mangement.
 
Old 03-09-2007, 12:53 AM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 171Reputation: 171
If you were really short on memory your swap would be all ate up. I do not see anything unusual here either.

Lazlow
 
Old 03-09-2007, 01:01 AM   #4
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 31
Linux Memory Management
 
Old 03-09-2007, 01:54 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,269

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Mmmmm - that may be a little technical given the question.
Perhaps try this.
 
Old 03-09-2007, 09:12 PM   #6
vwaldoguy
LQ Newbie
 
Registered: May 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks everyone for the useful replies. I really appreciate it.

Van
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak??? pljvaldez Debian 2 06-01-2006 11:34 AM
Memory leak?! nyk Programming 10 01-24-2005 07:08 PM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 09:39 AM
Memory Leak? eLinux Linux - General 2 09-20-2003 09:21 PM
Memory Leak FredrikN Linux - General 4 09-17-2002 03:16 PM


All times are GMT -5. The time now is 01:15 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