Online Tutorials & Training Materials | STechies.com
Register Login

Configure Optimal Settings on SLES 11 SP2/SAP SP2 for running HANA

19 Feb 2016 3:31 pm || 0

How can we configure optimal settings for running SAP HANA on SLES 11 SP2 or SLES 11 for SAP SP2?

Solution

To optimize the use of HANA DB with SLES 11 SP2 or SLES 11 for SAP SP2 with Linux kernel 3.0.X apply the following settings:

Disable transparent hugepages:

With SLES11 SP2 the usage of transparent hugepages 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/init.d/boot.local)

Be aware that in a Scale-Out environment this has to be done on every server in the landscape.

With kernel >= 3.0.80-0.5. 1 a fix for the hanging situation has been provided by suse. With this patch it is not nessesary anymore to disable the transparent hugepages.

Configure C-States for lower latency in Linux:

The Linux kernel 3. 0 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 disableing 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: /etc/sysconfig/bootloader

Edit this file and append the following value to the "DEFAULT_APPEND" parameter value: intel_idle.max_cstate=0

With this a persistent change has been done for potential kernel upgrades and bootloader upgrades. For immediate configuration change, it is also nessesary to append this parameter in the kernel commandline of your current active bootloader located in file: /boot/grub/menu.lst

Append the intel_idle value mentioned above only to the operational kernel's parameter line.

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. With this, it will fall back to the SP1 behaviour.

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.

Patch for XFS locking problem:

If you are using XFS as filesystem for the SAP HANA data-, log- or backupvolume, you should read SAP1867783 - XFS Data Inconsistency Bug with SLES 11 SP2.

All changes require root access. Future implementations might lead to changes of these recommendations.