Find the memory on the host:

[gg60@ut03 :+ASM] /home/dba/gg60 $ free -m

total       used       free     shared    buffers     cached

Mem:          3820       3773         47          0        396       2045

[gg60@ut03 :+ASM] /home/dba/gg60 $ cat /proc/meminfo  | grep Mem

MemTotal:      3912580 kB

MemFree:         64228 kB

*********************************************************************************

Set the value for vm.nr_hugepages:

3820/1024 = 3.73 GB

1.5 GB is 40%     (this will be the sga_target value 1528 MB )

(1.50 * 1024 * 1024/2048) + 5 = 773

vm.nr_hugepages=773

  1. A) Edit /etc/sysctl.conf

Add line:

vm.nr_hugepages=773

*********************************************************************************

Set the value for Soft memlock and Hard memlock:

3912580 * 2 = 7825160

  1. B)  Edit: /etc/security/limits.conf

Add lines:

oracle soft memlock 7825160

oracle hard memlock 7825160

*************************************************************************************

.75 * 3264 * 1024 * 1024 = 3004170240

kernel.shmmax = 3004170240

  1. C)  Edit /etc/sysctl.conf

Add line:

kernel.shmmax = 3004170240

*********************************************************************************

Open SRQ for Unix Admin to make settings (A, B, C) then bounce host.

*********************************************************************************

DBA modify init.ora file in this location: /opt/oracle/duoxxxa/admin/scripts/initduoxxxa.ora’

Add lines:

sga_target=1528M

use_large_pages=’ONLY’

Take out lines:

memory_max_target

memory_target

pga_aggregate_target

Then rename the pfile and spfile  (ie, *.old) in:    /opt/oracle/product/11.2.0.4/dbs

Then bounce the database as follows:

sqlplus ‘ /as sysdba’   >  shutdown immediate;

startup pfile=’/opt/oracle/duoxxxa/admin/scripts/initduoxxxa.ora’

create spfile from pfile=’/opt/oracle/duoxxxa/admin/scripts/initduoxxxa.ora’

shutdown immediate;

Type: ASM

srvctl start database –d duoxxxa

In another session, tail the errorlog:

tail -f /opt/oracle/diag/rdbms/duoxxxa/duoxxxa/trace/alert_duoxxa.log

Verify that it it using huge pages.  It will mention it in the alert log.

Appendix A:

Excerpt from document Oracle 11gR2 Application Database Project Procedures

UNIX ADMIN PART:

HUGE PAGE Settings**

  1. Edit the /etc/sysctl.conf and add vm.nr_hugepages=xxxx
  2. Edit the /etc/security/limits.conf

Soft memlock  xxxxxxxx

Hard memlock xxxxxxxx

  1. Edit the /etc/sysctl.conf kernel.shmmax=   xxxxxxxxxx
  1. Edit the /etc/sysctl.conf and add vm.nr_hugepages=xxxx
  2. Edit the /etc/security/limits.conf

Soft memlock  xxxxxxxx

Hard memlock xxxxxxxx

  1. Edit the /etc/sysctl.conf kernel.shmmax=   xxxxxxxxxx
  2. How to determine the value for vm.nr_hugepages

CPU and Memory configuration details will get change based on the database size.

Example:-

Small Size DB Medium Size DB Large Size DB
CPU 2 4 8+
RAM Memory 4 GB 8 GB 16 GB+

Set exactly 40% of physical RAM Memory to the Database SGA Memory.

Example:-if RAM Memory is 4 GB, then 40% should be allocate to SGA.  SGA should be 1.6 GB.

If you need 1.6GB for the SGA,

Recent Posts

Start typing and press Enter to search