Oracle Linux RAM Usage

Hi,

Is there any level i can control the amount of memory occupied by linux for cache. Seems that most of my memory gets allocated for Cache and free memory is 0. This Server runs oracle DB.

[root@ ~]# free -g
                     total       used       free     shared    buffers     cached
Mem:            45         45                  0          0             0                 42
-/+ buffers/cache:      2               43
Swap:           23          0                23
[root@ ~]#

Is there any way i can reserve memory so that it does not take it for Caching?
GulfITAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sdstuberCommented:
linux doesn't "steal" memory for the cache, it uses what's available.

Simply use more than 45g and the os will release the cache as needed.
For example, set the memory_target higher in your database instance.

If you want, you can force the cache to release immediately, but the next disk io will start using it again if there is free memory available.


try this to see the before and after

free -g
sync;echo 3 > /proc/sys/vm/drop_caches
free -g
GulfITAuthor Commented:
Does the memory_target control the Cache for Oracle DB ? Since have allocated around 42GB for that?
sdstuberCommented:
memory_target controls the upper bounds of the sga and pga

the sga contains the shared pool (cache of parsed queries and result cache of functions and queries) and buffer cache (cache of read blocks)

so yes -  but,  it is not the same thing as the OS cache
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

GulfITAuthor Commented:
So in other wards Free Zero memory does not signify a problem.

Memory issues pops up only when the Swap starts to right to it?
sdstuberCommented:
>>> So in other wards Free Zero memory does not signify a problem.

Not if there is more memory in cache

>>> Memory issues pops up only when the Swap starts to right to it?

Most likely.  If you are over-consuming memory but haven't swapped yet, then you might not notice the problem.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GulfITAuthor Commented:
great.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.