Welcome! Wikis are websites that everyone can build together. It's easy!

Location: Linux

Discussion: Memory usage on X64 Linux AS Release 4 update

Keyword tags: linux

Watch

Anonymous  (Get credit for your thread)


kamranirshad

kamranirshad
Memory usage on X64 Linux AS Release 4 update
Feb 5 2008, 11:07 AM EST
Hi,
Can someone please explain the concept of "cached" memory in Linux and how it is managed.
We have installed 10g Release 2 database on X64 Linux . The server has 8 GB of RAM. Using NMON, we are noticing that the "FREE Memory" keeps on reducing and "Cached Memory" keeps on increasing. Currently, the FREE memory is showing as 787MB and Cached memory is 5690 MB. When we started the server about a couple of days ago, the FREE memory was 7329MB and cached memory was 462 MB. So, within 2 days, the cached memory has increased from 462 MB to 5690 MB and the free memory has decreased from 7329MB to 787 MB.

Is this normal? Do we need to tweak some settings at Linux level / Database level to fix this?

Thanks
2  out of 4 found this valuable. Do you?    
rte19

rte19
RE: Memory usage on X64 Linux AS Release 4 update
Feb 26 2008, 9:29 AM EST
See http://kbase.redhat.com/faq/FAQ_80_705.shtm for a quick explanation. In short, what you are seeing is normal - the linux kernel uses as much RAM as possible to cache data. 0  out of 1 found this valuable. Do you?    
bhanu.prakash

bhanu.prakash
RE: Memory usage on X64 Linux AS Release 4 update
Mar 10 2008, 6:53 AM EDT
As the machine keeps running the free memory in your system goes down gradually and cache memory keeps increasing. Its because Linux uses unused free memory as cache memory to increase performance. We have some caches in the machine. some of them include page cache, buffer cache, slab cache, dentry cache, inode cache. Infact all these caches are easily reclaimable when a new process wants memory or the memory in the machine goes down rapidly. For better understanding, read "Understanding the Linux Virtual Memory Manager" by Mel Gorman. Do you find this valuable?    
kamranirshad

kamranirshad
RE: Memory usage on X64 Linux AS Release 4 update
Mar 10 2008, 9:00 AM EDT
Thank you very much
Could you kindly point me to the document link "Understanding the Linux Virtual Memory Manager"?

Thanks again
Do you find this valuable?    
bhanu.prakash

bhanu.prakash
RE: Memory usage on X64 Linux AS Release 4 update
Mar 10 2008, 9:10 AM EDT
http://www.kernel.org/doc/gorman/pdf/understand.pdf
Follow this link you can download it. You have many other sources as well. In this book you have explanation as well as code walk through, but it may not be for latest kernels.

Hope this will help you in understanding cached memory concept.
Do you find this valuable?    
kamranirshad

kamranirshad
RE: Memory usage on X64 Linux AS Release 4 update
Mar 10 2008, 11:07 AM EDT
Thanks much
One more question; in order to utilize the direct_io using init.ora filesystemio_option and setting it to "setall" on Linux, do we need to mount the jfs2 filesystem any differently or just by setting the filesystemio_option to "setall" at the database level, we would be able to leverage the direct io benefits?

Thanks
Do you find this valuable?