# 1680803 - SYB: SAP Adaptive Server Enterprise
# - Best Practice for SAP Business Suite and SAP BW
#
# as described in the best practice document appended to the note
# or if outdated look at https://www.sap.com/documents/2016/06/26450353-767c-0010-82c7-eda71af511fa.html
# chapter 3.2 Configuration for Linux
#
# SAP Applications on SAP Adaptive Server Enterprise
# - Best Practices for Migration and Runtime
# Version 1.6 from 2018-01-15
#
# SAP ASE (Sybase)
# Version 24 from 20.11.2017 in English
#
[version]
# SAP-NOTE=1680803 CATEGORY=SYBASE VERSION=24 DATE=20.11.2017 NAME="Sybase - SAP Adaptive Server Enterprise"

[block]
## Type:    string
## Default: noop, none
#
# The default I/O scheduler for single-queued block layer devices offers
# satisfactory performance for wide range of I/O task, however choosing an
# alternative scheduler may potentially yield better latency characteristics
# and throughput.
# "noop" is an alternative scheduler, in comparison to other schedulers it
# may offer more consistent performance, lower computation overhead, and
# potentially higher throughput.
# For most SAP environments (RAID, storage arrays, virtualizaton) 'noop' is
# the better choice.
# With the new introduced multi-queue scheduler for block layer devices the
# recommended I/O scheduler is 'none' as an equivalent to 'noop' for
# single-queued block layer devices.
#
# So IO_SCHEDULER can now contain a comma separated list of possible
# schedulers, which are checked from left to right. The first one which is
# available in /sys/block/<device>/queue/scheduler will be used as new
# scheduler setting for the respective block device.
#
# When set, all block devices on the system will be switched to one of the
# chosen schedulers.
IO_SCHEDULER=noop, none

## Type:    integer
## Default: 1024
#
# IO nr_requests
#
# When set, the number of requests for all block devices on the system will 
# be switched to the chosen value
NRREQ=1024

[vm]
# Disable transparent hugepages (THP)
# changes /sys/kernel/mm/transparent_hugepage/enabled
# 'never' to disable, 'always' to enable
THP=never

[sysctl]
# maximum number of asynchronous I/Os.
fs.aio-max-nr = 1048576

# Increase system file descriptor limit
fs.file-max = 6291456

# Increase Linux autotuning TCP buffer limits
# Set max to 16MB (16777216) for 1GE and 32M (33554432) or 54M (56623104) for 10GE
# Don't set tcp_mem itself! Let the kernel scale it based on RAM.
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216

# Increase the max packet backlog
net.core.netdev_max_backlog = 30000

# Discourage Linux from swapping idle processes to disk (default = 60)
# value between 20 and 10
vm.swappiness = 15

[reminder]
# DBMS data storage settings: use ext4 or xfs file system. 
# For best performance, disable the journal via tune2fs ^has_journal.
# For ext4 the recommended mount options are 'noatime,nodiratime', if journaling is disabled or 'noatime,nodiratime,cache=writeback,barrier=0', if journaling is not disabled
# For xfs the recommended mount options are 'noatime,nodiratime,nobarrier,logbufs=8'
# network tuning including transmit queue (ifconfig <eth#> txqueuelen <value>). See Best_Practices_SAP_ASE_v1.2b.pdf (appended to the SAP Note) for more information or look at https://www.sap.com/documents/2016/06/26450353-767c-0010-82c7-eda71af511fa.html
