The reasoning behind allocating huge pages once the database is up and running

The reasoning behind allocating huge pages once the

This preview shows page 64 - 66 out of 98 pages.

run the script once the database is up and running. The reasoning behind allocating huge pages once the database is up and running is to provide a proper number of pages to handle the running shared memory segments. The steps are as follows: 1. Copy the bash script found within Appendix E Huge Pages Script and save it as huge_pages_settings.sh 2. As the root user, ensure the huge_pages_settings.sh is executable by running the following command: # chmod +x huge_pages_settings.sh 3. As the root user, execute the huge_pages_settings.sh script as follows: # ./huge_pages_settings.sh Recommended setting within the kernel boot command line: hugepages = <value> Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle soft memlock <value> Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle hard memlock <value> 4. Add the number of hugepages provided by the huge_pages_settings.sh script to the kernel boot command line within the /etc/grub.conf and disable transparent huge pages persistently across reboots as follows: title Red Hat Enterprise Linux (2.6.32-431.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/myvg-root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_DM rd_LVM_LV=myvg/root KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=myvg/swap rhgb quiet hugepages=<value-provided-by- script> transparent_hugepage=never initrd /initramfs-2.6.32-431.el6.x86_64.img 20 ALERT: Disable Transparent HugePages on SLES11,RHEL6,OEL6 and UEK2 Kernels (DOC ID: 1557478.1) 58 refarch-fee[email protected]
Image of page 64
NOTE: Allocating the number of huge pages within the kernel boot command line is the most reliable method due to memory not yet becoming fragmented. 21 5. Oracle requires setting the soft and hard limits to memlock. Setting memlock allows the oracle user to lock a certain amount of memory from physical RAM that isn't swapped out. The value is expressed in kilobytes and is important from the Oracle perspective because it provides the oracle user permission to use huge pages. This value should be slightly larger than the largest SGA size of any of the Oracle Database instances installed in an Oracle environment. To set memlock, add within /etc/security/limits.d/99-grid-oracle-limits.conf the following: oracle soft memlock <value-provided-by-script> oracle hard memlock <value-provided-by-script> 6. Reboot the system to ensure the huge pages setting takes effect properly. 7. Verify the value provided by the huge_pages_settings.sh matches the total number of huge pages available on the system with the following command: # cat /proc/meminfo | grep -i hugepages_total HugePages_Total: <value-provided-by-script> 8. Verify the current status of the transparent huge pages is set to NEVER via the following command: # cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] NOTE: Starting with Oracle Database version 11.2.0.2, the initialization parameter “USE_LARGE_PAGES” was introduced to allocate huge pages on a per database use case. The default value for Oracle Database 12.0.1.0 is set to true. Section 5 Logging into the Oracle Container Database 12c Release 1 (12.1)
Image of page 65
Image of page 66

You've reached the end of your free preview.

Want to read all 98 pages?

  • Winter '15
  • Zaki
  • Oracle Database

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture