Monday, June 29, 2009

ORA-00845: MEMORY_TARGET not supported on this system

After my Linux 32-bit server restarted I've tried to startup database (11.1.0.7.0) and received error: SQL> startup ORA-00845: MEMORY_TARGET not supported on this system Quick look to alert log:
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 457179136 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 419430400 and used is 0 bytes. memory_target needs larger /dev/shm
I had insufficient /dev/shm mount size for PGA and SGA which was 400M. Oracle 11g uses /dev/shm on Linux to manage both SGA and PGA memory as a part of new feature AMM (Automatic Memory Management). To enable feature all we have to do is set up MEMORY_TARGET parameter which is used instead of SGA_TARGET, and MEMORY_MAX_TARGET which is used instead of SGA_MAX_SIZE. So if my /dev/shm size is lower then MEMORY_MAX_TARGET I will receive error: ORA-00845: MEMORY_TARGET not supported on this system To workaround this problem I have to configure large enough tmpfs on /dev/shm. So I configured my tmpfs (as root):
# umount tmpfs
# mount -t tmpfs shmfs -o size=1500m /dev/shm
# df -h /dev/shm
Filesystem            Size  Used Avail Use% Mounted on
shmfs                 1.5G  285M  1.2G  19% /dev/shm
But this isn't complete solution, because when your Linux server restarts it will recover old mount settings. So you have to make this change persistent. To do that just add an entry in /etc/fstab similar to the following:
shmfs  /dev/shm   tmpfs   size=1500m  0 0
This solves problem! Great blog post from Tanel Poder: http://blog.tanelpoder.com/2007/08/21/oracle-11g-internals-part-1-automatic-memory-management/ Refer to Metalink documents: 762072.1 and 465048.1 for more information.

3 comments:

  1. Muchisimas gracias por su ayuda, esta excelente el paso a paso me funcionó a la perfecciòn muchas gracias.

    ReplyDelete
  2. Nice one, my prob got resolved thank u

    http://chandu208.blogspot.com/

    ReplyDelete