How to optimize SAP kernel performance on AIX
Running your SAP system with optimal performance should always be a goal for SAP basis and AIX system administrators. Making most effective use of the available hardware and IBM POWER virtualization features helps you to achieve optimal system response times for users.
Typically, your SAP system will run in a distributed configuration where the database server runs on a separate server and your SAP application server instances run on one or more servers.
In this article I want to draw your attention to three methodologies that can be used to achieve optimal performance when running your SAP NetWeaver Application Server for ABAP on AIX:
- Follow the recommendations from the SAP on AIX Best Practices Guide
- Exploit AIX 64K memory pages
- NEW: Use the optimized SAP kernel 785
The first two bullets are established best practices that you may already know. They apply to all currently supported SAP NetWeaver releases as well as S/4HANA application servers on AIX.
The third recommendation highlights a change that has only recently been introduced in SAP kernel 785 for SAP S/4HANA 2020 and SAP S/4HANA 2021.
Let’s go into a bit more detail on the above points:
Follow the recommendations from the SAP on AIX Best Practices Guide
The “SAP on AIX Best Practices Guide” (https://www.ibm.com/support/pages/node/6355545) has been around for quite some time and was updated in 2021 to include the latest POWER hardware, software and SAP kernel information.
Consult this guide when setting up a new SAP system or in order to check if your current system is running with optimal configuration.
Exploit AIX 64K memory pages
As a default, the SAP kernel on AIX uses 4K page sizes for its Data, Stack, Text and Shared Memory regions. SAP ABAP application server instances can be configured to use 64K instead of 4K pages. SAP Note 1387644 – Using 64 KB Virtual Memory Pages Sizes on AIX describes how to do this.
Using 64K pages instead of 4K pages can save CPU cycles when accessing the TLB (translation lookaside buffer). This resulted in CPU savings of up to 5% in our internal tests with a standard transactional SAP workload.
You can check the currently active setting on a running application server instance as follows.
Issue the following command and search for lines containing the SAP kernel executable disp+work:
> ps -eZ PID TTY TIME DPGSZ SPGSZ TPGSZ SHMPGSZ CMD 7078172 - 0:03 4K 4K 4K 4K disp+work
Note: 64K pages come with a moderately increased overall memory footprint for the SAP kernel. Please check the memory footprint for your system and your specific workload in a test system before switching from 4K to 64K pages.
NEW: Use the optimized SAP kernel 785
SAP kernel 785 is the basis for S/4HANA 2021 and was first shipped to customers in Oct. 2021. Since PL100, it can be used as downwards compatible kernel for SAP S/4HANA 2020 (see SAP Note 2907361 – Release Roadmap for Kernel 77x and 78x).
While SAP kernel 781 can be run on AIX 7.1 under certain special conditions, SAP kernel 785 requires a minimum AIX level of AIX 7.2 TL4 SP1 (see SAP Note 1780629 – AIX: Minimal OS Requirements for SAP Kernel)
AIX 7.1 was supported on POWER hardware as low as POWER4, whereas the minimum hardware requirement for AIX 7.2 was raised to POWER7 as shown in the following matrix:
The source and latest version of the above matrix can be found at: http://www14.software.ibm.com/webapp/set2/sas/f/genunix3/AIX_Levels_modes.pdf.
For more details on AIX 7.2 see https://www.ibm.com/docs/en/aix/7.2?topic=aix-release-notes.
What is NEW ?
With the new minimum POWER7 hardware requirement for AIX 7.2, we changed the compile options for SAP kernel 785 on AIX to exploit more efficient hardware instructions which come with POWER7 or later hardware.
The first 785 kernel Patch Level that was built with these changed options is 785 PL115.
Subsequent patch levels and Stack kernel PL200 are built with the same options.
What benefit can you expect ?
Our internal benchmarks show a performance gain of about 10% on POWER8 and 20% on POWER9 when running the optimized kernel PL115 compared to earlier kernel patch levels.
As it is the case with every benchmark: your mileage might vary, so this improvement may not show up 1-1 in your scenario and specific SAP workload.
Kernel 781 PL310 and later patch levels are built with an improved optimization as well. You can expect similar CPU savings as for kernel 785.
Especially when running on POWER9 or POWER10 servers, we recommend that you switch to 785 PL115 or higher to benefit from the lower CPU consumption and thus the more efficient use of your POWER hardware.
Following the above hints and recommendations will allow you to make more efficient use of your hardware and can improve responsiveness of your SAP system.
Please post comments and let us know your experiences and the results that you see after implementing the recommendations.