[lug] "Cache" under linux
Michael D. Hirsch
mhirsch at nubridges.com
Wed Mar 12 12:42:22 MST 2003
On Wednesday 12 March 2003 01:54 pm, Eric Peers wrote:
> When I run top, I notice that I have very little free
> memory in my system, and yet the process memory usage
> count does not reflect this used memory.
>
> So I found a command called free:
> crampon> free
> total used free shared
> buffers cached
> Mem: 998748 899816 98932 0
> 134052 558556
>
>
> what is this "cached" memory usage? Is it for virtual
> memory? is there a way to control the amount of it
> which is used for paging? Should I even worry about
> it? (because it seems to grow in size the longer I use
> my system).
Don't worry--this is normal. If you aren't actively using some memory
Linux will use if for the disk cache. If a process needs it it will get
freed up instantly.
Of more interest is the second line from free that you didn't print.
Here's mine:
1012] 3rdParty>free
total used free shared buffers cached
Mem: 998692 978660 20032 0 36420 207428
-/+ buffers/cache: 734812 263880
Swap: 2040244 777068 1263176
The first line shows only 20M free, but the seconf line points out that
there is really 263M free. Note that this is free+buffers+cached from the
first line.
Michael
More information about the LUG
mailing list