100% found this document useful (1 vote)
3K views3 pages

Alert Log Recommendation - "Increase Per Process Memlock (Soft) Limit To at Least MB To Lock % of SHARED GLOBAL AREA (SGA) Pages Into Physical Memory" (Doc ID 2049901.1)

Uploaded by

Nawab Sharief
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3K views3 pages

Alert Log Recommendation - "Increase Per Process Memlock (Soft) Limit To at Least MB To Lock % of SHARED GLOBAL AREA (SGA) Pages Into Physical Memory" (Doc ID 2049901.1)

Uploaded by

Nawab Sharief
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

7/8/2021 Document 2049901.

1
  Last Login: July 8, 2021 7:54 AM GST Nawab (Available) (0) Contact Us Help
PowerView is Off

 
Dashboard Knowledge Service Requests Patches & Updates

Give Feedback...
Copyright (c) 2021, Oracle. All rights reserved. Oracle Confidential.

Alert Log Recommendation - "Increase per process memlock (soft) limit to at least <n>MB to lock <n>% of To Bottom
SHARED GLOBAL AREA (SGA) pages into physical memory" (Doc ID 2049901.1)

In this Document   Was this document helpful?  


   

Symptoms
  Document Details  
Changes
Cause
Type:
PROBLEM
Solution Status:
PUBLISHED
Last Major
References Nov 4, 2019
Update:
Mar 6, 2020
Last Update:
   

  Related Products  
APPLIES TO:
Oracle Cloud Infrastructure -
Database Service
Oracle Cloud Infrastructure - Database Service - Version N/A and later Oracle Database Backup
Oracle Database Backup Service - Version N/A and later
Service
Oracle Database Exadata Express Cloud Service - Version
N/A and later Oracle Database Exadata
Oracle Database Cloud Exadata Service - Version N/A and later
Express Cloud Service

Oracle Database Cloud
Oracle Database Cloud Service - Version N/A and later Exadata Service
Information in this document applies to any platform.
Oracle Database Cloud Service

Show More
   

SYMPTOMS
  Information Centers  
When starting Oracle 12c database, the alert log reports a recommendation to increase the per process memlock (soft) limit, Oracle Catalog: Service
e.g.: Request Data Collections
(SRDCs) for all Products and
Services [51.2]
Wed Aug 12 09:26:27 2015
Oracle Catalog: Information
Starting ORACLE instance
(normal) (OS id: 14753) Centers for All Products and
...

Services [50.2]
Wed
Aug 12 09:26:27 2015

Expected per process system memlock (soft) limit to lock Platform as a Service (PaaS)
SHARED GLOBAL AREA (SGA) into memory: 4096M
and Oracle Cloud

Infrastructure (OCI)
Wed Aug 12 09:26:27 2015 Information Center

Available system pagesizes: [2048297.2]


 4K, 2048K

Wed Aug 12 09:26:27 2015 Index of Oracle Database


Supported system pagesize(s): Information Centers



[1568043.2]
Wed Aug 12 09:26:27 2015

 PAGESIZE  AVAILABLE_PAGES  EXPECTED_PAGES  ALLOCATED_PAGES  ERROR(s) Information Center: Overview


Wed Aug 12 09:26:27 2015
Database Server/Client

4K       Configured         1048581         1048581        NONE Installation and


Wed Aug 12 09:26:27 2015
Upgrade/Migration

certain system pagesizes: [1351022.2]
Reason for not supporting
Wed Aug 12 09:26:27 2015
Show More

and free memory regions
 2048K - Dynamic allocate
   

Wed Aug 12 09:26:27 2015


  Document References  
RECOMMENDATION:        <==============================================
Wed Aug 12 09:26:27 2015
Automatic Memory
1. Increase per process

memlock (soft) limit to at least 4096MB Management (AMM) SGA and


to lock 100% of SHARED GLOBAL AREA (SGA) pages into physical memory PGA Management in 11g and
Above [1392549.1]

Oracle Database (RDBMS) on


  Unix AIX,HP-UX,Linux,Solaris
As
per /etc/security/limits.conf, the current settings are: and MS Windows Operating
Systems Installation and
Configuration Requirements
oracle soft memlock 1048576 Quick Reference
oracle hard memlock 1048576
(12.1/12.2/18c/19c)
[1587357.1]

How to Automate
 
Startup/Shutdown of Oracle

actual memory configuration shows values like:
The Database on Linux [222813.1]

Database Startup Fails With


NAME                                          VALUE Error: Memlock Limit too
---------------------------------------------

-------------------- Small: % to Accommodate


...
Segment Size: % [1511239.1]

memory_max_target                             4294967296        <--------  4G Large Pages Information had


memory_target                                 4294967296        <--------  4G
been changed in the Oracle
object_cache_max_size_percent                 10
Database 12c Alert Log
object_cache_optimal_size                    

102400 [1969379.1]
olap_page_pool_size                           0

   

result_cache_max_size                         10747904
sga_max_size                                 
       <--------  4G
4294967296   Recently Viewed  
sga_target                                    0

shared_pool_reserved_size                    

25165824 ORA-04031 in Shared Pool


shared_pool_size                              0
Due to Workload or SGA

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=351434465212496&id=2049901.1&displayIndex=8&_afrWindowMode=0&_adf.ctrl-state… 1/3
7/8/2021 Document 2049901.1
streams_pool_size                             0 Configuration and Tuning
... issue [2647234.1]
Alert Log Recommendation -
&quot;Increase per process
  memlock (soft) limit to at
And the actual startup values are: least &lt;n&gt;MB to lock
&lt;n&gt;% of SHARED
GLOBAL AREA (SGA) pages
PARM                                     SESSVAL         INSTVAL into physical memory&quot;
---------------------------------------- --------------- --------------- [2049901.1]
__shared_pool_size                       503316480       503316480        <--------  480M OCI : How to Reduce the
__large_pool_size                        33554432        33554432 SGA Size of a DB System
__java_pool_size                         16777216        16777216 [2572407.1]
__streams_pool_size                      0               0 How to Control the SGA
_kghdsidx_count                          1               1 Memory Usage Among the
_ksmg_granule_size                       16777216        16777216 CDB/PDBs in Mutitenant
Database. [2712535.1]
__sga_target                             2566914048      2566914048        <--------  2.3G
_memory_imm_mode_without_autosga         TRUE            TRUE How To Modify memory
parameters On a Pluggable
__db_cache_size                          1879048192      1879048192        <--------  1.75G
Database (PDB) [2706020.1]
__pga_aggregate_target                   1728053248      1728053248        <--------  1.6G
Show More
   

CHANGES

CAUSE

The maximum amount of locked-in-memory address space (memlock) is not adequate to lock 100% of SHARED GLOBAL AREA
(SGA) pages into physical memory.

SOLUTION

1.  Impact of the memlock (soft) setting in /etc/security/limits.conf file


Generally, the "memlock" option is used to set the maximum amount of locked-in-memory address space as given in kilobytes.
This is memory that will not be paged out. It is frequently used by database management applications such as Oracle to lock

shared memory for a shared pool so that it is always in memory for access by multiple sessions.
        

For Oracle to lock shared memory for the shared pool, we must adjust the "memlock" parameter in the
"/etc/security/limits.conf".
The "memlock" number is
specified in kB, so for a 2G shared pool we would need to set at least (2 * 1024 * 1024 = 2097152),
as shown below:

oracle           soft    memlock         2097152


oracle           hard    memlock         2097152

 
So
in this case, the actual value was set as 1048576, which means the per process system memlock (soft) limit = 1024M.

Even though the startup value for the shared pool is not that high (in this case, it is using 480M), at the time of startup the
expected per process system memlock (soft) limit to lock SHARED GLOBAL AREA (SGA) into memory is mentioned as 4096M.

If you compare the memory configuration, memory usage during instance startup; this is the same value used by sga_max_size
which means, in case if you explicitly set sga_max_size (upper limit for SGA); then you may need to adjust it OR remove this
parameter from the parameter file in case if you are using AMM (this will force AMM to allocate 60% for SGA and 40% for PGA,
automatically).

2.  Impact of increasing memlock if there are multiple databases on the server

There is no negative impact. Ideally you can set the "memlock" value (in kB) slightly smaller than installed RAM, e.g. if you have
64GB RAM installed, you may set:

*   soft   memlock    60397977


*   hard   memlock    60397977

There is no harm in setting this value larger than your SGA requirements, so you can even set this to "UNLIMITED".

NOTE - For OL7 and RHEL7 systems


=======================

Note that if you install Oracle Linux 7, Oracle Linux 6 or Oracle Linux 5 and use Oracle RPM, the configuration file is distribution
specific. You might make changes in "/etc/security/limits.conf" and memlock  won't be modified for the user when you run ulimit
-l. In such a situation check  if the configuration file been used is preinstall.conf  in "/etc/security/limits.d/"  or contact your
system administrator for distribution specific configuration file information.

Additionally to the above solution, on OL7 and RHEL7, the file /etc/systemd/system/dbora.service must be corrected by adding
following lines:

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=351434465212496&id=2049901.1&displayIndex=8&_afrWindowMode=0&_adf.ctrl-state… 2/3
7/8/2021 Document 2049901.1
LimitMEMLOCK=infinity
LimitNOFILE=65535

like in example bellow:

[Unit]
Description=Oracle Autostart Service
After=syslog.target network.target

[Service]
Type=simple
RemainAfterExit=yes
User=oracle
Group=oracle
ExecStart=/opt/oracle/1210/bin/dbstart /opt/oracle/1210
ExecStop=/opt/oracle/1210/bin/dbshut /opt/oracle/1210
LimitMEMLOCK=infinity
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target

REFERENCES

NOTE:1392549.1 - Automatic Memory Management (AMM) SGA and PGA Management in 11g and Above
NOTE:1587357.1 - Oracle Database (RDBMS) on Unix AIX,HP-UX,Linux,Solaris and MS Windows Operating
Systems Installation
and Configuration Requirements Quick Reference (12.1/12.2/18c/19c)
NOTE:222813.1 - How to Automate Startup/Shutdown of Oracle Database
on Linux

Accommodate Segment Size: %
NOTE:1511239.1 - Database Startup Fails With Error: Memlock Limit too Small: % to
NOTE:1969379.1 - Large Pages Information had been changed in the Oracle Database 12c Alert Log

Didn't find what you are looking for? Ask in Community...

Related
Products
Oracle Cloud > Oracle Platform Cloud > Oracle Cloud Infrastructure - Database Service > Oracle Cloud Infrastructure - Database Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Backup Service > Oracle Database Backup Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Exadata Express Cloud Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Exadata Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Service
Oracle Database Products > Oracle Database Suite > Oracle Database > Oracle Database - Enterprise Edition > RDBMS > Common errors like ORA-27102 / server process memory
leaks / server process memory usage / swapping
Oracle Database Products > Oracle Database Suite > Oracle Database > Oracle Database - Standard Edition > RDBMS > Common errors like ORA-27102 / server process memory
leaks / server process memory usage / swapping
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Schema Service
Oracle Cloud > Oracle Infrastructure Cloud > Oracle Cloud at Customer > Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine)

Back to Top
 
Copyright (c) 2021, Oracle. All rights reserved. Legal Notices and Terms of Use Privacy Statement
   

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=351434465212496&id=2049901.1&displayIndex=8&_afrWindowMode=0&_adf.ctrl-state… 3/3

You might also like