"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) Free Memory vs. Buffers

From george_samuel on Mon, 19 Jul 1999

Dear James,

I find that the amount of memory free decreases after copying large files. --(I have a PII 300 with 128Mb ram kernel 2.2.10-ac10 ). the amount of free memory as shown by free becomes ~6Mb even after doing a sync and verifying that there are no dirty blocks.If I again do some copying - swap out happens and the amount of free memory decreases. The amount in buffer used increases.I read in kerneltraffic that memory allocated for caching filesystem metadata is not given back but is kept for future use --that happens only when I mount some filesystem and later unmount it.I am ignorant .Please elaborate on this

Thank you,

Love,
Sam

(!) Don't worry about it.
The memory that's listed as being in use by the buffer cache can be used by applications as the kernel sees fit.
Here's my current 'free' output:
             total       used       free     shared    buffers     cached
Mem:         63200      61488       1712      31712       3000      31236
-/+ buffers/cache:      27252      35948
Swap:       104416          0     104416
Here's a bit more info on my current state:
uptime:
     4:27am  up 5 days, 16:00,  9 users,  load average: 0.00, 0.00, 0.00

 uname -a:
    Linux canopus 2.2.0 #8 Fri Jan 29 19:17:29 PST 1999 i586 unknown
(The uptime is so short because I installed a new distribution on a secondary partition recently --- and I've been playing with it).
Notice that my free memory is less than 2K. That is typical. It just means that my kernel isn't using that small chunk of RAM for anything better (buffers, and caching are better uses for it).


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 44 August 1999
HTML transformation by Heather Stern of Starshine Techinical Services, http://www.starshine.org/


[ Answer Guy Index ] 1 4 7 9
11 12 14 17
18 19 20 21 24 25 26
28 29 30 31 32 33 34
35 36 37 38 39 40 41
42 43 44 45 46 47 48


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]