Oracle instability on SLES
This document (7001835) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Resolution
Please modify the entry NR_HUGE_PAGES in
/etc/sysconfig/oracle
The number of hugepages to use can be calculated as follows:
Amount of memory used by Oracle / Hugepagesize (see /proc/meminfo).
CAUTION: Never assign all memory for hugepages, since the kernel or bash are not hugepages aware and thus the system will not work anymore.
If there is not enough contiguous memory available, the hugepages can not be assigned. Please reboot the system to get enough contiguous memory.
To enable Oracle to make use of hugepages, the ulimit parameter memlock needs to be increased for the user oracle. Please set it to the amount of memory used as hugepages. You can check the memlock for the user oracle using
# ulimit -l
Some ulimit parameters are set in /etc/sysconfig/oracle. Unfortunately, the memlock parameter is missing from there. Thus, the file /etc/security/limits.conf needs to be adapted. Please add the following:
oracle soft memlock 589824
oracle hard memlock 589824
The memlock needs to be specified in KB and needs to be as big as the amount of memory reserved for hugepages.
In the example above, 144 pages x 4096 KB = 589824 KB were configured.
If you are using SAP together with Oracle, the file /etc/sysconfig/oracle is not available. The ulimit parameters are set by the file:
/etc/sysconfig/sapconf
instead. You need, however, to add 2 more oracle parameters manually in /etc/sysctl.conf:
vm.nr_hugepages = $NO
vm.hugetlb_shm_group = $GID
Please replace $NO, by the number of huge pages you want to use and $GID by the group id of the Oracle user.
Please make sure the memory size configured for hugepages is larger than Oracle's SGA (System Global Area). Otherwise, Oracle will ignore hugepages.
Then, please check whether the hugepages have been assigned successfully:
# cat /proc/meminfo | grep Huge
HugePages_Total: 144
HugePages_Free: 144
HugePages_Rsvd: 0
Hugepagesize: 4096 kB
If this shows the hugepages to be configured successfully, please (re-)start Oracle.
After starting the DB, please verify that everything works correctly:
# cat /proc/meminfo | grep Huge
HugePages_Total: 144
HugePages_Free: 142
HugePages_Rsvd: 0
Hugepagesize: 4096 kB
If HugePages_Free decreases, everything worked fine.
Please note that this is only an example configuration. If you need further assistance in optimizing your Oracle installation, please contact Oracle support.
Further information about the huge pages support in Oracle is available in Oracle Metalink: 361323.1.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7001835
- Creation Date: 10-Nov-2008
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com