When Linux servers that host Oracle database environments are configured with 16GB or more of memory and the total SGA of the Oracle databases is 5GB or more, it is strongly recommended to configure Linux HugePages at the OS level. With HugePages, the Linux memory page size is set at 2MB (instead of the default 4K). This will dramatically improve OS performance when running Oracle databases with large SGA sizes.
Note: The Oracle 11g Automatic Memory Management (AMM) feature is not compatible with Linux HugePages. In order to utilize HugePages, the Automatic Shared Memory Management (ASMM) feature can be configured for the Oracle database.
To configure Oracle to support Linux HugePages, perform the following steps for each Oracle database on the server:
- Set the Oracle parameters
"memory_target" = 0and
"memory_max_target" = 0
- Set the Oracle parameter
"sga_target" = SGAsize desired for the database
- Set the Oracle parameter
"pga_aggregate_target" = PGAsize desired for the database
- Restart the Oracle database to allow these parameter settings to take affect
Run this script:
hugepages_settings.sh on each server to compute the kernel parameter value to enable the Linux HugePages configuration.
- Once ASMM has been configured for all of the databases on the server and each has been restarted, execute the
hugepages_settings.shscript as the root user.
- The output from the script will be similar to this:
vm.nr_hugepages = 9999(where “9999” represents the value for the number of HugePages to allocate).
- Edit the
/etc/sysctl.conffile as root and add this parameter value at the end of the file. Save the file and exit the editor.
- Copy the
/etc/sysctl.conffile to the 2nd node of the cluster (if clustered system)
- Reboot each server in the cluster – do not run command
/etc/sysctl –pRebooting the sever allows Linux to allocate HugePages as contiguous memory segments at system startup.
- Once all of the Oracle databases have been started after the reboot, use the following command to check the HugePages usage:
grep Huge /proc/meminfo
More information on configuring HugePages on Linux can be found in the My Oracle Support (MOS) document 361468.1 (or you can just search on “HugePages” in My Oracle Support to list all related documents).
Note: There is a bug in Oracle 18.104.22.168 Grid Infrastructure that manifests itself when HugePages is configured. The bug is corrected in Oracle 22.214.171.124. Refer to MOS document 983715.1 for an explanation of the bug and its work around.
Options for HA Configurations? Not Replication! If you’re considering high availability options, replication is not an option. SQL Server has other H/A options such as Clustering, Mirroring, and AlwaysOn that deal with your RDBMS or…
- Jan 21
- < 1 min read