ORA-27102: out of memory followed by Linux-x86_64 Error: 28: No space left on device during database startup

One-liner Solution

Check and set the value of SHMALL as below, to solve ORA-27102 :
SHMALL = Sum of all the SGAs on the system / page size


Scenario 1
You are configuring a database and using Automatic Shared Memory Management (ASMM). While trying to start up the database instance, you get the error shown in the below code block.

Scenario 2
You have increased the memory capacity (Random Access Memory, RAM) of the System. Then increased the value of System Global Area (SGA) up to 50% of the RAM, as per Oracles’ best practice. You also set the value of SHMMAX equal to the value of target SGA. But getting the error in the below code block, while trying to startup the instance.
SQL> startup
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device
Root Cause

The parameter SHMALL is not set properly or, too small.

SHMALL indicates the total amount of shared memory (in pages) that can be used by the system. The default value of SHMALL in Red Hat Enterprise Linux is 2097152 (in pages). If PAGE_SIZE is 4096 bytes, this value (2097152) indicates that, 8 GB of shared memory is available to the system. So for this setup, to avoid ORA-27102, you must tune the values of SHMALL and SHMMAX with the increase in the total SGA of the system over 8 GB.

Detailed Solution
Task 1 - Calculate the Value of SHMALL
1. Login as the root user
2. Determine the PAGE_SIZE
# getconf PAGE_SIZE
3. Determine the sum of all the SGAs in the system Suppose there are two database instances in your system. To determine the SGA for each of them, run the following from SQL*Plus :
determine SGA to fix ora-27102

Which is 14 GB of SGA, for one instance. Suppose, the value of SGA for another instance is 4 GB. So the sum of all the SGAs in the system will be 18 GB.

Note: In this scenario, the value of SHMMAX should be 18GB or more.

4. Calculate the value of SHMALL
SHMALL = Sum of all the SGAs on the system / page size
= 18 GB / 4096 bytes
= ‭19327352832 bytes ‬/ 4096 bytes‬
= 4718592 pages‬
Task 2 - Set the value of SHMALL
Permanent Workaround:
1. Login as the root user 2. Set the SHMALL to 4718592 in the /etc/sysctl.conf file
# vi /etc/sysctl.conf

kernel.shmall = 4718592
3. Run the following command to load the new value
# sysctl –p
NOTE: If you run this command, no system reboot is required.
4. Check the changed value
# cat /proc/sys/kernel/shmall
Non-persistent Workaround:
If you don’t want to change the value permanently, for some reason you may do the following:
# echo 4718592 > /proc/sys/kernel/shmall
NOTE: The value will reset to previous, once you reboot the system.

After the workaround is performed, switch back to the oracle user and retry the startup command. I hope, after going through this post, you solved ORA-27102. That’s all for toady. Take Care!

For more learning Click Me!

My Oracle Support (MOS) Doc ID – 301830.1
RedHat Customer Portal – Setting SHMALL Parameter

Leave a Comment

Your email address will not be published. Required fields are marked *