From eaf4df041f650cc75ce2fe8e697bca57a12ab694 Mon Sep 17 00:00:00 2001 From: Dmitri Popov Date: Fri, 6 Dec 2024 10:16:26 +0100 Subject: [PATCH] Update saptune --- xml/s4s_tune.xml | 746 ++++++++++++++++++++++++++++------------------- 1 file changed, 446 insertions(+), 300 deletions(-) diff --git a/xml/s4s_tune.xml b/xml/s4s_tune.xml index ae73901a..d7dd9052 100644 --- a/xml/s4s_tune.xml +++ b/xml/s4s_tune.xml @@ -6,254 +6,244 @@ ]> Tuning systems with &saptune; + + + + yes + + - This chapter presents information about tuning &productname; to work + This chapter provides information about tuning &productname; to work optimally with &sap; applications. Using &saptune;, you can tune a system for &netweaver;, &hana;/&bo;, and &s4h; applications. - - - This chapter describes &saptune; version 3 which does not use - &tuned; anymore. - - - Enabling &saptune; + Installing and updating &saptune; - To enable &saptune; to tune an &sap; application, use the following - procedure: + To install &saptune;, run the zypper install saptune command. - - - - To tune a system, first find a tuning solution. To find the appropriate - solution, use: - -&prompt.user;saptune solution list - - &saptune; recognizes the following tuning solutions (groups of &sapnote;s): - - - - - <literal>BOBJ</literal> - - Solution for running &bo;. - - - - - - <literal>HANA</literal> - - Solution for running an &hana; database. - - - - - - <literal>MAXDB</literal> - - Solution for running an &sap; MaxDB database. - - - - - - <literal>NETWEAVER</literal> - - Solution for running &netweaver; application servers. - - - - - - <literal>S4HANA-APPSERVER</literal> - - Solution for running &s4h; application servers. - - - - - - <literal>S4HANA-APP+DB</literal> - - Solution for running both &s4h; application servers and &hana; on the - same host. - - - - - - <literal>S4HANA-DBSERVER</literal> - - Solution for running the &hana; database of an &s4h; installation. - - - - - - - <literal>SAP-ASE</literal> - - Solution for running an &ase; database. - - - - - - <literal>NETWEAVER+HANA</literal> - - Solution for running both &sap; application servers and &hana; on the - same host. - - - - - - <literal>NETWEAVER+MAXDB</literal> - - Solution for running both &sap; application servers and MAXDB on the same host. - - - - - - Alternatively, you can tune the computer according to recommendations - from specific &sapnote;s. A list of notes that you can tune for is - available via: - -&prompt.root;saptune note list - - - - - - To set up &saptune; with a preconfigured solution, use: - -&prompt.root;saptune solution apply SOLUTION - - - - To set up &saptune; for the recommendations of a specific &sapnote;, - use: - -&prompt.root;saptune note apply NOTE - - - - - - To start &saptune; and enable it at boot, make sure to run the following - command: - -&prompt.root;saptune service enablestart - - To make sure that &sapconf; and &tuned; gets stopped and disabled too, - run instead: - - &prompt.root;saptune service takeover - - - - Combining optimizations - - It is possible to combine solutions and notes. However, only one solution can be active at a time. 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. - - + + When installation is completed, enable and start the saptune service (see ) and configure the tuning (see ). + + + 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. + + - Disabling &saptune; + Enabling and disabling &saptune; - To disable and stop &saptune;, run: - + 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: + + +&prompt.root;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: + &prompt.root;saptune service disablestop - - Updating &saptune; - To update saptune to a new version, just update the package. + + Configuring the tuning - Since a package update can contain updates of &sapnote;s and &sapsol;s, - restart &saptune; with saptune service restart to re-apply - the tuning. Check afterwards with saptune note verify - if all recommendations are still met. + The easiest way to tune a system is to apply an &sapsol; that matches your installed &sap; software. &sapsol;s are a group of &sapnote;s that perform the actual tuning. To display all available Solutions and their Notes, run the following command: - - - The &saptune; tool does not rely on &tuned; anymore. - Configuring &tuned; to set up &saptune; 3 will not work. - To start and enable &saptune; 3 use one of the following methods: - - - - saptune service enablestart - - Enables and starts the saptune.service. - - - - saptune service takeover - - Enables and starts the saptune.service and also - disables &sapconf; as well as &tuned;. - - - - saptune daemon start - Deprecated. Gets redirected to &saptune; service takeover. - - - - + +&prompt.root;saptune solution list + + +&saptune; recognizes the following tuning &sapsol;s: + + + + + +BOBJ Solution for running &bo; + + + + +HANA Solution for running an &hana; database + + + + +MAXDB Solution for running an &sap; MaxDB database + + + + +NETWEAVER Solution for running &netweaver; application servers + + + + +S4HANA-APPSERVER Solution for running &s4ha;s + + + + +S4HANA-APP+DB Solution for running both &s4ha;s and &hana; on the same host + + + + +S4HANA-DBSERVER Solution for running the &hana; database of an &s4h; installation + + + + +SAP-ASE Solution for running an &ase; database + + + + +NETWEAVER+HANA Solution for running both &sap; application servers and &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: + + +&prompt.root;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: + + +&prompt.root;saptune solution revert SOLUTION + + +To switch to a different Solution, use the following command: + + +&prompt.root;saptune solution change SOLUTION + + +Alternatively, you can tune the computer according to recommendations from specific &sapnote;s. Use the saptune note list to view a list of notes that you can tune for. + + + +To apply a Note, run the following command: + + +&prompt.root;saptune note apply NOTE + + +Reverting a Note can be done as follows: + + +&prompt.root;saptune note revert NOTE + + +Combining optimizations + +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 ) or customize the applied Solution (see ). + + + Managing &sapnote;s - In the following sections you will learn how to create, delete, and rename - &sapnote;s and much more. + The following sections provide information on working with &sapnote;s. + + +An &sapnote; configuration contains the OS-specific part of the original &sapnote; 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 &sapnote; and customize the Note (see ). Customizing an &sapnote; - Every &sapnote; can be configured freely with: - "customise" is (sadly) correct. - sknorr, 2019-07-19 - toms 2021-10-15: according from Sören, it's the english spelling. - Inofficially, "customize" is also accepted. :) + Any &sapnote; can be configured using the following command: &prompt.root;saptune note customise NOTE - The command includes changing a value or disabling a parameter. + 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. Creating a new &sapnote; - It is possible to create a new &sapnote; with: + A new &sapnote; can be created using the following command: &prompt.root;saptune note create NOTE - All features of &saptune; are available. + 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. + + Editing a custom &sapnote; + + To edit a custom Note, use the command below: + +&prompt.root;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. + + + - Deleting an &sapnote; + Deleting an &sapnote; or a customization - The following command deletes a created note, including the corresponding + The following command deletes a note, including the corresponding override file, if available: &prompt.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: + The note may not be applied at the time. Keep in mind the following: @@ -269,8 +259,8 @@ Do you really want to delete this Note (test2)? [y/n]: y - 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. + 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. @@ -279,14 +269,14 @@ Do you really want to delete this Note (test2)? [y/n]: y Renaming an &sapnote; - This command allows renaming a created note to a new name. If a - corresponding override file is available, this file is renamed, too: + This command allows renaming a created Note to a new name. If a + corresponding override file is available, this file is renamed as well: &prompt.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: + The Note may not be applied at the time. Keep in mind the following points: @@ -301,8 +291,8 @@ Do you really want to rename this Note (test) to the new name 'test2'? [y/n]: y< - 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. + 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. @@ -311,63 +301,40 @@ Do you really want to rename this Note (test) to the new name 'test2'? [y/n]: y< Showing the configuration of an &sapnote; - The shipped configuration of a note can be listed with: + The configuration of a Note can be listed using the following command: &prompt.root;saptune note show NOTE - Verifying an &sapnote; or an &sapsol; + Verifying an &sapnote; - The commands saptune note verify - NOTE and saptune solution - verify SOLUTION list the following - data for each active or requested note: - - - - - The parameter name - - - - - The expected value (default) - - - - - A configured override (created using saptune - customise) - - - - - The current system value - - - - - Whether the current state follows the &sap; recommendation - - - + To verify the tuning of a Note, use the following command: + +&prompt.root;saptune note verify NOTE + +For information about the output of the command and verifying the entire tuning instead of a single Note, refer to . + - Simulating the application of an &sapnote; or an &sapsol; + Performing a dry run of an &sapnote; - To show each parameter of a note, use the following command: - + To show each parameter of a Note, use the following command: + + &prompt.root;saptune note simulate - - The command to show each parameter of a solution is as follows: - -&prompt.root;saptune solution simulate - - The command lists the current system value and the expected values (default - and override). - + + +The command lists the current system value and the expected values (default and override). + + + +Deprecation notice + +The simulate command is deprecated since version 3.1 and is removed in all &saptune; versions in &sles4sap; 16. + + @@ -379,44 +346,86 @@ Do you really want to rename this Note (test) to the new name 'test2'? [y/n]: y< &prompt.root;saptune note revert all - - Editing a &sapnote; - Each custom &sapnote; can be edited by: - &prompt.root;saptune note edit NOTE - - Listing all enabled or applied &sapnote;s - To list all enabled &sapnote;s, run: + To list all enabled &sapnote;s, run the following command: &prompt.root;saptune note enabled - To list all applied &sapnote;s, run: + To list all applied &sapnote;s, run the command below: &prompt.root;saptune note applied + + Both commands are primarily meant for use in scripts. + - + Managing &sapsol;s This chapter explains how to work with &sapsol;s. + +An &sapsol; is a combination of &sapnote; configurations grouped logically. It generally represents an &sap; product or combination. Applying an &sapsol; effectively applies all &sapnote; configurations listed in it. Instructions for listing and setting a solution are provided in . + + + Customizing an &sapsol; + An &sapsol; can be customized using the following command: + &prompt.root;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 &sapsol;, restart the saptune service to apply the changes. + + + Creating a new &sapsol; - To create a new &sapsol;, run: - &prompt.root;saptune solution create SOLUTION + To create a new &sapsol;, run the following command: +&prompt.root;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/. + + + + + Editing a custom &sapsol; + + To edit a custom &sapsol;, use the following command: + + +&prompt.root;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 &sapsol;, restart the saptune service to apply the changes. + + +Custom Solutions can be customized like shipped Solutions. + Deleting &sapsol; - To delete an &sapsol;, run the following command: - &prompt.root;saptune solution delete myHANA + + 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: + +&prompt.root;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 &sapsol; may not be applied at the time. Keep in mind the following points: + The &sapsol; may not be applied at the time. Keep in mind the following: @@ -426,7 +435,7 @@ Do you really want to delete this Solution 'myHANA'? [y/n]: y - &sapsol;s shipped by &saptune; cannot be deleted. + &sapsol;s shipped by &saptune; cannot be deleted. Only the override file is removed, if available. @@ -463,7 +472,7 @@ Do you really want to rename this Solution 'myHANA' to the new name 'myHANA2'? [ If the &sapsol; is already applied, the command will be terminated - with the information, that the &sapsol; first needs to be reverted + with the information that the &sapsol; first needs to be reverted before it can be renamed. @@ -489,6 +498,36 @@ Do you really want to rename this Solution 'myHANA' to the new name 'myHANA2'? [ + + Verifying an &sapsol; + + To verify the tuning of a Solution, use the following command: + +&prompt.root;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 . + + + + +Performing a dry run of an SAP Solution + +To show all parameters of all Notes belonging to a Solution, use the following command: + +&prompt.root;saptune solution simulate SOLUTION + + +The command lists the current system value and the expected values (default and override). + + + +Deprecation notice + +The simulate command is deprecated since 3.1, and it is removed in all &saptune; versions in &sles4sap; 16. + + + + Reverting an &sapsol; To revert an &sapsol;, run the following command: @@ -506,21 +545,24 @@ Do you really want to rename this Solution 'myHANA' to the new name 'myHANA2'? [ Listing enabled/applied &sapsol; - To list enabled &sapsol;, run: + To list an enabled &sapsol;, run: &prompt.root;saptune solution enabled - To list applied &sapsol;, run: + To list an applied &sapsol;, run: &prompt.root;saptune solution applied If &sapnote;s from an applied &sapsol; have been reverted, the string (partial) has been added to the solution name. + + Both commands are primarily meant for use in scripts. + - + Verification and troubleshooting To see the current status of &saptune;, run the following command: - &prompt.root;saptune status +&prompt.root;saptune status The output contains the following: @@ -546,7 +588,140 @@ Do you really want to rename this Solution 'myHANA' to the new name 'myHANA2'? [ - If a problem occurs, use the saptune_check command (in version 3.1, you can also use the command saptune check) that runs checks, reports problems and offers advice on how to solve them. + To analyze your &saptune; installation, run: + + +&prompt.root;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: + + +&prompt.root;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 ). + + + + +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 by force_latency + + + + +grub:processor.max_cstate covered by force_latency + + + + +grub:numa_balancing covered by kernel.numa_balancing + + + + +grub:transparent_hugepage covered by THP + + + + + +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 ) 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 ). @@ -672,35 +847,6 @@ Do you really want to rename this Solution 'myHANA' to the new name 'myHANA2'? [ - - Tuning kernel parameters manually using <command>sysctl</command> - - - 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 one of the configuration files read by sysctl. - - - - <command>sysctl</command> and &saptune; - - If you plan to configure sysctl parameters for your - &sap; system, consider using &saptune; as the central tool for managing - such configurations. - - - - - - For more information about sysctl, see the man pages - sysctl(8), sysctl.conf(5), and - sysctl.d(5). - - - For more information