SAPTUNE – migration from version 1 to 2 on the example of SAP HANA

Saptune (part of SLES for SAP Applications) – is a configuration tool to prepare a system to run SAP workloads by automatically implementing the recommendations of various SAP notes. Just select the notes you need or choose one of the predefined groups – called solutions.

Migration Steps

The following steps describe the easisest way to migrate from version 1 to version 2.

  1. Determine current solutions and SAP Notes for version 1 and plan the ones for version 2.
Use these commands to get a list of selected solutions and notes.
saptune solution list
saptune note list
hostname:~ # saptune solution list
 2021/04/01 21:18:05 ATTENTION: This is verson 1 of saptune which is deprecated.
 2021/04/01 21:18:05  Please migrate to saptune version 2.
 2021/04/01 21:18:05  Refere to saptune-migrate(7) for more information
 All solutions (* denotes enabled solution):
 BOBJ
 HANA
 MAXDB
 NETWEAVER
 S4HANA-APPSERVER
 S4HANA-DBSERVER
 SAP-ASE 
 Remember: if you wish to automatically activate the solution's tuning options after a reboot,you must instruct saptune to configure "tuned" daemon by running:
     saptune daemon start
 hostname:~ #
hostname:~ # saptune note list
  2021/04/01 21:18:43 ATTENTION: This is verson 1 of saptune which is deprecated.
  2021/04/01 21:18:43 Please migrate to saptune version 2.
  2021/04/01 21:18:43 Refere to saptune-migrate(7) for more information
  All notes (+ denotes manually enabled notes, * denotes notes enabled by solutions):
  1275776 Linux: Preparing SLES for SAP environments (SAP note updated - saptune version 1 does not match anymore. Migrate to saptune version 2 instead)
  1557506 Linux paging improvements
  1984787 SUSE LINUX Enterprise Server 12: Installation notes
  2161991 VMware vSphere (guest) configuration guidelines
  2205917 SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12
  HPE     Recommended_OS_settings
  SAP_ASE SAP_Adaptive_Server_Enterprise
  SAP_BOBJ        SAP_Business_OBJects
  SUSE-GUIDE-01   SLES 12 OS Tuning & Optimization Guide – Part 1 (deprecated since not an official SAP recommendation)
      SUSE-GUIDE-02   SLES 12: Network, CPU Tuning and Optimization – Part 2 (deprecated since not an official SAP recommendation) 
  Remember: if you wish to automatically activate the solution's tuning options after a reboot,you must instruct saptune to configure "tuned" daemon by running:
    saptune daemon start
hostname:~ #

2. (Skip, if saptune defaults are acceptable) Check each chosen SAP Note and former configuration.

Verify that the shipped defaults of version 2 meet your requirements.

Since  saptune  is  running  in  version  1  prior  to  migration  you  cannot  use  'saptune  note show' yet. Please check the files in /usr/share/saptune/notes/ directly.

Verify the version 1 configuration (see SAP NOTES above) for settings to carry over.

For step 8 you need to prepare a list with all parameters that have to be added, altered or disabled.

3. Revert all solutions and notes.

Use the following commands:
 saptune solution revert 
 saptune note revert 
for example:
 saptune solution revert HANA
 saptune solution revert S4HANA-DBSERVER
 saptune note revert 1275776
 saptune note revert 1557506
 saptune note revert 1984787
 saptune note revert 2205917
 saptune note revert HPE ????

Please check if the following variables in /etc/sysconfig/saptune are empty:
TUNE_FOR_SOLUTIONS=""
TUNE_FOR_NOTES=""
NOTE_APPLY_ORDER=""

hostname:~ # cat /etc/sysconfig/saptune
 Path:           SAP/System Tuning/General
 Description:    Global settings for saptune - the comprehensive optimisation management utility for SAP solutions
 ServiceRestart: tuned
 Type:    string
 Default: ""
 #
 When saptune is activated, apply optimisations for these SAP solutions.
 The value is a list of solution names, separated by spaces.
 Run "saptune solution list" to get a comprehensive list of solution names.
 TUNE_FOR_SOLUTIONS=""
 Type:    string
 Default: ""
 #
 When saptune is activated, apply tuning for these SAP notes in addition to those
 already recommended by the above list of SAP solutions.
 The value is a list of note numbers, separated by spaces.
 Run "saptune note list" to get a comprehensive list of note numbers.
 TUNE_FOR_NOTES=""
 Type:    string
 Default: ""
 #
 When saptune is activated, apply tuning for the notes in exactly the below
 order
 The value is a list of note numbers, separated by spaces.
 NOTE_APPLY_ORDER=""
 Type:    string
 Default: "2"
 #
 Version of saptune
 SAPTUNE_VERSION="1"

4. Change saptune version variable to “2”.

Open /etc/sysconfig/saptune in an editor and set the variable SAPTUNE_VERSION from "1" to "2".

5. Remove the configuration directory /etc/tuned/saptune

During the package upgrade a comatibility configuration /etc/tuned/saptune/ was created, which has to be removed to run version 2 properly.

It is possible that it was created manually in the past to alter the configuration.

In this case verify the configuration and extend your future saptune configuration (step 2).

Saptune version 2 performs all tuning settings itself and no longer uses tuned for tuning.

6. Remove files which are not needed anymore.

Please copy each file to a safe location before deleting it! You might need it to check for former configuration values.

- Delete the configuration files SAP_BOBJ-SAP_Business_OBJects.conf and SAP_ASE-SAP_Adaptive_Server_Enterprise.conf.
 rm /etc/saptune/extra/{SAP_BOBJ-SAP_Business_OBJects.conf,SAP_ASE-SAP_Adaptive_Server_Enterprise.conf}

- Delete old note configuration files.
 rm /etc/sysconfig/saptune-note-*
 
- Delete /etc/systemd/logind.conf.d/sap.conf.
Be aware that the file also is used by sapconf and is only created on package installation! Saptune will create it's own  configuration file dynamically, if needed.
rm /etc/systemd/logind.conf.d/sap.conf

- Delete obsolete log directory /var/log/saptune/.
 rm -rf /var/log/saptune/

- Remove 'nofile' entries for @sapsys, @sdba and @dba in /etc/security/limits.conf.
 This is now handled by individual files in /etc/security/limits.d/.
 
- Remove all entries in /etc/sysctl.conf or files in /etc/sysctl.d/*.conf which are handled by saptune.
 Consider moving SAP-related settings from there to a saptune extra file. 

7. Restart tuned.

systemctl restart tuned.service

hostname:/etc # systemctl restart tuned.service
hostname:/etc # systemctl status tuned.service tuned.service - Dynamic System Tuning Daemon
    Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; vendor preset: disabled)
    Active: active (running) since Wed 2021-04-01 22:01:31 CEST; 7s ago
  Main PID: 95512 (tuned)
     Tasks: 5 (limit: 512)
    CGroup: /system.slice/tuned.service
            └─95512 /usr/bin/python -Es /usr/sbin/tuned -l -P

8. Apply the new configuration.

- (Skip, if saptune defaults are acceptable) Create override files for SAP Notes, if you need do change or disable parameters:
 saptune note customize 
 
- (Skip, if saptune defaults are acceptable) Create your own configuration for parameters not coverd by an existing SAP Note:
 saptune note create 

- Apply the chosen solution:
 saptune solution apply 

- Revert any SAP Note of the solution you do not need:
 saptune note revert 

- Apply all aditional SAP Notes:
 saptune note apply  

hostname:/etc # saptune solution apply HANA
     WARNING: GetTuningOptions: no header information found in file "HPE-Recommended_OS_settings.conf"
     WARNING: falling back to old style vendor file names
     WARNING: [block] section detected: Traversing all block devices can take a considerable amount of time.
     WARNING: Be aware: system-wide UserTasksMax is now set to infinity according to SAP recommendations.
 This opens up entire system to fork-bomb style attacks.
 All tuning options for the SAP solution have been applied successfully.

— You can observe that saptune automatically implemented below notes:

hostname:/etc # saptune note list
WARNING: GetTuningOptions: no header information found in file "HPE-Recommended_OS_settings.conf"
WARNING: falling back to old style vendor file names
 All notes (+ denotes manually enabled notes, * denotes notes enabled by solutions, - denotes notes enabled by solutions but reverted manually later, O denotes override file exists for note):
 1410736         TCP/IP: setting keepalive interval
                         Version 4 from 14.12.2017
 1557506         Linux paging improvements
                         Version 14 from 10.08.2015
 1680803         Sybase - SAP Adaptive Server Enterprise
                         Version 24 from 20.11.2017
 1771258         Linux: User and system resource limits
                     Version 5 from 18.06.2018
 1805750         SYB: Usage of HugePages on Linux Systems with Sybase ASE
                     Version 6 from 14.11.2017
 1980196         Setting Linux Kernel Parameter /proc/sys/vm/max_map_count on SAP HANA Systems
                     Version 7 from 18.10.2017
 1984787         SUSE LINUX Enterprise Server 12: Installation notes
                     Version 32 from 26.06.2018
 2161991         VMware vSphere configuration guidelines
                     Version 25 from 14.08.2018
 2205917         SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12
                     Version 57 from 23.04.2019
 2382421         Optimizing the Network Configuration on HANA- and OS-Level
                     Version 33 from 07.05.2019
 2534844         Indexserver Crash During Startup due to Insufficient Shared Memory Segment
                     Version 12 from 15.11.2017
 941735          SAP memory management system for 64-bit Linux systems
                     Version 11 from 04.05.2018
 HPE             Recommended_OS_settings
 SAP_BOBJ        operating system tuning for SAP Business OBJects (BOBJ)
                     Version 0 from 10.03.2017 
current order of applied notes is: 941735 1771258 1980196 1984787 2205917 2382421 2534844

 Remember: if you wish to automatically activate the solution's tuning options after a reboot,you must instruct saptune to configure "tuned" daemon by running:
     saptune daemon start

— additionally I did this:

hostname:/etc # saptune note apply HPE
     WARNING: GetTuningOptions: no header information found in file "HPE-Recommended_OS_settings.conf"
     WARNING: falling back to old style vendor file names
 The note has been applied successfully.

Remember: if you wish to automatically activate the solution's tuning options after a reboot,you must instruct saptune to configure "tuned" daemon by running:
     saptune daemon start

 hostname:/etc #

9. Use saptune verify to check your configuration. Here You can compare expected parameters value with actual:

hostname:# saptune note verify

10. Check the log file /var/log/tuned/tuned.log for any errors.

11. (Optional) Do a reboot and verify that everything works as expected.

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright © 2024. SAPBasisWorld.com Privacy Policy