According to the oracle document:"The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer."Oracle document also suggest that we can use the command df –k /dev/shm
to get the available shared memory.
I got a little confuse of of shared memory while I am reading the definition of the shmall parameter: This parameter sets the total amount of shared memory pages that can be used system wide , it means that the total amount of shared memory available on the system equals to (shmall*PAGE_SIZE)
So when I am going to set the value of MEMORY_TARGET, which should I go for, shmall*PAGE_SIZE or df –k /dev/shm
You should go for the solution that fulfills your requirements.
Both shmall
and /dev/shm
are configurable, so first you should to configure them, and after that, you can set MEMORY_TARGET
. The default value (on Oracle Linux 7) of shmall
is 4 TB, which is irrelevant for most systems. The default size of /dev/shm
is 50% of the physical memory.
If you use the default settings, following /dev/shm
for sizing can be a viable option, but it may be suboptimal ("Unused memory is wasted memory").
To make things more complicated, MEMORY_TARGET
includes PGA, which is not shared memory.
Also, my personal opinion/practice: whenever I can, I use ASMM (sga_target/sga_max_size + pga_aggreate_target) instead of AMM (memory_target/memory_max_size). Especially since hugepages works with ASMM, but not with AMM.