Can oracle use more memory than memory_max_target

memoryoracleoracle-11g-r2

My system has 34GB RAM, however, I have set

memory_max_target = 3G
memory_target = 3G

Oracle memory parameters are specified using G (GB), M (MB) or K (KB)
…and I use AMM (Automatic Memory Management).

Even though that's the case when I check the current usage of my memory with

**free -m**

…it shows that around 33 GB of the total has been used. So I guess, Oracle also uses some of it (yes, I mean more than memory_max_target size, which is 3 GB).

So, my questions are:

  • Can Oracle use more memory than what we have set for memory_max_target?
  • Or is that a "hard" limit that Oracle never changes, even though the system has plenty of free memory?

Best Answer

The output of free includes caches and buffers, and a lot of people fall into the trap of thinking that their memory is used while it is not. Visit this site for explanation: http://www.linuxatemyram.com/

On the other hand though, yes, Oracle can definitely use more memory than configured with the memory_max_target parameter. Parameters, such as memory_max_target, memory_max_size limit the size of the SGA only. Prior to 12c, PGA could not be limited, even though there is the hidden parameter _pga_max_size. That parameter limits the PGA size per session, but it does not account for all kinds of allocations, thus even 1 "rouge" session can eat up all the memory of the database server.

Starting with 12c, there is the parameter pga_aggregate_limit, which is a real hard limit for the PGA.

References: