Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server for SAP Applications 12 SP3

7 Tuning

This chapter presents information about tuning SUSE Linux Enterprise Server for SAP Applications to work optimally with SAP applications.

On SUSE Linux Enterprise Server for SAP Applications you have the choice between sapconf and saptune. However, saptune is the more elaborate tool that offers more features.

Note
Note: The sapconf Command Has Been Removed

In SUSE Linux Enterprise Server and SUSE Linux Enterprise Server for SAP Applications 11 and 12, the sapconf command was included in the package with the same name.

For SUSE Linux Enterprise Server and SUSE Linux Enterprise Server for SAP Applications 15 this has been changed: the command sapconf have been removed from the sapconf package. The package contains a systemd service only. There is no sapconf command line tool anymore, no sapconf/tuned profiles, and no tuned.

7.1 Kernel: Page-Cache Limit

Problem

The kernel swaps out rarely accessed memory pages to use freed memory pages as cache to speed up file system operations, for example during backup operations.

SAP NetWeaver and SAP HANA use large amounts of memory for accelerated access to business data. Parts of this memory are rarely accessed. When a user request needs to access paged-out memory, the response time is poor. It is even worse when an SAP application running on Java incurs a Java garbage collection: The system starts heavy page-in (disk I/O) activity and has a poor response time for an extended period of time.

Solution

SUSE Linux Enterprise Server for SAP Applications includes a kernel tuning option that allows the system administrator to limit the amount of page cache that the kernel uses when there is competition between application memory and page cache. This option tells the kernel that when the page cache is filled to the configured limit, application memory is more important and should thus not be paged out. No pages will be paged out if the memory footprint of the workload plus the configured page-cache limit do not exceed the amount of physical RAM in the system.

These kernel options are available for configuration:

  • vm.pagecache_limit_mb (/proc/sys/vm/pagecache_limit_mb)

  • vm.pagecache_limit_ignore_dirty (/proc/sys/vm/pagecache_limit_ignore_dirty)

Tip
Tip: Use sapconf/saptune to Configure Parameters

The parameters vm.pagecache_limit_mb and vm.pagecache_limit_ignore_dirty are also configured by saptune and sapconf.

For more information, see Section 7.2, “Tuning Systems with sapconf4”, Section 7.3, “Tuning Systems with sapconf 5”, or Section 7.4, “Tuning Systems with saptune.

Important
Important: The Following Are Example Values

The values reproduced in Example 7.1, “Permanently Setting the Page-Cache Limit” are example values only. Do not set the following parameters on a productive system without first trying and calibrating them on a non-productive system.

If your system does not exhibit page-cache limit issues under the workloads it is running, there is no need to adjust these parameters.

For more information, see SAP Note 1557506: Linux Paging Improvements (https://launchpad.support.sap.com/#/notes/1557506).

Example 7.1: Permanently Setting the Page-Cache Limit

For permanent use, add both parameters to /etc/sysctl.conf, for example:

vm.pagecache_limit_mb = 1024
vm.pagecache_limit_ignore_dirty = 2

7.2 Tuning Systems with sapconf4

The package sapconf contains the tuned profiles sap-netweaver, sap-hana, sap-ase and sap-bobj. These tuning profiles set recommended parameters for SAP NetWeaver, SAP HANA, and SAP HANA-based applications.

(The profile sap-netweaver (default) is currently identical to sap-hana. sapconf additionally includes the profiles sap-ase and sap-bobj which are currently not recommended for use.)

sapconf consists of two primary parts:

  • A systemd service that ensures tuned and related services are running and the sapconf-based profile is applied.

  • The tuned profile that applies configured sapconf tuning parameters using a script and configuration files.

To use sapconf, install the package sapconf on your system.

Note
Note: Unified Profiles in SUSE Linux Enterprise Server and SUSE Linux Enterprise Server for SAP Applications 15

In SUSE Linux Enterprise Server and SUSE Linux Enterprise Server for SAP Applications 15 and up, only a single tuned profile, sapconf, is shipped. It is equivalent to the profiles sap-hana/sap-netweaver (both profiles are identical) that are shipped with sapconf in SUSE Linux Enterprise Server for SAP Applications 15.

7.2.1 Enabling and Disabling sapconf and Viewing Its Status

After the installation of sapconf, tuned is enabled and the sap-netweaver profile is activated. However, if another tuned profile is already enabled, sapconf will not enable its own tuned profile. If you previously made other changes to system tuning, these may be overridden by the profile of sapconf.

To make sure sapconf applies all tuning parameters, reboot the machine after installation.

You can inspect or change the status of sapconf as described in the following:

  • To see the status of the service sapconf:

    root # systemctl status sapconf

    The service should be displayed as active (exited), as it is only responsible for starting tuned and will exit afterward.

  • To start the service sapconf and with it the service tuned:

    root # systemctl start sapconf
  • Should sapconf be disabled, enable and start it with:

    root # systemctl enable --now sapconf
  • To stop the service sapconf and with it the service tuned:

    root # systemctl stop sapconf

    As tuned is also terminated at that point, the vast majority of optimizations which do not require a system reboot to disable are disabled immediately.

  • To disable sapconf, use:

    root # systemctl disable sapconf

    If you have not specifically enabled any of the services that sapconf depends on yourself, this will also disable most tuning parameters and all services used by sapconf.

Similarly, you can inspect and change the status of the underlying service tuned:

  • To see the status of the service tuned:

    root # systemctl status tuned
  • To see which tuned profile is currently in use:

    root # tuned-adm active

    If this command does not return the name of the required profile, enable that profile with:

    root # tuned-adm profile sap-netweaver
Tip
Tip: Additional Services that sapconf Relies On

In addition to the sapconf service itself and the tuned service, sapconf also relies on the following two services:

  • sysstat collects data on system activity.

  • uuidd which generates time-based UUIDs that are guaranteed to be unique even in settings where many processor cores are involved. This is necessary for SAP applications.

7.2.2 Configuring sapconf4

In general, the default configuration of sapconf already uses the parameter values recommended by SAP. However, if you have special needs, you can configure the tool to better suit those.

The configuration of sapconf is split in two parts that can be configured in different ways:

/usr/lib/tuned/PROFILE/tuned.conf

Any file that adheres to this pattern can be edited like in Procedure 7.1, “Configuring sapconf4 Profiles”. To configure parameters from this file, copy it to the custom profile directory of tuned under /etc/tuned first and then change values in it. If you change the file in place instead, you will lose the changes you make on the next update of the sapconf package.

The following procedure shows an example how to adapt the file /usr/lib/tuned/sap-netweaver/tuned.conf. However, as written before, this is possible with any profile. Configure the file as described in the following procedure:

Procedure 7.1: Configuring sapconf4 Profiles
  1. Create a new custom tuned profile directory and copy the file tuned.conf:

    root # mkdir /etc/tuned/sap-netweaver
    root # cp /usr/lib/tuned/sap-netweaver/tuned.conf /etc/tuned/sap-netweaver/
  2. Within the newly copied tuned.conf, fix the reference to script.sh to use an absolute path that points to the script from the original profile:

    script = /usr/lib/tuned/sap-netweaver/script.sh

    Do not instead copy script.sh, as that provokes update compatibility issues for sapconf.

  3. Edit the parameters in /etc/tuned/sap-netweaver/tuned.conf.

After each update to sapconf, make sure to compare the contents of the original and the custom tuned.conf.

Log messages related to this file are written to /var/log/tuned/tuned.log.

/etc/sysconfig/sapconf

This file contains most parameters of sapconf. The parameters from this file are applied using the aforementioned script /usr/lib/tuned/PROFILE/script.sh.

This file can be edited directly. All parameters in this file are explained by means of comments and references to SAP Notes which can be viewed at https://launchpad.support.sap.com/.

When sapconf is updated, all customized parameters from this file will be preserved as much as possible. However, sometimes parameters cannot be transferred cleanly to the new configuration file. Therefore, after updating it is advisable to check the difference between the previous custom configuration which during the update is moved to /etc/sysconfig/sapconf.rpmsave and the new version at /etc/sysconfig/sapconf.

Log messages related to this file are written to /var/log/sapconf.log.

When editing either of these files, you will find that some values are commented by means of a # character at the beginning of the line. This means that while the parameter is relevant for tuning, there is no suitable default for it.

Conversely, you can add # characters to the beginning of the line to comment specific parameters. However, you should avoid this practice, as it can lead to sapconf not properly applying the profile.

To apply edited configuration, restart sapconf:

root # systemctl restart sapconf

Confirming that a certain parameter value was applied correctly works differently for different parameters. Hence, the following serves as an example only:

Example 7.2: Checking Parameters

To confirm that the setting for TCP_SLOW_START was applied, do the following:

  • View the log file of sapconf to see whether it applied the value. Within /var/log/sapconf.log, check for a line containing this text:

    Change net.ipv4.tcp_slow_start_after_idle from 1 to 0

    Alternatively, the parameter may have already been set correctly before sapconf was started. In this case, sapconf will not change its value:

    Leaving net.ipv4.tcp_slow_start_after_idle unchanged at 1
  • The underlying option behind TCP_SLOW_START can be manually configured at /proc/sys/net.ipv4.tcp_slow_start_after_idle. To check its actual current value, use:

    root # sysctl net.ipv4.tcp_slow_start_after_idle

7.2.3 Removing sapconf

To remove sapconf from a system, uninstall its package with:

root # zypper rm sapconf

Note that when doing this, dependencies of sapconf will remain installed. However, the services sysstat and tuned will go into a disabled state. If either is still relevant to you, make sure to enable it again.

Certain parameters and files are not removed when sapconf is uninstalled. For more information, see the man page man 7 sapconf, section PACKAGE REQUIREMENTS.

7.2.4 For More Information

The following man pages provide additional information about sapconf:

  • An overview of tuning parameters for the profiles: man 7 profile-sapconf-hana man 7 profile-sapconf-netweaver man 7 profile-sapconf-ase man 7 profile-sapconf-bobj

  • Detailed description of all tuning parameters set by sapconf: man 5 sapconf

  • Information about configuring and customizing the sapconf profile: man 7 sapconf

Also see the blog series detailing the updated version of sapconf at https://www.suse.com/c/a-new-sapconf-is-available/.

7.3 Tuning Systems with sapconf 5

The package sapconf is available in SUSE Linux Enterprise Server and SUSE Linux Enterprise Server for SAP Applications. It sets recommended parameters for the following types of SAP applications: SAP NetWeaver, SAP HANA and SAP HANA-based applications.

Overview of sapconf5 in SUSE® Linux Enterprise Server 12
sapconf5 (without tuned)
  • sapconf-netweaver (sapconf profile as a replacement for tuned profile)

  • sapconf-hana (sapconf profile as a replacement for tuned profile)

  • sapconf-bobj (sapconf profile as a replacement for tuned profile)

  • sapconf-ase (sapconf profile as a replacement for tuned profile)

Overview of sapconf5 in SUSE® Linux Enterprise Server 15
sapconf5 (without tuned)

no profiles anymore

The package sapconf contains the sapconf profiles netweaver, hana, ase and bobj. These profiles set recommended parameters for SAP NetWeaver, SAP HANA, and SAP HANA-based applications.

(The profile netweaver (default) is currently identical to hana. sapconf additionally includes the profiles ase and bobj which are currently not recommended for use.)

To use sapconf, install the package sapconf on your system.

Note
Note: No Profiles in SUSE Linux Enterprise Server and SUSE Linux Enterprise Server for SAP Applications 15

In SUSE Linux Enterprise Server and SUSE Linux Enterprise Server for SAP Applications 15, sapconf no longer supports profiles.

7.3.1 Verifying sapconf setup

With sapconf 5.0.2 onwards the check tool sapconf_check is available, which verifies the correct setup of sapconf. For example:

root # sapconf_check
This is sapconf_check v1.0.
It verifies if sapconf is set up correctly and will give advice to do so.
Please keep in mind:
- This tool does not check, if the tuning itself works correctly.
- Follow the hints from top to down to minimize side effects.
Checking sapconf
================
[ OK ] sapconf package has version 5.0.2
[ OK ] saptune.service is inactive
[ OK ] saptune.service is disabled
[WARN] tuned.service is enabled/active with profile 'virtual-guest -> Sapconf does not require tuned! Run 'systemctl stop tuned.service', if not needed otherwise.
[FAIL] sapconf.service is inactive -> Run 'systemctl start sapconf.service' to activate the tuning now.
[FAIL] sapconf.service is disabled -> Run 'systemctl enable sapconf.service' to activate sapconf at boot.1 warning(s) have been found.
2 error(s) have been found.
Sapconf will not work properly!

If sapconf_check finds problems, it will give hints how to resolve the issue. The tool will not verify if the system has been tuned correctly. It only checks that sapconf is setup correctly and has been started.

7.3.2 Enabling and Disabling sapconf and Viewing It's Status

After the installation of sapconf, the netweaver profile is activated.

To make sure sapconf applies all tuning parameters, reboot the machine after installation.

You can inspect or change the status of sapconf as described in the following:

  • To see the status of the service sapconf:

    root # systemctl status sapconf

    The service should be displayed as active (exited).

  • To start the service sapconf:

    root # systemctl start sapconf
  • Should sapconf be disabled, enable and start it with:

    root # systemctl enable --now sapconf
  • To stop the service sapconf:

    root # systemctl stop sapconf

    The vast majority of optimizations which do not require a system reboot to disable are disabled immediately.

  • To disable sapconf, use:

    root # systemctl disable sapconf

    If you yourself have not specifically enabled any of the services that sapconf depends on, this will also disable most tuning parameters and all services used by sapconf.

  • To see which profile is currently in use:

    • For sapconf 5.0.0:

      root # cat /var/lib/sapconf/act_profile
    • From sapconf 5.0.1 and higher:

      root # cat /run/sapconf_act_profile
  • To change the profile use:

    root # sapconf stop && sapconf PROFILE
Tip
Tip: Additional Services that sapconf Relies On

In addition to the sapconf service the following two services are also relied on:

  • sysstat collects data on system activity.

  • uuidd which generates time-based UUIDs that are guaranteed to be unique even in settings where many processor cores are involved. This is necessary for SAP applications.

7.3.3 Configuring sapconf5

In general, the default configuration of sapconf already uses the parameter values recommended by SAP. However, if you have special needs, you can configure the tool to better suit those.

/etc/sysconfig/sapconf

This file contains all parameters of sapconfand can be edited directly. All parameters in this file are explained by means of comments and references to SAP Notes which can be viewed at https://launchpad.support.sap.com/.

When sapconf is updated, all customized parameters from this file will be preserved as much as possible. However, sometimes parameters cannot be transferred cleanly to the new configuration file. The previous custom configuration is moved to /etc/sysconfig/sapconf.rpmsave during the update. After updating check the difference between the previous custom configuration and the new version at /etc/sysconfig/sapconf.

Log messages related to this file are written to /var/log/sapconf.log.

When editing either of these files, you will find that some values are commented with a # character at the beginning of the line. This means that while the parameter is relevant for tuning, there is no suitable default for it.

Conversely, you can add # characters to the beginning of the line to comment specific parameters. However, you should avoid this practice, as it can lead to sapconf not properly applying the profile.

To apply edited configuration, restart sapconf:

root # systemctl restart sapconf

Confirming that a certain parameter value was applied correctly works differently for different parameters. Hence, the following serves as an example only:

Example 7.3: Checking Parameters

To confirm that the setting for TCP_SLOW_START was applied, do the following:

  • View the log file of sapconf to see whether it applied the value. Within /var/log/sapconf.log, check for a line containing this text:

    Change net.ipv4.tcp_slow_start_after_idle from 1 to 0

    Alternatively, the parameter may have already been set correctly before sapconf was started. In this case, sapconf will not change its value:

    Leaving net.ipv4.tcp_slow_start_after_idle unchanged at 1
  • The underlying option behind TCP_SLOW_START can be manually configured at /proc/sys/net.ipv4.tcp_slow_start_after_idle. To check its actual current value, use:

    root # sysctl net.ipv4.tcp_slow_start_after_idle

7.3.4 Removing sapconf

To remove sapconf from a system, uninstall its package with:

root # zypper rm sapconf

Note that when doing this, dependencies of sapconf will remain installed. However, the sysstat service will go into a disabled state. If it is still relevant to you, make sure to enable it again.

Certain parameters and files are not removed when sapconf is uninstalled. For more information, see the man page man 7 sapconf, section PACKAGE REQUIREMENTS.

7.3.5 For More Information

The following man pages provide additional information about sapconf:

  • An overview of tuning parameters for the profiles: man 7 profile-sapconf-hana man 7 profile-sapconf-netweaver man 7 profile-sapconf-ase man 7 profile-sapconf-bobj

  • Detailed description of all tuning parameters set by sapconf: man 5 sapconf

  • Information about configuring and customizing the sapconf profile: man 7 sapconf

Also see the blog series detailing the updated version of sapconf at https://www.suse.com/c/a-new-sapconf-is-available/.

7.3.6 Using tuned Together with sapconf

With version 5 sapconf does not rely on tuned anymore. This means both tools can be used independently. sapconf will print a warning in it's log if tuned service is started.

Important
Important: Using tuned and sapconf together

If you are going to use tuned and sapconf simultaneously, be very careful, that both tools do not configure the same system parameters.

7.4 Tuning Systems with saptune

Using saptune, you can tune a system for SAP NetWeaver, SAP HANA/SAP BusinessObjects, and SAP S/4HANA applications. This method relies on the system tuning service tuned.

If you used the SAP Installation Wizard to install an SAP application, tuned is usually already active and configured with a profile for the application you installed.

If you did not use the SAP Installation Wizard to install an SAP application, make sure that the packages tuned and saptune are installed on your system.

7.4.1 Enabling saptune to Tune for an SAP Application

  1. To tune a system, first find a tuning solutions. To find the appropriate solution, use:

    tux > saptune solution list

    saptune knows the following tuning solutions (group of SAP notes):

    • BOBJ Solution for running SAP BusinessObjects.

    • HANA Solution for running a SAP HANA database.

    • MAXDB Solution for running a SAP MaxDB database.

    • NETWEAVER Solution for running SAP NetWeaver application servers.

    • S4HANA-APPSERVER Solution for running SAP S/4HANA application servers.

    • S4HANA-APP+DBSolution for running both SAP S/4HANA application servers and SAP HANA on the same host.

    • S4HANA-DBSERVER Solution for running the SAP HANA database of an SAP S/4HANA installation.

    • SAP-ASE Solution for running an SAP Adaptive Server Enterprise database.

    • NETWEAVER+HANA Solution for running both SAP application servers and SAP HANA on the same host.

    Alternatively, you can tune the computer according to recommendations from specific SAP Notes. A list of notes that you can tune for is available via:

    root # saptune note list
    • To set up saptune with a preconfigured solution, use:

      root # saptune solution apply SOLUTION
    • To set up saptune for the recommendations of a specific SAP Note, use:

      root # saptune note apply NOTE
    Note
    Note: Combining Optimizations

    You can combine solutions and notes. However, you can only have one solution. In rare cases, notes can have conflicting options or parameters. To avoid conflicts, order your notes, keeping in mind that the last note always overrides the conflicting options or parameters in previous notes.

  2. To start saptune and enable it at boot, make sure to run the following command:

    root # saptune daemon start

In the background, saptune applies a tuned profile also named saptune that is dynamically customized according to selected solutions and notes. Using tuned-adm list, you can also see this profile.

7.4.2 Customizing a SAP Note

Every SAP note can be configured freely with:

root # saptune note customise

The command includes changing a value or disabling a parameter.

7.4.3 Creating a new SAP Note

It is possible to create a new SAP note with:

root # saptune note create

All features of saptune are available.

7.4.4 Deleting a SAP Note

This command allows to delete a created note, including the corresponding override file if available:

root # saptune note delete test
Note to delete is a customer/vendor specific Note.
Do you really want to delete this Note (test2)? [y/n]: y

The note may not be applied at the time. Keep in mind the following points:

  • A confirmation is needed to finish the action.

  • Internal SAP notes shipped by saptune cannot be deleted. Instead, the override file is removed when available.

  • If the note is already applied, the command will be terminated with the information, that the note first needs to be reverted before it can be deleted.

7.4.5 Renaming a SAP Note

This command allows to rename a created note to a new name. If a corresponding override file is available, this file will be renamed too:

root # saptune note rename test test2
Note to rename is a customer/vendor specific Note.
Do you really want to rename this Note (test) to the new name 'test2'? [y/n]: y

The note may not be applied at the time. Keep in mind the following points:

  • A confirmation is needed to finish the action.

  • Internal SAP notes shipped by saptune cannot be renamed.

  • If the note is already applied, the command will be terminated with the information, that the note first needs to be reverted before it can be deleted.

7.4.6 Showing the Configuration of a SAP Note

The shipped configuration of a note can be listed with:

root # saptune note show

7.4.7 Verifying a SAP Note or a SAP Solution

The command saptune note|solution verify [note] lists for each active or requested note: the parameter name, the exected value (default), a configured override (done by a saptune customise) the current system value and if the current state is compliant to the SAP recommendation or not.

7.4.8 Simulating the Apply of a SAP Note or a SAP Solution

To show each parameter, use:

root # saptune note|solution simulate

It lists the current system value and the expected values (default and override is listed too).

7.4.9 Disabling saptune

To disable saptune and to stop and disable tuned run:

root # saptune daemon stop

7.4.10 Tuning Kernel Parameters Manually Using sysctl

In addition to or instead of tuning kernel parameters using saptune, you can also use sysctl to make manual adjustments to kernel parameters. However, such changes using sysctl do not persist across reboots by default. To make them persist across reboots, add them to the file /etc/sysctl.conf (or another configuration file read by sysctl).

Tip
Tip

If you plan to configure sysctl parameters for your SAP system, consider to use saptune as a central instance for managing your system configuration.

For more information about sysctl, see the man pages sysctl(8), sysctl.conf(5), and sysctl.d(5).

7.4.11 For More Information

See the following man pages:

  • man 8 saptune

  • man 8 saptune_v1

  • man 8 saptune_v2

  • man 8 saptune-migrate

  • man 8 saptune-note

Also see the project home page https://github.com/SUSE/saptune/.

7.5 Tuning Kernel Parameters Manually Using sysctl

In addition to or instead of tuning kernel parameters using sapconf/saptune, you can also use sysctl to make manual adjustments to kernel parameters. However, such changes using sysctl do not persist across reboots by default. To make them persist across reboots, add them to one of the configuration files read by sysctl).

For more information about sysctl, see the man pages sysctl(8), sysctl.conf(5), and sysctl.d(5).

Print this page