Re: free command what does buffers/cache mean ?



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!)
.



Relevant Pages

  • Re: speeding up my runtime on a c6713.
    ... it for cache, and possibly enabled the cache controller? ... I ran out of IRAM memory so I moved all my variables to ERAM. ... "Are you using all 256k of DSP ram, or have you reserved up to 64k of ...
    (comp.dsp)
  • Re: speed of int vs bool for large matrix
    ... >>as much data that will fit the Level 1 cache. ... I am not speaking about file I/O but RAM I/O. ... Memory access go through the bus at 300 MHZ, ...
    (comp.lang.c)
  • Re: Geriatric Pentium
    ... processor scavenging spare ram cycles to back it up to ram and restore ... Note that if it stores something the cache is of course ... as well as a memory write cycle occurring. ... Program load is close to that now. ...
    (comp.lang.java.advocacy)
  • Re: speeding up my runtime on a c6713.
    ... it for cache, and possibly enabled the cache controller? ... I ran out of IRAM memory so I moved all my variables to ERAM. ... "Are you using all 256k of DSP ram, or have you reserved up to 64k of ...
    (comp.dsp)
  • Re: Slow File Load Through ODBC Driver
    ... buffer cache from 772 Megs to 132Megs ... virtual) ram immediately to fox when fox generated a large select statement. ... XP professional (suspecting kernel memory handling) -- no effect; ...
    (microsoft.public.fox.programmer.exchange)