Tuesday, May 27, 2008

Memory Max Target

To use memory_max_target on 11g R1 must have a shared memory mounted

mount -t tmpfs ramfs -o size=1024m /dev/shm
From metalink note 749851.1

Please also note that ramfs (instead of tmpfs mount over /dev/shm) is not supported for AMM at all. With AMM the Oracle database needs to grow and reduce the size of SGA dynamically. This is not possible with ramfs where it possible and supported with tmpfs (which is the default for the OS installation).
Therefore above command which will work for a 11g instance may not be suited anymore

In 11g R2 this can be done when creating the database with DBCA

metalink note 465048.1

mount -t tmpfs shmfs -o size=7g /dev/shm

Also, to make this change persistent across system restarts, add an entry in /etc/fstab similar to the following:

shmfs /dev/shm tmpfs size=7g 0

NOTE: You should check with your OS Administrator and/or alert.log for information on "best" size fo shm.