Memory Buffers

jason andrade jason at
Thu Nov 7 17:42:00 CST 2002

On 7 Nov 2002, Aaron Smith wrote:

> 	Ok.  I have, what would seem to be, a fairly simple question.  When I
> cat out the contents of /proc/meminfo on my Poweredge 4400, there is a
> value for "Buffers".  What is this memory used for?  After doing some
> research, all I've found is that they are I/O Buffers set aside by the
> kernel.  My assumption, then, is that disk I/O is buffered into this
> chunk of memory before being written out to disk.  Is this correct?

One of the Red Hat guys who lurks here would be better to answer that, but
i understand that "buffers" are used by the kernel in general for various
things and "cache" is specifically disk cache only.

Possibly disk i/o is run through kernel buffers, before it hits the disk
cache, yes.

> 	The REASON for the question is that our Poweredge 4400's (running
> Redhat 7.1 and a non-rpm based 2.4.14 kernel) will suffer a massive
> spike in CPU load (25-30 is the average) whenever this buffer value
> drops to below 2Mb.  The machines have 4GB of RAM, and there is
> typically around 3GB of that set aside in the page Cache.  The Buffers
> value fluctuates up and down quite a bit, but the mean average has been
> slowly decreasing over time.  A few months ago, it would hang out around
> 100 or 80MB, It slowly started dropping until it hangs out around 30MB
> and will bottom out at less than 2MB.

it sounds like you could tune "bdflush" a bit.

> 	My understanding is that Cache and Buffers will be freed by the kernel
> when a process needs memory.  My assumption, therefore, is that the
> dropping of the buffers value means that that memory is being freed up
> for running processes.  Why would the kernel free up some of the 30MB of
> buffers rather than a portion of the 3GB of Cache?

because there's generally a lot more disk/filesystem data than other i/o
i suppose and it's tuned by default for that - the linux caching algorithm
seems quite aggressive in maximizing memory use, rather than leaving it to

> 	Is there a way to tell the kernel to always have X amount of Buffers
> available?  The biggest software of note running on these machines is
> Postgres Database software and a number of backend processes that use
> said database.

from what i can see, pretty much only in bdflush.

have a read of
which has a good article - somewhat dated now since i think it's
2.2 kernel based - on tuning for an oracle DB, which has a section
on OS buffer tuning.



More information about the Linux-PowerEdge mailing list