Pages

Thursday, May 18, 2023

How much memory can be allocated to Oracle on Linux host?

How much memory can be allocated to Oracle on Linux host?

1. Rule of thumb:
33% of RAM is allocated to oracle server, leaving 66% of memory to:
33% OS
33% database related processes, such as session processes, RMAN, expdp, jobs, running on host, and are not part of the memory allocated to oracle

2. Oracle memory can be increased to 50% of host memory
Per oracle technote "Doc ID 567506.1  Maximum SHMMAX values for Linux x86 and x86-64"

Oracle Global Customer Support officially recommends a " maximum" for SHMMAX of "1/2 of physical RAM".
The "theoretical limit" for SHMMAX is the amount of physical RAM that you have.  However, to actually attempt to use such a value could potentially lead to a situation where no system memory is available for anything else.  Therefore a more realistic "physical limit" for SHMMAX would probably be "physical RAM - 2Gb".
In an Oracle RDBMS application, this "physical limit" still leaves inadequate system memory for other necessary functions. Therefore, the common "Oracle maximum" for SHMMAX that you will often see is "1/2 of physical RAM". 
Many Oracle customers chose a higher fraction, at their discretion.

3. Additional Notes
- The SHMMAX should be larger than SGA and a maximum of 1/2 of physical RAM.

- The shared memory is implemented via /dev/shm (POSIX) using standard 4 KB memory pages, or kernel hugepages, which uses 2 MB pages.

-  Oracle AMM (memory_target and memory_max_target) requires POSIX shared memory (/dev/shm).  it is allocated out of dev/shm as needed.

- /dev/shm uses standard 4k memory pages and can be swapped to disk. 
   In theory,  for Oracle database with more than 4 GB of SGA, performance can decrease due to the memory required to manage the memory pages.

- Oracle AMM manages SGA and PGA automatically. 

- PGA is not allocated out of SGA. 

- System V IPC parameters do not apply to Posix shared memory.

- AMM uses /dev/shm, which is max. 50 % by default. 

- The SGA under AMM needs to fit into /dev/shm.

- ASM requires AMM

- Shared memory can be System V or Posix. SHMALL applies to System V only.

- Only a few processes use shared memory, Oracle is one of them.

No comments:

Post a Comment