Skip to main content
NetApp Solutions SAP

Host setup

Contributors netapp-mschoen kevin-hoke

All the host-setup 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 12 SP1, the kernel parameter must be set in a configuration file in the /etc/sysctl.d directory. For example, you must create a configuration file with the name 91-NetApp-HANA.conf.

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
sunrpc.tcp_max_slot_table_entries = 128
Note Saptune, included in SLES for SAP OS versions, can be used to set these values. For more information, see SAP Note 3024346 (requires SAP login).

Configuration parameters for Red Hat Enterprise Linux 7.2 or later

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

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, you must create a configuration file with the name 91-NetApp-HANA.conf.

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
sunrpc.tcp_max_slot_table_entries = 128
Note Since RedHat Enterprise Linux version 8.6, the settings can be also applied by using the RHEL System Roles for SAP (Ansible). See SAP Note 3024346 (requires SAP login).

Create subdirectories in /hana/shared volume

Note The following 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 following 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 you must use for the different files 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, don’t 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 in case of 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 NFS transfer size with ONTAP 9 NFS transfer size with ONTAP 8

rw, bg, hard, timeo=600, noatime

nfsvers=3,nolock

nfsvers=4.1,lock

rsize=1048576,wsize=262144

rsize=65536,wsize=65536

Note To improve read performance with NFSv3, NetApp recommends 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 showed that nconnect=4 provides good read results for the data volumes. Log writes might benefit from a lower number of sessions, such as nconnect=2. Shared volumes may benefit as well from using the 'nconnect' option. Be aware that the first mount from an NFS server (IP address) defines the amount of sessions being used. Further mounts to the same IP address do not change this even if a different value is used for nconnect.
Note Starting with ONTAP 9.8 and SUSE SLES15SP2 or RedHat RHEL 8.4 or higher, NetApp supports the nconnect option also for NFSv4.1. For additional information, check the Linux vendor documentation.
Note If nconnect is being used with NFSV4.x the amount of NFSv4.x session slots should be adjusted according to the following rule:
Amount of session slots equals <nconnect value> x 64.
At the host this will be adjuseted by
echo options nfs max_session_slots=<calculated value> > /etc/modprobe.d/nfsclient.conf
followed by a reboot. The server side value must be adjusted as well, set the number of session slots as described in NFS configuration for NFSv4.

The following example shows a single host SAP HANA database with SID=NF2 using NFSv3 and an NFS transfer size of 1MB for reads and 256k for writes. To mount the file systems during system boot with the /etc/fstab configuration file, complete the following steps:

  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,nfsvers=3,hard,timeo=600,nconnect=4,rsize=1048576,wsize=262144,bg,noatime,nolock 0 0
    <storage-vif-log01>:/NF2_log_mnt00001 /hana/log/NF2/mnt00001 nfs rw,nfsvers=3,hard,timeo=600,nconnect=2,rsize=1048576,wsize=262144,bg,noatime,nolock 0 0
    <storage-vif-data01>:/NF2_shared/usr-sap /usr/sap/NF2 nfs rw,nfsvers=3,hard,timeo=600,nconnect=4,rsize=1048576,wsize=262144,bg,noatime,nolock 0 0
    <storage-vif-data01>:/NF2_shared/shared /hana/shared nfs rw,nfsvers=3,hard,timeo=600,nconnect=4,rsize=1048576,wsize=262144,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 for reads and 256k for writes 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.
    stlrx300s8-5:/ # cat /etc/fstab
    <storage-vif-data01>:/NF2_data_mnt00001 /hana/data/NF2/mnt00001 nfs  rw,nfsvers=4.1,hard,timeo=600,nconnect=4,rsize=1048576,wsize=262144,bg,noatime,lock 0 0
    <storage-vif-data02>:/NF2_data_mnt00002 /hana/data/NF2/mnt00002 nfs rw,nfsvers=4.1,hard,timeo=600,nconnect=4,rsize=1048576,wsize=262144,bg,noatime,lock 0 0
    <storage-vif-log01>:/NF2_log_mnt00001 /hana/log/NF2/mnt00001 nfs rw,nfsvers=4.1,hard,timeo=600,nconnect=2,rsize=1048576,wsize=262144,bg,noatime,lock 0 0
    <storage-vif-log02>:/NF2_log_mnt00002 /hana/log/NF2/mnt00002 nfs rw,nfsvers=4.1,hard,timeo=600,nconnect=2,rsize=1048576,wsize=262144,bg,noatime,lock 0 0
    <storage-vif-data02>:/NF2_shared/usr-sap-host1 /usr/sap/NF2 nfs rw,nfsvers=3,hard,timeo=600,nconnect=4,rsize=1048576,wsize=262144,bg,noatime,nolock 0 0
    <storage-vif-data02>:/NF2_shared/shared /hana/shared nfs rw,nfsvers=3,hard,timeo=600,nconnect=4,rsize=1048576,wsize=262144,bg,noatime,nolock 0 0
  2. Run mount –a to mount the file systems on all hosts.