Oracle startup not possible - ORA-00845: MEMORY_TARGET not supported on this system - but memory size seems to be fine

You might be using Automatic Memory Management (AMM).

AMM uses two initialization parameters:

  • MEMORY_TARGET
  • MEMORY_MAX_TARGET

The shared memory file system should have enough space to accommodate the MEMORY_TARGET and MEMORY_MAX_TARGET values.

To verify:

SQL> show parameter memory

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address             integer     0
memory_max_target                    big integer 6096M
memory_target                        big integer 6096M
shared_memory_address                integer     0

In UNIX/Linux, you will have to set the shared memory file system accordingly.

Verify:

df -h /dev/shm

Set:

mount -t tmpfs shmfs -o size=<some_value_in_number_with_size> /dev/shm

For example,

mount -t tmpfs shmfs -o size=4096m /dev/shm

Error Cause: The new Automatic Memory Management functionality uses /dev/shm on Linux for SGA and PGA management. The errors occur if either MEMORY_TARGET or MEMORY_MAX_TARGET is configured larger than the configured /dev/shm size, or if /dev/shm is mounted incorrectly.

SOLUTION: Please confirm that ORACLE_HOME is set correctly. This error sometimes happens when it is not set correctly.

Make sure that the /dev/shm size is configured large enough, like in: mount -t tmpfs shmfs -o size=7g /dev/shm

Note: You should check with your System Administrator what the "best" size for /dev/shm is, based on what has been reported in the alert file.

Also, many best practices now suggest disabling AMM especially in Exa* Engineered boxes that have larger memory capability and can use Huge / Large pages. This is because AMM and Huge / Large pages are mutually exclusive and overall performance will be better using Huge pages

Make sure that the df output shows the correct /dev/shm configuration when using Oracle on the system:

$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
...
shmfs 6291456 832356 5459100 14% /dev/shm

An easy solution is just to add space to /dev/shm fs.

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

For more concepts and details, see the blog post ORA-00845: MEMORY_TARGET not supported on this system.