Wednesday, November 4, 2015

HugePage Implementation

- Single database instance 

- Mem: 528265812k (528 GB) 


Recommended values for SGA, PGA, SHARED_POOL, DB_CACHE and hugepages

SGA_TARGET=150G
SGA_MAX_SIZE=150G
PGA_AGGREGATE_TARGET=100G
SHARED_POOL_SIZE=50G
DB_CACHE_SIZE=70G
vm.nr_hugepages=77000

STEPS
  • Log into DB as SYS user.
  • create pfile from spfile;
  • Take the backup of pfile;
  • Change parameters 
              ALTER SYSTEM SET USE_LARGE_PAGES=ONLY SCOPE=SPFILE; 
                  ALTER SYSTEM SET SGA_TARGET=150G SCOPE=SPFILE; 
                  ALTER SYSTEM SET SGA_MAX_SIZE=150G SCOPE=SPFILE; 
                  ALTER SYSTEM SET PGA_AGGREGATE_TARGET=100G SCOPE=SPFILE; 
                  ALTER SYSTEM SET SHARED_POOL_SIZE=50G SCOPE=SPFILE; 
                  ALTER SYSTEM SET DB_CACHE_SIZE=70G SCOPE=SPFILE; 
                  ALTER SYSTEM SET MEMORY_MAX_TARGET=0 SCOPE=SPFILE; 
                  ALTER SYSTEM SET MEMORY_TARGET=0 SCOPE=SPFILE; 
                  ALTER SYSTEM SET SORT_AREA_SIZE=0 SCOPE=SPFILE;

  • create pfile from spfile
  • shut immediate;
  • As root add below valules in sysctl.conf
              vm.nr_hugepages=77000
                  vm.hugetlb_shm_group=501 (To know the group use fgrep dba /etc/group)  
  • As a root sysctl -w vm.max_map_count=262144
  • As a root sysctl -p
  • reboot server
  • Edit pfile and Remove memory_max_target, memory_target and sort_area_size from pfile
  • start database with pfile
                startup pfile=/u01/app/oracle/product/11.3.0/db_1/dbs/initXXX.ora
  • create spfile from pfile
  • shut immediate
  • startup
Large Pages used by this instance (#pages) = HugePages_Total – HugePages_Free + HugePages_Rsvd

Ref.
  • Huge Page Implementation Note 361468.1
  • Large Pages Information in the Alert Log Note: 1392543.1
  • Oracle Not Utilizing Hugepages (Doc ID 803238.1)
  • Shell Script to Calculate Values Recommended Linux HugePages / HugeTLB Configuration (Doc ID 401749.1)
  • USE_LARGE_PAGES To Enable HugePages (Doc ID 1392497.1)
  • Maximum SHMMAX values for Linux x86 and x86-64 (Doc ID 567506.1)
  • Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device (Doc ID 301830.1)



No comments:

Post a Comment