[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to find out where memory leaks to



[Please don't top post!  It makes your message harder to read,
especially in long threads.]

On Wed, Oct 22, 2003 at 01:23:51PM +0200, Thomas De Groote said
> On the box I was talking about:
> tdgroote@fkserv:~$ free
>              total       used       free     shared    buffers     
> cached
> Mem:        901440     441232     460208          0      90296     
> 247512
> -/+ buffers/cache:     103424     798016
> Swap:       481928          0     481928
> tdgroote@fkserv:~$ free -m
>              total       used       free     shared    buffers     
> cached
> Mem:           880        430        449          0         88        
> 241
> -/+ buffers/cache:        101        779
> Swap:          470          0        470

Yes, so you have 779MB of RAM free here.  Not too shabby...

> on another box, same symptoms (ext2 disks, no quota) :
> thomas@vgkfgen1:~$ free
>              total       used       free     shared    buffers     
> cached
> Mem:        482548      54044     428504          0       2496      
> 36256
> -/+ buffers/cache:      15292     467256
> Swap:       497972          0     497972
> thomas@vgkfgen1:~$ free
>              total       used       free     shared    buffers     
> cached
> Mem:        482548     240648     241900          0       2676     
> 216620
> -/+ buffers/cache:      21352     461196
> Swap:       497972          0     497972


And again.  The "cached" column has increased, but the "free column" in
the "-/+ buffers/cache" has hardly changed.  You had 467256KB of free
memory to begin with, then two hours later you have  461196KB free.
That doesn't seem like a very drastic change at all.

> thomas@vgkfgen1:~$ free -m
>              total       used       free     shared    buffers     
> cached
> Mem:           471        239        231          0          2        
> 215
> -/+ buffers/cache:         20        450
> Swap:          486          0        486

This is the same as above, but the units are megabytes instead of
kilobytes.  No need t include both.  As I said in my original mail, the
kernel is using more and more memory up for disk cache as time goes on.
Because your files are cached in memory, which is about 1000 times
faster than your hard disk, everything feels quicker.  If the memory is
needed for an actual program, the kernel will clear out the disk cache
and make it available to whatever app wants it.

-- 
Rob Weir <rweir@ertius.org> | mlspam@ertius.org  |  Do I look like I want a CC?
Words of the day: Defcon warfare SRI Treasury USCOI codes keyhole Forte freedom

Attachment: signature.asc
Description: Digital signature


Reply to: