Host setup

Contributors Download PDF of this page

All the steps described in this section are valid for both SAP HANA environments on physical servers and for SAP HANA running on VMware vSphere.

Configuration parameter for SUSE Linux Enterprise Server

Additional kernel and configuration parameters at each SAP HANA host must be adjusted for the workload generated by SAP HANA.

SUSE Linux Enterprise Server 12 and 15

Starting with SUSE Linux Enterprise Server (SLES) 12 SP1, the kernel parameter must be set in a configuration file in the /etc/sysctl.d directory. For example, a configuration file with the name 91-NetApp-HANA.conf must be created.

net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 131072 16777216
net.ipv4.tcp_wmem = 4096 16384 16777216
net.core.netdev_max_backlog = 300000
net.ipv4.tcp_slow_start_after_idle=0
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
Note Saptune, which is included in SLES for SAP OS versions, can be used to set these values. See SAP Note 3024346 (requires SAP login).

If NFSv3 is used for connecting the storage, the sunrpc.tcp_max_slot_table_entries parameter must be set in /etc/modprobe.d/sunrpc.conf. If the file does not exist, it must first be created by adding the following line:

options sunrpc tcp_max_slot_table_entries=128

Configuration parameter for Red Hat Enterprise Linux 7.2 or later

You must adjust additional kernel and configuration parameters at each SAP HANA host must for the workload generated by SAP HANA.

If NFSv3 is used for connecting the storage, you must set the parameter sunrpc.tcp_max_slot_table_entries in /etc/modprobe.d/sunrpc.conf. If the file does not exist, you must first create it by adding the following line:

options sunrpc tcp_max_slot_table_entries=128

Starting with Red Hat Enterprise Linux 7.2, you must set the kernel parameters in a configuration file in the /etc/sysctl.d directory. For example, a configuration file with the name 91-NetApp-HANA.conf must be created.

net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 131072 16777216
net.ipv4.tcp_wmem = 4096 16384  16777216
net.core.netdev_max_backlog = 300000
net.ipv4.tcp_slow_start_after_idle=0
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1

Create subdirectories in /hana/shared volume

Note The examples show an SAP HANA database with SID=NF2.

To create the required subdirectories, take one of the following actions:

  • For a single- host system, mount the /hana/shared volume and create the shared and usr-sap subdirectories.

sapcc-hana-tst-06:/mnt # mount <storage-hostname>:/NF2_shared /mnt/tmp
sapcc-hana-tst-06:/mnt # cd /mnt/tmp
sapcc-hana-tst-06:/mnt/tmp # mkdir shared
sapcc-hana-tst-06:/mnt/tmp # mkdir usr-sap
sapcc-hana-tst-06:mnt/tmp # cd ..
sapcc-hana-tst-06:/mnt # umount /mnt/tmp
  • For a multiple-host system, mount the /hana/shared volume and create the shared and the usr-sap subdirectories for each host.

    The example commands show a 2+1 multiple-host HANA system.

sapcc-hana-tst-06:/mnt # mount <storage-hostname>:/NF2_shared /mnt/tmp
sapcc-hana-tst-06:/mnt # cd /mnt/tmp
sapcc-hana-tst-06:/mnt/tmp # mkdir shared
sapcc-hana-tst-06:/mnt/tmp # mkdir usr-sap-host1
sapcc-hana-tst-06:/mnt/tmp # mkdir usr-sap-host2
sapcc-hana-tst-06:/mnt/tmp # mkdir usr-sap-host3
sapcc-hana-tst-06:/mnt/tmp # cd ..
sapcc-hana-tst-06:/mnt # umount /mnt/tmp

Create mount points

Note The examples show an SAP HANA database with SID=NF2.

To create the required mount point directories, take one of the following actions:

  • For a single-host system, create mount points and set the permissions on the database host.

sapcc-hana-tst-06:/ # mkdir -p /hana/data/NF2/mnt00001
sapcc-hana-tst-06:/ # mkdir -p /hana/log/NF2/mnt00001
sapcc-hana-tst-06:/ # mkdir -p /hana/shared
sapcc-hana-tst-06:/ # mkdir -p /usr/sap/NF2
sapcc-hana-tst-06:/ # chmod –R 777 /hana/log/NF2
sapcc-hana-tst-06:/ # chmod –R 777 /hana/data/NF2
sapcc-hana-tst-06:/ # chmod -R 777 /hana/shared
sapcc-hana-tst-06:/ # chmod -R 777 /usr/sap/NF2
  • For a multiple-host system, create mount points and set the permissions on all worker and standby hosts.

    The following example commands are for a 2+1 multiple-host HANA system.

    • First worker host:

sapcc-hana-tst-06:~ # mkdir -p /hana/data/NF2/mnt00001
sapcc-hana-tst-06:~ # mkdir -p /hana/data/NF2/mnt00002
sapcc-hana-tst-06:~ # mkdir -p /hana/log/NF2/mnt00001
sapcc-hana-tst-06:~ # mkdir -p /hana/log/NF2/mnt00002
sapcc-hana-tst-06:~ # mkdir -p /hana/shared
sapcc-hana-tst-06:~ # mkdir -p /usr/sap/NF2
sapcc-hana-tst-06:~ # chmod -R 777 /hana/log/NF2
sapcc-hana-tst-06:~ # chmod -R 777 /hana/data/NF2
sapcc-hana-tst-06:~ # chmod -R 777 /hana/shared
sapcc-hana-tst-06:~ # chmod -R 777 /usr/sap/NF2
  • Second worker host:

sapcc-hana-tst-07:~ # mkdir -p /hana/data/NF2/mnt00001
sapcc-hana-tst-07:~ # mkdir -p /hana/data/NF2/mnt00002
sapcc-hana-tst-07:~ # mkdir -p /hana/log/NF2/mnt00001
sapcc-hana-tst-07:~ # mkdir -p /hana/log/NF2/mnt00002
sapcc-hana-tst-07:~ # mkdir -p /hana/shared
sapcc-hana-tst-07:~ # mkdir -p /usr/sap/NF2
sapcc-hana-tst-07:~ # chmod -R 777 /hana/log/NF2
sapcc-hana-tst-07:~ # chmod -R 777 /hana/data/NF2
sapcc-hana-tst-07:~ # chmod -R 777 /hana/shared
sapcc-hana-tst-07:~ # chmod -R 777 /usr/sap/NF2
  • Standby host:

sapcc-hana-tst-08:~ # mkdir -p /hana/data/NF2/mnt00001
sapcc-hana-tst-08:~ # mkdir -p /hana/data/NF2/mnt00002
sapcc-hana-tst-08:~ # mkdir -p /hana/log/NF2/mnt00001
sapcc-hana-tst-08:~ # mkdir -p /hana/log/NF2/mnt00002
sapcc-hana-tst-08:~ # mkdir -p /hana/shared
sapcc-hana-tst-08:~ # mkdir -p /usr/sap/NF2
sapcc-hana-tst-08:~ # chmod -R 777 /hana/log/NF2
sapcc-hana-tst-08:~ # chmod -R 777 /hana/data/NF2
sapcc-hana-tst-08:~ # chmod -R 777 /hana/shared
sapcc-hana-tst-08:~ # chmod -R 777 /usr/sap/NF2

Mount file systems

Different mount options must be used depending on the NFS version and ONTAP release. The following file systems must be mounted to the hosts:

  • /hana/data/SID/mnt0000*

  • /hana/log/SID/mnt0000*

  • /hana/shared

  • /usr/sap/SID

The following table shows the NFS versions that must be used for the different file systems for single-host and multiple-host SAP HANA databases.

File systems SAP HANA single host SAP HANA multiple hosts

/hana/data/SID/mnt0000*

NFSv3 or NFSv4

NFSv4

/hana/log/SID/mnt0000*

NFSv3 or NFSv4

NFSv4

/hana/shared

NFSv3 or NFSv4

NFSv3 or NFSv4

/usr/sap/SID

NFSv3 or NFSv4

NFSv3 or NFSv4

The following table shows the mount options for the various NFS versions and ONTAP releases. The common parameters are independent of the NFS and ONTAP versions.

Note SAP LaMa requires the /usr/sap/SID directory to be local. Therefore, do not mount an NFS volume for /usr/sap/SID if you are using SAP LaMa.

For NFSv3, you must switch off NFS locking to avoid NFS lock cleanup operations if there is a software or server failure.

With ONTAP 9, the NFS transfer size can be configured up to 1MB. Specifically, with 40GbE or faster connections to the storage system, you must set the transfer size to 1MB to achieve the expected throughput values.

Common parameter NFSv3 NFSv4 NFSv4.1 NFS transfer size with ONTAP 9 NFS transfer size with ONTAP 8

rw, bg, hard, timeo=600, noatime,

vers=3,nolock,

vers=4,minorversion=0,lock

vers=4,minorversion=1,lock

rsize=1048576,wsize=1048576,

rsize=65536,wsize=65536,

Note To improve read performance with NFSv3, it is recommended that you use the nconnect=n mount option, which is available with SUSE Linux Enterprise Server 12 SP4 or later and RedHat Enterprise Linux (RHEL) 8.3 or later.
Note Performance tests show that nconnect=8 provides good read results. Log writes might benefit from a lower number of sessions, such as nconnect=2. Be aware that the first mount from an NFS server (IP address) defines the amount of sessions being used. Further mounts do not change this, even if different values are used for nconnect.
Note Starting with ONTAP 9.8 and SUSE SLES15SP2 or RedHat RHEL 8.3 or higher, NetApp supports the nconnect option for NFSv4.1. For additional information, check the Linux vendor documentation.

To mount the file systems during system boot with the /etc/fstab configuration file, complete the following steps:

The following example shows a single host SAP HANA database with SID=NF2 using NFSv3 and an NFS transfer size of 1MB.

  1. Add the required file systems to the /etc/fstab configuration file.

    sapcc-hana-tst-06:/ # cat /etc/fstab
    <storage-vif-data01>:/NF2_data_mnt00001 /hana/data/NF2/mnt00001 nfs rw,vers=3,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,nolock 0 0
    <storage-vif-log01>:/NF2_log_mnt00001 /hana/log/NF2/mnt00001 nfs rw,vers=3,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,nolock 0 0
    <storage-vif-data01>:/NF2_shared/usr-sap /usr/sap/NF2 nfs rw,vers=3,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,nolock 0 0
    <storage-vif-data01>:/NF2_shared/shared /hana/shared nfs rw,vers=3,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,nolock 0 0
  2. Run mount –a to mount the file systems on all hosts.

The next example shows a multiple-host SAP HANA database with SID=NF2 using NFSv4.1 for data and log file systems and NFSv3 for the /hana/shared and /usr/sap/NF2 file systems. An NFS transfer size of 1MB is used.

  1. Add the required file systems to the /etc/fstab configuration file on all hosts.

    Note The /usr/sap/NF2 file system is different for each database host. The following example shows /NF2_shared/usr- sap- host1.
    sapcc-hana-tst-06:/ # cat /etc/fstab
    <storage-vif-data01>:/NF2_data_mnt00001 /hana/data/NF2/mnt00001 nfs rw,vers=4, minorversion=1,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,lock 0 0
    <storage-vif-data02>:/NF2_data_mnt00002 /hana/data/NF2/mnt00002 nfs rw,vers=4, minorversion=1,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,lock 0 0
    <storage-vif-log01>:/NF2_log_mnt00001 /hana/log/NF2/mnt00001 nfs rw,vers=4, minorversion=1,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,lock 0 0
    <storage-vif-log02>:/NF2_log_mnt00002 /hana/log/NF2/mnt00002 nfs rw,vers=4, minorversion=1,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,lock 0 0
    <storage-vif-data02>:/NF2_shared/usr-sap-host1 /usr/sap/NF2 nfs rw,vers=3,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,nolock 0 0
    <storage-vif-data02>:/NF2_shared/shared /hana/shared nfs rw,vers=3,hard,timeo=600,rsize=1048576,wsize=1048576,bg,noatime,nolock 0 0
  2. Run mount –a to mount the file systems on all hosts.