Re: Memory Usage - Buffered vs. Cached


Subject: Re: Memory Usage - Buffered vs. Cached
From: Arthur Corliss (arthur@corlissfamily.org)
Date: Mon Dec 02 2002 - 11:30:53 AKST


On Mon, 2 Dec 2002, Justin Dieters wrote:

>
> Hey, perhaps someone can shed a little light on this for me. None of
> the books I have mention it, and I haven't found a clear answer
> searching through google.
>
> What is Buffered and Cached memory? And what is the difference between
> the two? And am I correct in my understanding that this memory can be
> flushed out and used my processes that need it?
>
> I have 128 MB total in my server, and right now less than 6 MB free.
> But I have about 24 MB in buffered and 60 MB in cached. Is this
> something to worry about, or am I okay on RAM as long as my Swap doesn't
> get used?

Buffers are allocated by various processes to use as input queues, etc. A
simplistic explanation of buffers is that they allow processes to temporarily
store input in memory until the process can deal with it.

Cache is typically frequently requested disk I/O. If multiple processes are
accessing the same files, much of those files will be cached to improve
performance (RAM being so much faster than hard drives).

Don't worry about the large cache figures, the kernel will automatically
decrease the cache pool to free memory for running processes as needed.
You *want* to see that cached figure as high as possible, since that typically
results in better performance.

And, yes, you're correct, as long as you're not hitting swap much, it's
nothing to worry about.

        --Arthur Corliss
          Bolverk's Lair -- http://arthur.corlissfamily.org/
          Digital Mages -- http://www.digitalmages.com/
          "Live Free or Die, the Only Way to Live" -- NH State Motto

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Mon Dec 02 2002 - 12:06:18 AKST