8 Tuning systems with saptune
#
This chapter provides information about tuning SUSE Linux Enterprise Server for SAP Applications to work optimally with SAP applications.
Using saptune
, you can tune a system for SAP NetWeaver, SAP HANA/SAP BusinessObjects, and
SAP S/4HANA applications.
8.1 Installing and updating saptune
#
To install saptune
, run the zypper install saptune
command.
When installation is completed, enable and start the saptune
service (see Section 8.2, “Enabling and disabling saptune
”) and configure the tuning (see Section 8.3, “Configuring the tuning”).
To update saptune
, use the zypper update saptune
command.
When installing and updating saptune
, pay attention to zypper output to ensure that installation and updates are performed correctly. The output is also saved in /var/log/zypp/history
.
8.2 Enabling and disabling saptune
#
To tune the system after a reboot, enable and start the saptune
service after installation. In most cases, starting the saptune
service fails, because sapconf
already tunes the system. To solve the problem, run the following command:
#
saptune service takeover
This command stops and disables the sapconf
and tuned
services, and then starts and enables the saptune
service.
To disable and stop the saptune
service, use the command below:
#
saptune service disablestop
8.3 Configuring the tuning #
The easiest way to tune a system is to apply an SAP Solution that matches your installed SAP software. SAP Solutions are a group of SAP Notes that perform the actual tuning. To display all available Solutions and their Notes, run the following command:
#
saptune solution list
saptune
recognizes the following tuning SAP Solutions:
BOBJ Solution for running SAP BusinessObjects
HANA Solution for running an SAP HANA database
MAXDB Solution for running an SAP MaxDB database
NETWEAVER Solution for running SAP NetWeaver application servers
S4HANA-APPSERVER Solution for running SAP S/4HANA Application Servers
S4HANA-APP+DB Solution 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
NETWEAVER+MAXDB Solution for running both SAP application servers and MAXDB on the same host
To apply a Solution, run the following command:
#
saptune solution apply SOLUTION
Keep in mind that only one Solution can be applied at the time.
To disable a Solution, use the command below:
#
saptune solution revert SOLUTION
To switch to a different Solution, use the following command:
#
saptune solution change SOLUTION
Alternatively, you can tune the computer according to recommendations from specific SAP Notes. Use the saptune note list
to view a list of notes that you can tune for.
To apply a Note, run the following command:
#
saptune note apply NOTE
Reverting a Note can be done as follows:
#
saptune note revert NOTE
It is possible to combine Solutions and Notes by reverting Notes from an applied Solution or applying additional ones. However, only one solution can be active at a time. The saptune
service restores the combination of Solution and Notes after a service restart or reboot.
In rare cases, Notes can have conflicting options or parameters. Arrange your Notes carefully to avoid conflicts. The last Note always takes priority over conflicting options or parameters of previous notes. In this situation, create your own Solution (see Section 8.4.2, “Creating a new SAP Note”) or customize the applied Solution (see Section 8.4.1, “Customizing an SAP Note”).
8.4 Managing SAP Notes #
The following sections provide information on working with SAP Notes.
An SAP Note configuration contains the OS-specific part of the original SAP Note as complete as possible. A parameter is disabled (it is present in the configuration, but without value) if it does not have a value recommendation, or if saptune
cannot safely detect the conditions to set the correct value. To set a suitable value, read the corresponding SAP Note and customize the Note (see Section 8.4.1, “Customizing an SAP Note”).
8.4.1 Customizing an SAP Note #
Any SAP Note can be configured using the following command:
#
saptune note customise NOTE
The command opens the default editor (defined in the environment variable EDITOR
) with a copy of the Note configuration. Remove everything, except the parameters you want to change or disable, as well as the header of the section the parameter belongs to.
To change or set the parameter value, change or add the value of the parameter. To disable a parameter, remove the value, but leave the parameter and the =
character. saptune
lists the parameter, but it does not change it or check it for the compliance status.
For more information, refer to the saptune-note(5)
manpage.
This creates a /etc/saptune/override/NOTE
file. It is possible to create the file elsewhere and place it in /etc/saptune/override/
.
Configuration sections can be conditional. This is called tagging. Refer to the saptune-note(5)
for further information.
When you are done customizing a Note, restart the saptune
service to apply the changes.
8.4.2 Creating a new SAP Note #
A new SAP Note can be created using the following command:
#
saptune note create NOTE
The command opens the default editor (defined in the environment variable EDITOR
) with a Note configuration template. All features of saptune
are available here. For more information, refer to the saptune-note(5)
manpage.
This creates a /etc/saptune/extra/NOTE.conf
Note configuration file. It is possible to create the file elsewhere and place it in /etc/saptune/extra/
.
Configuration sections can be conditional. This is called tagging. Refer to the saptune-note(5)
for further information.
8.4.3 Editing a custom SAP Note #
To edit a custom Note, use the command below:
#
saptune note edit NOTE
The command opens the default editor (EDITOR
) with the Note configuration. When you are done editing a Note, restart the saptune
service to apply the changes. Custom Notes can be customized like shipped Notes.
8.4.4 Deleting an SAP Note or a customization #
The following command deletes a note, including the corresponding override file, if available:
#
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:
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 is terminated with the message that the note first needs to be reverted before it can be deleted.
8.4.5 Renaming an SAP Note #
This command allows renaming a created Note to a new name. If a corresponding override file is available, this file is renamed as well:
#
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 is terminated with the information that the Note first needs to be reverted before it can be deleted.
8.4.6 Showing the configuration of an SAP Note #
The configuration of a Note can be listed using the following command:
#
saptune note show NOTE
8.4.7 Verifying an SAP Note #
To verify the tuning of a Note, use the following command:
#
saptune note verify NOTE
For information about the output of the command and verifying the entire tuning instead of a single Note, refer to Section 8.6, “Verification and troubleshooting”.
8.4.8 Performing a dry run of an SAP Note #
To show each parameter of a Note, use the following command:
#
saptune note simulate
The command lists the current system value and the expected values (default and override).
The simulate
command is deprecated since version 3.1 and is removed in all saptune
versions in SUSE Linux Enterprise Server for SAP Applications 16.
8.4.9 Reverting an SAP Note #
To revert an SAP Note, run the following command:
#
saptune note revert NOTE
This restores all parameters of the SAP Note to their values at the time of application.
To revert everything, use the following command:
#
saptune note revert all
8.4.10 Listing all enabled or applied SAP Notes #
To list all enabled SAP Notes, run the following command:
#
saptune note enabled
To list all applied SAP Notes, run the command below:
#
saptune note applied
Both commands are primarily meant for use in scripts.
8.5 Managing SAP Solutions #
This chapter explains how to work with SAP Solutions.
An SAP Solution is a combination of SAP Note configurations grouped logically. It generally represents an SAP product or combination. Applying an SAP Solution effectively applies all SAP Note configurations listed in it. Instructions for listing and setting a solution are provided in Section 8.3, “Configuring the tuning”.
8.5.1 Customizing an SAP Solution #
An SAP Solution can be customized using the following command:
#
saptune solution customise SOLUTION
The command opens the default editor (defined in the environment variable EDITOR
) with a copy of the Solution configuration. Change the Note list for the architecture to your liking. For more information, refer to the saptune-note(5)
manpage.
This creates an override file /etc/saptune/override/SOLUTION.sol
. It is possible to create the file elsewhere and place it in /etc/saptune/override/
.
When you are done customizing an SAP Solution, restart the saptune
service to apply the changes.
8.5.2 Creating a new SAP Solution #
To create a new SAP Solution, run the following command:
#
saptune solution create SOLUTION
The command opens the default editor (defined in the environment variable EDITOR
) with a Solution configuration template. Fill in the template.
This creates a Solution configuration file /etc/saptune/extra/SOLUTION.sol
. It is possible to create the file elsewhere and place it in /etc/saptune/extra/
.
8.5.3 Editing a custom SAP Solution #
To edit a custom SAP Solution, use the following command:
#
saptune solution edit NOTE
The command opens the default editor (defined in the environment variable EDITOR
) with the Solution configuration.
When you are done editing an SAP Solution, restart the saptune service to apply the changes.
Custom Solutions can be customized like shipped Solutions.
8.5.4 Deleting SAP Solution #
The following command deletes a created Solution (in this example, myHANA), including the corresponding override file or the override file of a shipped Solution, if available:
#
saptune solution delete myHANA
Solution to delete is a customer/vendor specific Solution. Do you really want to delete this Solution 'myHANA'? [y/n]: y
The SAP Solution may not be applied at the time. Keep in mind the following:
A confirmation is required to finish the action.
SAP Solutions shipped by
saptune
cannot be deleted. Only the override file is removed, if available.If the SAP Solution is already applied, the command is terminated with the information that the SAP Solution first needs to be reverted before it can be deleted.
8.5.5 Renaming an SAP Solution #
To rename an SAP Solution, run the following command:
#
saptune solution rename myHANA myHANA2
Solution to rename is a customer/vendor specific Solution. Do you really want to rename this Solution 'myHANA' to the new name 'myHANA2'? [y/n]:
The SAP Solution may not be applied at the time. Keep in mind the following points:
A confirmation is needed to finish the action.
SAP Solutions shipped by
saptune
cannot be renamed.If the SAP Solution is already applied, the command will be terminated with the information that the SAP Solution first needs to be reverted before it can be renamed.
8.5.6 Showing the configuration of an SAP Solution #
To list the configuration of an SAP Solution, run the following command:
#
saptune solution show SOLUTION
8.5.7 Switching to another SAP Solution #
Starting with saptune
version 3.1, it is easier to switch to a different solution using the saptune solution change SOLUTION
command.
Keep in mind that internally the current solution is reverted first, and then the new solution is applied. If you have additional notes configured, the order is not preserved.
If the same solution is already applied, no action is taken. Otherwise the current solution gets reverted and the new one applied. The command prompts for confirmation before making the change. This can be disabled by adding the --force
option.
8.5.8 Verifying an SAP Solution #
To verify the tuning of a Solution, use the following command:
#
saptune solution verify SOLUTION
For information about the output of the verify
command and how to verify the entire tuning instead of a single Solution, refer to Section 8.6, “Verification and troubleshooting”.
8.5.9 Performing a dry run of an SAP Solution #
To show all parameters of all Notes belonging to a Solution, use the following command:
#
saptune solution simulate SOLUTION
The command lists the current system value and the expected values (default and override).
The simulate
command is deprecated since 3.1, and it is removed in all saptune
versions in SUSE Linux Enterprise Server for SAP Applications 16.
8.5.10 Reverting an SAP Solution #
To revert an SAP Solution, run the following command:
#
saptune solution revert SOLUTION
The SAP Solution must be applied. This reverts all SAP Notes parts of the SAP Solution that are still applied.
8.5.11 Editing a custom SAP Solution #
To edit a custom SAP Solution, run:
#
saptune solution edit SOLUTION
8.5.12 Listing enabled/applied SAP Solution #
To list an enabled SAP Solution, run:
#
saptune solution enabled
To list an applied SAP Solution, run:
#
saptune solution applied
If SAP Notes from an applied SAP Solution have been reverted, the string (partial)
has been added to the solution name.
Both commands are primarily meant for use in scripts.
8.6 Verification and troubleshooting #
To see the current status of saptune
, run the following command:
#
saptune status
The output contains the following:
status of the
saptune
,sapconf
, andtuned
serviceversion of package and running
saptune
details about configured SAP Solution and SAP Notes
details about staging
status of systemd system state
virtualization environment (new in
saptune
version 3.1)tuning compliance (new in
saptune
version 3.1)
To analyze your saptune
installation, run:
#
saptune check
This command performs the following checks:
check for mandatory or obsolete configuration files
check for RPM leftovers
check if the systemd system state is degraded and list failed units
check the status of the sapconf, saptune and tuned services
If saptune check
warns about a degraded systemd system status, in most cases it has no impact on saptune
. However, failed services require troubleshooting.
The command does not check the tuning itself. To check the tuning, use the command below:
#
saptune note verify
If saptune note verify
is called without specifying a Note, it verifies all currently applied Notes. This allows you to verify your entire current tuning. As an alternative, use the saptune solution verify
command that can also verify all currently applied Notes.
The saptune note verify
command prints a table with all applied Notes, including the following:
SAP Note and version
the parameter
the expected value of the parameter
the value from an Override if one exists
the current system value
the compliance status of the parameter
The last line contains the overall compliance status of the entire tuning.
Some parameters of shipped Notes are disabled, meaning they have empty values in the "Expected" column. In such cases, the SAP Note does not contain a concrete recommendation or saptune
cannot detect the conditions for a recommendation. Read the SAP Note and set the value manually by customizing the Note (see Section 8.4.1, “Customizing an SAP Note”).
If parameters are not compliant, read the footnote if it exists. For some tunings, equivalent parameters exist, for example:
grub:intel_idle.max_cstate
covered byforce_latency
grub:processor.max_cstate
covered byforce_latency
grub:numa_balancing
covered bykernel.numa_balancing
grub:transparent_hugepage
covered byTHP
A restart of the saptune
service fixes the problems, except for non-compliant packages (parameter starts with rpm:
) or GRUB entries (parameter starts with grub:
). saptune
does not install, uninstall or upgrade packages, and it never changes the boot loader.
A typical problem is the sysctl parameters that are handled by saptune
and sysctl. A footnote in the parameter's compliance column indicates if it is also present in one of the sysctl configuration files. Remove the parameter from the sysctl configuration or disable the parameter in saptune
(see Section 8.4.1, “Customizing an SAP Note”) to fix the problem.
Always investigate the cause for the changed tuning and fix it. If saptune
shall not tune certain parameters, you can revert the Note or just disable parameters via an Override (see Section 8.4.1, “Customizing an SAP Note”).
8.7 Machine-readable output #
Starting with version 3.1, saptune
supports machine-readable output (JSON) for the following commands:
saptune [daemon|service] status
saptune note list|verify|enabled|applied
saptune solution list|verify|enabled|applied
saptune status
saptune version
The machine-readable output makes it possible to integrate saptune
into scripts and configuration management solutions.
To generate JSON output, add --format json
as the first option, for example:
>
saptune --format json note applied | jq
{
"$schema": "file:///usr/share/saptune/schemas/1.0/saptune_note_applied.schema.json",
"publish time": "2023-08-29 17:05:45.627",
"argv": "saptune --format json note applied",
"pid": 1538,
"command": "note applied",
"exit code": 0,
"result": {
"Notes applied": [
"941735",
"1771258",
"1980196",
"2578899",
"2684254",
"2382421",
"2534844",
"2993054",
"1656250"
]
},
"messages": []
}
If a command does not yet support JSON output, the command fails with the result
block set to "implemented": false
:
[+]
>
saptune --format json staging status | jq
{
"$schema": "file:///usr/share/saptune/schemas/1.0/saptune_staging_status.schema.json",
"publish time": "2023-08-29 17:08:16.708",
"argv": "saptune --format json staging status",
"pid": 1653,
"command": "staging status",
"exit code": 1,
"result": {
"implemented": false
},
"messages": []
}
8.8 Staging #
It is possible that a new saptune
package can contain both binary changes
(for example, bug fixes) and new or altered SAP Notes and SAP Solutions. In certain situations, it is preferable to deploy bug fixes and new features while leaving modifications to the system configuration out.
With staging enabled, SAP Note and SAP Solution changes in a package update are not activated immediately. They are placed in a staging area, which can be reviewed and released later.
With the current implementation, a package update overwrites the staging if staging is enabled.
Staging is disabled by default, and it can be enabled with the following command:
#
saptune staging enable
From that point, SAP Note and SAP Solution changes shipped by a saptune
package are put in the staging area. To view the staging area, run:
#
saptune staging list
You can print a tabular overview of the differences of the SAP Note and SAP Solution in the staging and working area with the following command:
#
saptune staging diff [NOTE...|SOLUTION...|all]
After reviewing the differences, you can perform an analysis to see if a release has potential issues or requires additional steps. To do this, run the following command:
#
saptune staging analysis [NOTE...|SOLUTION...|all]
To release an SAP Note or an SAP Solution from the staging area, use the command as follows:
#
saptune staging [--force|--dry-run] [NOTE..|SOLUTION...|all]
The command presents an analysis (see saptune staging
analysis
) and carries out the release after asking for
confirmation.
8.9 For more information #
See the following man pages:
man 8 saptune
man 8 saptune-migrate
man 8 saptune-note
Also see the project home page https://github.com/SUSE/saptune/.