Skip to Content
Author's profile photo Jens Gleichmann

Prepare your Linux for your SAP solution with saptune

First of all for what do you need the tool saptune?

  1. automatically tuning your system without reading tons of SAP notes
  2. ensures that all your SAP systems configured identically with a central solution
  3. create your own customized profiles

Why you have to configure all this parameters?

  1. ensure system performance for your SAP solution like HANA
  2. run a stable system
  3. ensure SAP support for certified solution like HANA

SLES for SAP Applications 12 SP2 now ships with the system tuning utility saptune.
In addition to saptune, the package sapconf contains the basic utility sapconf. sapconf also allows tuning for SAP systems but is less comprehensive and offers less granularity than saptune. However, unlike saptune, sapconf is available directly in SUSE Linux Enterprise Server and thus not dependent on using SLES for SAP.

sapconf and saptune both rely on the daemon tuned to set tuning configuration but they use different (though at times very similar) tuning profiles. Therefore, only one(!) of sapconf _or_ saptune can be enabled at a time.

If you have installed your SLES system with the SAP installation wizard the correct profile is already used.


So we have two tools sapconf and saptune:
sapconf: available in SLES11 and SLES12 (without SLES for SAP Applications subscription)
saptune: available since SLES12 SP2 (only with SLES for SAP Applications subscription)

For both tools check out the official SAP documentation in note 1275776.

More details about the older tool sapconf in Ulrich Schairer’s blog


There is a new reworked sapconf version which can be used since the following versions:

4.1.12-40.47.1 (SLES 12 SP3)
4.1.12-33.15.1 (SLES 12 SP2)
4.1.12-18.24.1 (SLES 12 SP1)

Details from Soeren Schmidt in his blog series:

Installation and dependencies: sapconf – Part 1
Configuration: sapconf – Part 2
Updating: sapconf – Part 3
Deinstallation: sapconf – Part 4
Summary + tips & tricks: sapconf – Part 5

 


How to activate it?

1.List available solutions

1.1 saptune

saptune solution list

 

1.2 sapconf

tuned-adm list


2. Choose a solution (saptune) or profile (sapconf)

2.1 saptune

saptune solution apply SOLUTION

2.2 sapconf

tuned-adm PROFILENAME

3. start daemon

3.1 saptune

saptune daemon start

disable / enable daemon

systemctl disable tuned
systemctl enable tuned

3.2 sapconf

sapconf start

disable daemon

  systemctl disable sapconf tuned

 


4. check active profile

4.1 saptune

saptune daemon status

if saptune is active sapconf/tuned-adm will show the following:

tuned-adm list

 

4.2 sapconf

active profile can be found under
/etc/tuned/active_profile
or

tuned-adm active
tuned-adm list


5. Apply single SAP notes

saptune note list

saptune note [ list | verify ]
saptune note [ apply | simulate | verify | customise | revert ] NoteID

You can apply, simulate, verify, customise and revert such notes. You can also combine solutions and notes.


6. Customize an existing SUSE standard profile (sapconf)

2205917 – SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12

SAP recommendation

cat /usr/lib/tuned/sap-hana/tuned.conf

=> ‘force_latency’ is already set

If you want to add sysctl kernel parameter from other vendors (e.g. VMware for virtualization or NetApp for storage), you can set them in your own profile. Just look into their best practise guides for the recommended parameters. This is only possible with sapconf!

Example:

net.ipv4.tcp_slow_start_after_idle=0

cp /usr/lib/tuned/sap-hana/tuned.conf /etc/tuned/sap-hana/tuned.conf
vi /etc/tuned/sap-hana/tuned.conf

[sysctl]
net.ipv4.tcp_slow_start_after_idle = 0

[bootloader]
cmdline = YOUR_ADDITIONAL_KERNEL_PARAMETERS

[script]
script = /usr/lib/tuned/sap-hana/script.sh

7. Create your own profile (sapconf)

cp /usr/lib/tuned/sap-hana/tuned.conf /etc/tuned/sap-cust/tuned.conf

[sysctl]
parameter = value
[script]
script = /usr/lib/tuned/sap-hana/script.sh

adjust the parameters for your needs – ‘sap-cust’ is the name of the new profile

tuned-adm list

=> you can see two new profiles ‘sap-test’ and ‘sap-cust’


Logfiles:

/var/log/sapconf.log
/var/log/tuned/tuned.log


Details

Delivered SAP Notes

/etc/sysconfig/sap*

Standard Tuned files

/usr/lib/tuned

Important notes

2382421 Optimizing the Network Configuration on HANA- and OS-Level
1868829 Startup Issues Because Number of Active I/O Requests to Queue Exceeds aio-max-nr Limit
2205917 SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12

SAP note 1275776 – Linux: Preparing SLES for SAP environments

Documentation

SLES for SAP 12 SP3

Tuning SAP Applications for SLES with SAPTUNE

SAP documentation: Linux Kernel Parameters

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Soeren Schmidt
      Soeren Schmidt

      Hi,

      thanks for the article. Just a few corrections:

          2. Choose a solution

      saptune solution apply SOLUTION

      or

      tuned-adm PROFILENAME

      This is not the same! Saptune is shipped with only one profile: 'saptune'.
      The other profiles like sap-hana, sap-netweaver, sap-bobj and sap-ase are coming from sapconf and have nothing to do with saptune.

      "saptune daemon start" (you show this comman a few lines later) will set the saptune profile and start/enable tuned.

      Background: The script called in /usr/lib/tuned/saptune/tuned.conf will call "saptune daemon apply" which reads the configuration file
      /etc/sysconfig/saptune and there you will find the configured solution and notes set by "saptune solution apply SOLUTION
      ".

      4) check active profile

      active profile can be found under
      /etc/tuned/active_profile

      or

      tuned-adm active
      tuned-adm list

      Current active profile: sap-netweaver.

      Here again. Saptune and sapconf have been mixed. When saptune is used this should always say:

      Current active profile: saptune.

      To check the enabled notes/solutions 'saptune note|solution list' has to be called.

      6) Switch between profiles

      tuned-adm PROFILENAME

      Again. This is valid for sapconf not saptune.

      Later on you show how to edit your own profile, but again on a sapconf tuned configuration.

      8. Create your own profile
      cp /usr/lib/tuned/sap-hana/tuned.conf /etc/tuned/sap-cust/tuned.conf

      [sysctl]
      parameter = value
      [script]
      script = /usr/lib/tuned/sap-hana/script.sh

      Yes, again a sapconf example. 😉

      One advice. If own options are added, it should be checked, that they don't interfere with settings made by the script (in our case saptune or sapconf).

       

      Author's profile photo Jens Gleichmann
      Jens Gleichmann
      Blog Post Author

      Hi Soeren,

      thanks for the input! This is fully correct, but if you don't uninstall sapconf everyone gets this views and status output of the commands. The blog was originally written for both tools, so may be the title is a bit misleading.

      I also love the mix up of sapconf and saptune in note 2205917 🙂 Here is stated out that you should use sapconf and saptune 🙂

      If you uninstall sapconf you will get a better view of what is part of saptune. But to avoid further confusions I will edit the blog and the screenshots in the next weeks for both tools.

      Thanks & Regards,

      Jens

       

       

      Author's profile photo Soeren Schmidt
      Soeren Schmidt

      Hi Jens,

      I also love the mix up of sapconf and saptune in note 2205917 ? Here is stated out that you
      should use sapconf and saptune ?

      To rework this is on my list for next week. Got me! ? The wording is not quite clear I guess. ?
      I have rewritten SAP note 1275776 for the sapconf/saptune purpose. May be you want to have look….

      If you uninstall sapconf you will get a better view of what is part of saptune. But to avoid further confusions I will edit the blog and the screenshots in the next weeks for both tools.

      Cool. For sapconf I will publish a blog series for sapconf (on SUSE and here as well) since our rework of that tool is done and documentation is needed.( wink wink nudge nudge…)

      (( Here is the first article: /https://blogs.sap.com/2018/06/13/sapconf-a-way-to-prepare-a-sles-system-for-sap-workload-part-1/. The other 4 are in review))

      Within the next few month we plan to rework saptune as well to better it. Feedback is welcome…

      Regards,
      Sören

      Author's profile photo Jens Gleichmann
      Jens Gleichmann
      Blog Post Author

      Hi Sören,

      good job! A real documentation in context of SAP usage was missing a long time. Good examples with practice relvance. I have edited my blog and linked your blog series. Also nice to see the dependencies of the tools and daemons.

      I'm looking forward to use the reworked sapconf version in my next projects. The parameters of the profiles are better documented in contrast to saptune.

      Regards,

      Jens

       

      Author's profile photo Soeren Schmidt
      Soeren Schmidt

       

      Thanks, spatune will be next and the result will/shall be as good as sapconf. 😉

      Author's profile photo Wajid Khan
      Wajid Khan

      Hello Jens Gleichmann ,

      Glad to read your blog about saptune & sapconf, I have some queries about saptune.

      1. Is it recommend to configure the saptune in every SAP System(Specially HANA System)?
      2. Can we configure the setting in virtual environment using saptune? I heard there are some setting cannot be modified in virtual environment?

      Thanks

      Wajid

      Author's profile photo Jens Gleichmann
      Jens Gleichmann
      Blog Post Author

      Hi Wajid,

      at first there are some new versions of the tools which should be considered. There are some blog posts from Dennis and Soeren available:

      Regarding your questions:

      1. Yes, I recommend the saptune tool, especially V2, for all SAP systems regardless if application server or HANA. You have to check for special parameters in your setup. It is possible that you have to configure more parameters due to vendor requirements, e.g. storage or hypervisor.
      2. Yes, you can use it also in virtual environment, like the well-known hyperscalers, VMware or IBM Power. As far as I know there are no limitations, because all configured values are inside the linux. This means boot, memory or kernel parameters and which of them couldn't be changed in cause of a virtual environment? As mentioned at point 1.) - there can be additionally parameter settings inside and outside the linux (inside the virtual machine config) which must be configured depending on your environment.

      At least saptune is a perfect base for your system for harmonizing the configuration. Please take attention to the following aspects:

      • check storage vendor recommendations
      • check virtual environment parameters from vendor
      • check third party backup vendor recommendations
      • validate updates of saptune (parameters can change with repository updates and this should be validated before updating all you systems)

      But remember every environment, system or scanerio is different. There is no silver bullet to use one tool to solve all your issues. You still have to validate the settings and verify them on each deployment.

      Regards,

      Jens

      Author's profile photo Roland Kramer
      Roland Kramer

      https://blogs.sap.com/2019/12/16/suse-lets-migrate-saptune-to-version-2/

      Best Regards Roland