[lug] 'Cache' under linux

Peter Hutnick peter-lists at hutnick.com
Wed Mar 12 12:05:10 MST 2003


Eric Peers said:
> 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).
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug

This is a Good Thing.  The theory is that using memory doesn't cost
anything, so use it all to speed up disk access.

If you start more processes you will notice that the cache shrinks to
almost nothing before it starts paging to swap.  Swap usage will
eventually go up as really stale process data gets paged out so that the
system can remain snappy.

-Peter






More information about the LUG mailing list