[ltp] Memory management
Rob Mayoff
linux-thinkpad@www.bm-soft.com
11 Mar 2001 12:24:32 -0600
> Linux seems to know how much memory I have. HardDrake displays
> 18776Kb/97696Kb then it shows total 97MB, Used 41MB, Free 18MB, Shared 0MB ,
> Buffers 11MB Cached 30MB.
I assume that HardDrake is basically reporting the contents of
/proc/meminfo. Here's mine:
:; cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 330096640 326254592 3842048 129638400 66629632 52764672
Swap: 131567616 12316672 119250944
MemTotal: 322360 kB
MemFree: 3752 kB
MemShared: 126600 kB
Buffers: 65068 kB
Cached: 51528 kB
SwapTotal: 128484 kB
SwapFree: 116456 kB
> What I can't understand is why it is caching 30MB. Will Linux not use
> all memory above 64 uncached?
If you are referring to the fact that some old chipsets won't use the L2
cache for RAM above the first 64 MB: that is a property of the chipset,
and has nothing to do with Linux. Linux doesn't know what memory can be
in the L2 cache (AFAIK). It will use all the RAM it knows about, and it
doesn't distinguish memory above 64 MB from memory below 64 MB.
It's caching 30MB because that's the best use of the RAM at that moment
(according to the kernel's VM algorithms). You've actually got 41 MB
cached: 11 MB in the buffer cache and 30 MB in the page cache. I've
never been able to figure out precisely what distinguishes the two
caches.
rob
----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html