Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

/dev/shm Vs MAX_MEMORY_TARGET

JhilOct 1 2016 — edited Oct 1 2016

Dear all,

I have seen following statement  i am getting bit confused.

" /dev/shm must be greater than the sum of MEMORY_MAX_TARGET for all instance on the server"

>> Allocated memory on my personal system for single database.

SQL> show parameter MEMORY_MAX_TARGET;

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

memory_max_target                    big integer 872M

SQL> show parameter MEMORY_TARGET;

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

memory_target                        big integer 872M

>> My current configuration of /dev/shm on my machine

tmpfs    tmpfs 1.2G   596M   547M  53% /dev/shm

>> Allocated memory on my personal system for single database.

Right now i have only 1 database on my machine.

if i have '10' databases on my machine, 

should i allocate  value of /dev/shm  is  greater than,   sum  of all instances (10)  memory_max_target value ?

>> Is this correct ?

value of  /dev/shm   >  memory_max_target  * 10 (all instances )

OS : Oracle Linux 5.6

DB : 11.2.0.2

This post has been answered by Dude! on Oct 1 2016
Jump to Answer

Comments

Dude!
Answer

Yes. Each database will require its own SGA segment and additional databases will add too the total size required. POSIX or /dev/shm shared memory is similar to a RAM disk, which maps memory to virtual files to be shared among processes. By default, the maximum size of /dev/shm is 50 % of the physical or installed RAM. It does however not reserve or allocate RAM other than what is actually being used.

Keep in mind that Oracle database AMM and /dev/shm are not recommended for large memory configurations. As I recall, if your SGA is greater than 2 GB, you should use kernel hugepages instead. Kernel hugepages are more efficient due to larger memory pages, which requires far less resources for memory management and results in much better performance.

An Oracle database instance can use SYS V shared memory, which is either kernel hugepages or conventional 4k memory pages, but cannot use POSIX /dev/shm for SGA and SYS V at the same time. You can however use different shared memory concepts for different Oracle database instances on the same server. For example, running an +ASM instance using AMM and another Oracle database using kernel hugepages and ASMM.

Speaking of shared memory, the SHMMAX kernel parameter applies to SYS V shared memory only. It's a safeguard parameter to limit how much shared memory a process can possibly use and needs to be large enough to fit the largest SGA of any of your Oracle databases. SHMMAX for a server that runs Oracle database is typically set to 4 TB or whatever the platform being x86 or x64 theoretically supports. SHMMAX does not apply to POSIX /dev/shm and Oracle AMM.

For more info, see the following:

https://docs.oracle.com/cd/E11882_01/server.112/e10839/appi_vlm.htm#UNXAR385

Btw, if you have to use OS release 5, use 5.11 at least. There is no reason to run 5.6, which is obsolete.

Marked as Answer by Jhil · Sep 27 2020
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 29 2016
Added on Oct 1 2016
1 comment
2,613 views