Re: free command what does buffers/cache mean ?
- From: John-Paul Stewart <jpstewart@xxxxxxxxxxxxxxxx>
- Date: Tue, 30 Jan 2007 10:59:29 -0500
asdf wrote:
The output of free gives some info on buffers and cache in the Real Memory line... what are these and how do they differ from real memory ?
IIRC, buffers are used by the kernel to buffer disk I/O, and the page cache contains recently used (but currently unused) memory pages in case they're needed again.
Both buffers and cache can be very quickly freed if needed by an application.
Basically I'm writing a script that tells when a machine has less than 1 gig of swap + ram + buffers left.. and sends an email to the sys admins.
You always want to use the second line of output from 'free', the line that starts with "-/+ buffers/cache". There's no sense in counting the buffers as used since they are available to applications. That's the line that tells you how much you really have used, how much you really have free.
The kernel will always try to use all available RAM by increasing buffers and cache until there's no more RAM. (You paid for the RAM, the kernel might as well use it for something!)
.
- References:
- free command what does buffers/cache mean ?
- From: asdf
- free command what does buffers/cache mean ?
- Prev by Date: Re: A file that can be seen... but doesn't exist!
- Next by Date: Re: create directories based on directory contents
- Previous by thread: free command what does buffers/cache mean ?
- Next by thread: Whats a good way to write GUI apps
- Index(es):
Relevant Pages
|