Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

We get an ORA-00845: MEMORY_TARGET not supported on this system on startup.

However, df -h shows

tmpfs                 7,9G  4,0K  7,9G   1% /dev/shm. 

Which indicates that there is more than enough memory availabe. Any ideas what could be the cause?

like image 266
Lokomotywa Avatar asked Oct 27 '15 11:10

Lokomotywa


People also ask

How do I resolve ORA 27102 out of memory?

Remove SGA_* parameters from your pfile2. Save the file. Perform the following: SQL> startup nomount pfile='C:\Oracle\admin\orcl\pfile\pfile2.

How do I resolve ORA 00845?

To resolve this issue, select a smaller value for MEMORY_TARGET during provisioning. For more information on changing parameters during provisioning, including MEMORY_TARGET, please refer to the document Configuration Setting for Oracle Virtual Databases.

What is Memory_target?

MEMORY_TARGET specifies the Oracle systemwide usable memory. The database tunes memory to the MEMORY_TARGET value, reducing or enlarging the SGA and PGA as needed. MEMORY_TARGET should be set higher than or equal to the sum of the current sizes of the SGA and PGA.

What is automatic memory management?

Automatic memory management is one of the services that the Common Language Runtime provides during Managed Execution. The Common Language Runtime's garbage collector manages the allocation and release of memory for an application.


2 Answers

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
like image 100
Lalit Kumar B Avatar answered Sep 30 '22 22:09

Lalit Kumar B


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
like image 40
Mohamed El-Touny Avatar answered Sep 30 '22 21:09

Mohamed El-Touny