Symptom
You want to configure optimal settings for running HANA on RHEL 6.5.
Other Terms
HANA, DB, BW on HANA, Suite on HANA, RHEL 6.5, speed, performance, Linux
Reason and Prerequisites
You are running SAP HANA in any flavour on RHEL 6.5 and you want to configure optimal Linux settings.
Solution
To optimize the use of HANA DB with RHEL 6.5 apply the following settings:
Please note: All mentioned changes require root access on operating system level. Future implementations might lead to changes of these recommendations.
- Disable transparent hugepages:With RHEL 6.5 the
usage of transparent hugepages (THP) is generally activated for the
Linux kernel. The THP allows the handling of multiple pages as hugepages
reducing the translation lookaside buffer footprint (TLB), in
situations where it might be useful. Due to the special manner of HANA's
memory management, the usage of THP may lead to hanging situations and
performance degradations.
To disable the usage of transparent hugepages set the kernel settings at runtime with
echo never > /sys/kernel/mm/transparent_hugepage/enabled
There is no need to shut down the database to apply this configuration. This setting is then valid until the next system start. To persist this option, integrate this command line within your system boot scripts (e.g. /etc/rc.local) or add in the current active bootloader the following parameter:
transparent_hugepage=never
Be aware that in a scale-out environment this has to be done on every server in the landscape.
- Configure C-States for lower latency in Linux:The
Linux kernel shipped with RHEL6.5 includes a new cpuidle driver for
recent Intel CPUs: intel_idle. This driver leads to a different
behaviour in C-states switching. The normal opererating state is C0,
when the processor is put to a higher C state, it will save power. But
for low latency applications, the additional time needed to start the
execution of the code again will cause performance degradations.
To see if the recommended driver is enabled, execute:
cat /sys/devices/system/cpu/cpuidle/current_driver
The correct value should be "acpi_idle"
If this is not the case, it is possible to fall back on the recommended driver by disabling the intel_idle driver in the kernel commandline.
Therefore it is nessesary to edit the bootloader configuration. The location of the bootloader configuration file is:
/boot/grub/grub.conf or on an efi system: /boot/efi/EFI/redhat/grub.conf
Edit this file and append the following parameter to all lines starting with “kernel”:
intel_idle.max_cstate=0
If C-States are enabled in BIOS you might still see performance degradations. In this case either disable them in the BIOS or set the following parameter in addition to the previous one:
processor.max_cstate=0
To enable this change, a system reboot is required.
In a scale-out environment, those changes have to be done on every server of the landscape. In case you already have a running HDB instance, rebooting the server should only be done when a standby server is configured. Do not reboot all servers at once. For single node instances a downtime has to be considered.
For more information https://access.redhat.com/site/solutions/202743 (Red Hat customer portal login required)
- Heartbleed OpenSSL:The RHEL 6.5 distribution is
vulnerable to an OpenSSL bug called "Heartbleed". OpenSSL versions
1.0.1 before 1.0.1g allow remote attackers to obtain sensitive
information i.e. private keys.
To fix the bug please upgrade OpenSSL by following the instructions provided by RedHat: https://access.redhat.com/site/solutions/781793 (see also SAP note 2005955).
- Runtime environment library:
In order to run SAP HANA on RHEL 6.5, a compiler-related runtime library is required. The RPM package compat-sap-c++ needs to be installed (see also SAP note 2001528):
In order to be able to get access to the library, customers need subscriptions for “Red Hat Enterprise Linux Server for SAP HANA”. With this subscription you can subscribe your server to the “RHEL Server SAP HANA” channel on the Red Hat Customer Portal or your local Satellite server. After subscribing a server to the channel, the output of “yum repolist” must contain the following:
rhel-x86_64-server-sap-hana-6 RHEL Server SAP HANA (v. 6 for 64-bit x86_64)
Afterwards the runtime library can be installed with the following command:
# yum install compat-sap-c++
-
Supported Kernel versions and patches to use with certified Hardware for SAP HANA on Red Hat Enterprise Linux 6.5:You
can use all official Linux Kernels shipped by Red Hat for Red Hat
Enterprise Linux 6.5, including security and bug fixes. I.e. using
update Linux Kernels from RHEL 6.6 or higher is not allowed at the
moment and will break the certification. Please refer to the following
Red Hat knowledge base article for how to configure your system
accordingly: Red Hat Enterprise Linux for SAP HANA: system updates and supportability.
If additional 3rd-party binary kernel modules are loaded that complicate support for both SAP and the OS vendor (Red Hat) than the following SAP Note applies:
784391 - SAP support terms and 3rd-party Linux kernel drivers
-
SELinuxRed HAT Enterprise Linux 6.5 is delivered with SELinux enabled by default.
Since there is no SELinux policy available for SAP HANA, leaving SELinux enabled can lead to problems when running SAP HANA on RHEL.
To disable SELinux change the line:
SELINUX=enforcing
to
SELINUX=disabled
in /etc/sysconfig/selinux and reboot the system.
- Configure tmpwatch to prevent HANA lock files to be removed after 10 daysSAP
HANA and sapstartsrv daemon create hidden lock files under /tmp that
are kept open by SAP HANA processes but the respective atime values are
not being updated regularly.
Tmpwatch default behaviour is to clean /tmp from files not being accessed for more than 10 days - as such the mentioned files are deleted after 10 days from the start of the application, potentially leading to a crash of the HANA application.
In order to avoid this situation, please edit /etc/cron.daily/tmpwatch and add exclude entries like the following:
-X '/tmp/.hdb*lock' -X '/tmp/.sapstartsrv*.log'
More detailed information can be found in the following Red Hat Knowledgebase article: https://access.redhat.com/solutions/1323663 (Red Hat customer portal login required)
- Distributed installation of HANA fails after updating package libssh2 to version 1.4.2-1.el6_6.1.x86_64.Version
1.4.2-1.el6_6.1.x86_64 triggers an incompatibility with different
libssl and libcrypto versions. Please downgrade libssh2 to version
libssh2-1.4.2-1.el6.x86_64. More detailed information can be found in
the following Red Hat Knowledgebase Article: https://access.redhat.com/solutions/1370033 (Red Hat customer portal login required)
- HANA fails to start after updating package nss-softokn-freebl to version 3.14.3-17Version 3.14.3-17 of package nss-softokn-freebl triggers a bug in GlibC that hinders HANA to start.
Please update to glibc-2.12-1.149.el6_6.4 or newer and nss-softokn-freebl to 3.14.3-19.el6_6 in order to resolve the problem. More detailed information can be found in the following Red Hat Knowledgebase Article: https://access.redhat.com/solutions/1236813 (Red Hat customer portal login required).
- Database startup fails with an error message "/etc/sudoers
mismatch for required permissions of Storage Connector" when using
hdb_ha.fcClientLVMAppend the following lines to the file /etc/sudoers file, replacing <sidadm> by the respective user name:
Cmnd_Alias SIDALIAS = /sbin/multipath, /sbin/multipathd, /etc/init.d/multipathd, /usr/bin/sg_persist, /bin/mount, /bin/umount, /bin/kill, /usr/bin/lsof, /sbin/vgchange, /sbin/vgscan
Defaults!SIDALIAS !requiretty
<sidadm> ALL=NOPASSWD: SIDALIAS - Patch for NFSv4 locking problem
When using NFSv4 for HANA persistence in multi-node environments, a NFSv4 locking problem can lead to data corruption in split brain situations.
In order to avoid this problem, please update your system, at least to kernel version 2.6.32-431.29.2.el6.x86_64.
Please note: All mentioned changes require root access on operating system level. Future implementations might lead to changes of these recommendations.
Header Data
Released On | 28.09.2015 14:02:09 | ||
Release Status | Released for Customer | ||
Component | HAN-DB SAP HANA Database | ||
Other Components |
| ||
Priority | Recommendations / Additional Info | ||
Category | Consulting |
No comments:
Post a Comment