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

Re: memory not pro-actively marked free?



On Thursday November 20 at 04:25pm
Dan Jacobson <jidanni@jidanni.org> wrote:

> Instead of doing shutdown, I did init 1, doing away with X windows,
> etc.  and in maintenance mode, I did top(1).  However it reported
> total memory usage still as high as ever.  How might that be?

Linux uses excess RAM to cache information, which leads to some
confusion. For example, 'top' does report that you are using a lot of
memory

top - 15:28:03 up 6 days,  1:13,  5 users,  load average: 1.10, 1.19,
1.26 
Tasks: 104 total,   7 running,  97 sleeping,   0 stopped,   0
zombie 
Cpu(s):  20.4% user,  12.2% system,  67.4% nice,   0.0% idle
Mem:    774740k total,   767444k used,     7296k free,    35676k buffers
Swap:   489972k total,   136300k used,   353672k free,   513316k cached

So yeah, even though I have 0.75gb of RAM, I have less than 7mb free.
And I'm defiantly not using the rest of it actively. So where did it go?
Lets see what 'free' reports:

jkoenig@note:~$ free -m
             total       used       free     shared    buffers    
cached Mem:           756        753          3          0         33   
    506-/+ buffers/cache:        212        544
Swap:          478        133        345
jkoenig@note:~$ 

Sorry for the funky wrapping. Back on track: I have 753mb used, but once
you subtract buffers/cache, I'm only really using 212mb. I have 544mb in
buffers/cache. Mostly cache actually, 506mb. Only 33mb in buffers.

Only thing that concerns me is that I have 133mb in swap. I guess if
something in RAM isn't used for a while, it gets swap'd. Probably what
happens to my E backgrounds, because it takes a little while to switch
desktops if its been sitting for a while.

As a note, a lot of what I've said above is based on my own experiances
and assumptions, and cannot be relied upon as 'true' without additional
verification. That being said, believing what I've said hasn't killed me
yet.
-- 
-johann koenig
Now Playing: 
Today is Prickle-Prickle, the 37th day of The Aftermath in the YOLD 3169
My public pgp key: http://mental-graffiti.com/pgp/johannkoenig.pgp

Attachment: pgpLBgcB2pzs9.pgp
Description: PGP signature


Reply to: