SAP Fiori for SAP S/4HANA – Performance Optimization and Best Practice – Part 1 Tools and Tracing
As a UX specialist in the SAP S/4HANA Regional Implementation Group, I’m privileged to work with many of our SAP S/4HANA customers. Many of these customers are looking to leverage the business benefits of SAP S/4HANA by implementing SAP Fiori at scale. This means that you need to ensure that your SAP Fiori landscape is optimized for the best performance as this will help you both increase user adoption of SAP Fiori and realize real business benefits.
Good Business Outcomes depend on business users using solutions easily, accurately & efficiently & a prerequisite for this is the optimal performance of SAP Fiori.
Performance refers to the total effectiveness of a computer system, including throughput, individual response time, and availability.
Factors in optimizing performance typically include:
- Network bandwidth, pipeline, latency, HTTP compression, server and bootstrap (CDN) placement
- Web Browser settings and Cache scheduling
- Gateway and SAP Fiori launchpad configuration
- Parallelization and co-deployment of OData services
- CDS View optimization to support data volumes
- Filtering and default values set for specific apps and UIs
- Extension/Build approach for custom-built components
- Patching of Kernel, Unified Rendering and SAPUI5 versions
Run an end-to-end Performance Trace before optimizing to identify the real bottleneck upfront and avoid wasted efforts
Please also refer to the excellent blog below for guidance on preventing the most frequently encountered SAP Fiori Performance issues:
Monitor and tune for performance
- ”It’s no good tuning the engine if you have a flat tire”
- Run a performance trace, identify where the bottlenecks are, then choose appropriate resolutions
This blog post is valid for all versions of SAP S/4HANA and SAP S/4HANA Cloud, private edition.
Disclaimer: This blog post is intended as general guidance only and you should check the embedded links to official SAP documentation which will be updated on a regular basis.
What we will cover in Part 1 Tools and Tracing:
- Introduction to SAP Fiori performance terminology
- Performance tracing tools and techniques
- HTTP tracing and performance decision guidelines
What we will cover in Part 2 Architecture & Other Considerations (link here)
- Architecture considerations that could affect SAP Fiori Performance
- General system performance and how it can affect SAP Fiori Performance
So, you are new to SAP S/4HANA performance terminology?
If so, not a problem , let’s get some terminology clarified to get you started:
User Interaction Step (UIS): This is a dialog step, e.g., click a button and wait until the target screen is displayed and the input fields are ready to for input.
Front End Statistics Record (FESR): Provides UIS related performance monitoring data that can be accessed by using transaction STATS:
- It measures front end and network KPIs and sends the results to server via beacon requests
- It measures not only the E2E response time of UIS, but it can also assign system resource consumption to the individual UIS by using SAP PASSPORT
FESR works for all 4 UI technologies(SAP Fiori, SAP GUI for HTML, and WebDynpro ABAP, WebClientUI) used in SAP S/4HANA
Network Latency: Latency from a general point of view is a time delay between the cause and the effect of some physical change in the system being observed.
Network Bandwidth: The maximum rate of data transfer across a given path.
Request related performance tools
- Statistics display for all systems (STAD)
- Performance Monitor (STATS)
- ABAP Trace (SAT)
- SQL Trace (ST05)
- Gateway statistics using the ‘sap-statistics=true’ URL parameter
- HTTP logs
- Workload and Performance Statistics (ST03N)
- Available Dialog Work Process and Dialog Queue length (/SDF/MON or /SDF/SMON)
- Operating System (Dumps in ST22, Syslog-Errors in SM21)
- Hardware Capacity (ST06)
- Check the ABAP Parameters (Memory Management, Buffer, Work Processes, Communication, SMICM, etc.)
- Check the Database (Statistics and parameters in DBACOCKPIT)
- Check the Web Dispatcher (Configuration for routing, workload, SSL)
- Frontend: browser developer tools
- Network: Browser plug-in, HTTP proxy
NOTE: Further information on the STATS / STATS_FE Performance Monitor transactions can be found in the excellent blog posts here:
- Measure your Application’s Performance and Resource Consumption: Evaluate Statistics Records with Transaction STATS
- Use Transaction STATS_FE to Analyse the Performance of your Web Application
Analyzing ABAP Performance using Trace
You can refer also to the following links to analyze ABAP Performance using transaction code ST05
- Use ST05 to Monitor the Communication of the ABAP Work Process with External Resources
provides an introduction and overview
- ST05: Basic Use
explains the straightforward use of the tool
- Technical Background of Trace Recording and Analysis
describes the technology behind ST05 and how it affect its behavior
- Trace Directory
covers how to save and recover traces
- Activate Trace Recording with Filter
outlines how to control the trace recording
- Aggregate Trace Records
explains the aggregation of individual trace records to get a better overview
- Analyze Individual Trace Records
describes what can be learned about the processing of communication steps
Where and how do you start a performance trace?
The recommended performance analysis procedure starts with an HTTP trace of your performance issue to provide a first level breakdown. This will give you an indication of browser, front end, back end & network performance.
Based on this network trace, you should follow the steps suggested below:
1) Browser Caching? In the first instance check you should check the browser settings are optimized as per SAP Note 2447857 – Fiori Launchpad: How to check browser settings for better performance.
Important Note 1: If a Content Delivery Network is used (see SAP note SAP Note 2526542 – How to load SAPUI5 files from CDN) then problems with Browser Caching are infrequent, however the SAP note is still valid.
Important Note 2: You should use a modern, fast browser such as Google Chrome (do not use Internet Explorer as this is not supported anymore)
2) Network Quality? If your browser settings are OK, the next step is to check the Network Quality, this consists of the Network Latency and the Network Bandwidth:
To measure the Network Latency, you can use the HTTP trace to find the fastest round-trip time which will consist of the server time plus the network time (latency).
- Bandwidth to the next CDN node (for S4H CE)
- Consider parallel data transfers and extract server time
- 1386269*8 / (0,936*1024*1024) = 11,3 Mbps
NOTE: multiply by 1024 for KB and again by 1024 for MB
With CDN sort by Received & take the biggest value with a connection to CDN and the Data Center. Take into account parallel data transfers and be aware of which bandwidth you want to estimate.
Only large data transfers are relevant for bandwidth estimation. NOTE that parallel data transfers also need to be taken into account with your calculations.
If the Network Latency < 200ms & the available bandwidth > 2Mbps then you should reference SAP note
3) Big gaps between OData calls? If you have found that both your browser settings and network quality are OK, large gaps between OData calls indicate a high front end rendering time so the gaps between these OData calls should be closed, in this case it is likely that SAPUI5 development would be required.
4) Long running OData calls? Reduce the server time & shorten the bars, in this case it is likely that OData service development work would be required to reduce the time of the long running calls.
How can you analyse in which SAP Fiori layer the performance issue maybe occurring?
The SAP Gateway has a URL option called ‘sap-statistics=true’, adding this to your OData URL will give YOU a clear and simple breakdown of the time (in milliseconds) spent on the various architecture (Gateway Front End / Back End, Network etc) components, thereby enabling you to focus your efforts in the correct place.
You will get a header that contains the performance statistics in your response. An example of this is shown below:
This response header can also been seen in an HTTP trace. The parameters returned by the ‘sap-statistics=true’ OData URL option are described in the links below:
You can also interpret the sap-statistics parameters from the image below and therefore get a clear understanding of which architecture layer is causing your performance problem(s).
Can software patches affect the performance of your SAP Fiori Landscape?
Yes. You should ensure that software patching, especially Kernel, Unified Rendering, and SAPUI5 patches are at the highest available levels for the ABAP and SAP_UI release, as general performance improvements for UI technologies are typically provided via these patches.
Make sure you understand the UI2 cache
If you see in the network trace long /UI2/PAGE_BUILDER_PERS/ PageSets calls, this request retrieves the all the SAP Fiori Content information linked to the roles assigned to the user. For the user in the example below this is 1.6MB (compressed 51.5 kB), and it was retrieved in 793ms.
You can find in ST03 (go to Web Statistics > WEB Server Statistics and select the PageSets URL) the size for other users of the system, see example below (sorted here descending by total sent, note that this is the compressed size) :
Using this ST03 information YOU can determine the following:
Users with a higher number of calls :
- For these users the cache might be more often invalidated at the server side. Such invalidation can be triggered by transports changing PFCG roles and SAP Fiori Catalogs they are assigned to. In a more stable (productive) system this will not occur so often.
- The browser is not caching this information. (see previous step)
Users who have a high “Total Sent” :
- Have a lot of roles assigned, thereby negatively impacting performance. Check if all roles are necessary or can be deleted from the user.
You can use transaction /UI2/CSU to monitor the cache quality and setup a trace for the cache invalidations.
Setup of SAP Fiori Launchpad
For a fast and efficient SAP Fiori Launchpad, you must ensure the following setup tasks are completed:
- The SAPUI5 application index provides an indexing and caching mechanism for information related to SAPUI5 applications, components, and libraries that are contained in SAPUI5 repositories on the SAP NetWeaver Application Server for ABAP. Schedule the creation of the SAPUI5 application index as a background job using /UI5/APP_INDEX_CALCULATE. Further information can be found here
- For fast loading times of SAP Fiori apps, cache buster tokens are used to cache OData metadata. To ensure the tokens are up-to-date, a report has to be executed periodically. Scheduling Update of OData Metadata Caching. This task list defaults to 1 hour but you can set it as once every 24 hours in production.
Check the following SAP Notes and Blog Posts:
- SAP Fiori for SAP S/4HANA – Troubleshooting Tips and Tricks in S/4HANA On-Premise (NOTE: Check the embedded links in this blog post)
- SAP Fiori Performance Parameters SAP Fiori configuration parameters including for HTTP/2 for performance optimization
- SAP Fiori for SAP S/4HANA Enterprise Search Optimization Configuration parameters for SAP HANA Enterprise Search optimization
- How to analyse query performance for ABAP CDS Views Tips for CDS view performance analysis
- SAP Note 2428755 – E2E Performance monitoring in SAP GUI for HTML Optimization of SAP GUI for HTML
- SAP Note 2456424 – Fiori Launchpad: How to report performance issues with HTTP traces
- SAP Note 2916959 – Fiori Performance Troubleshooting General SAP Fiori troubleshooting
- SAP Note 2881803 – FAQ: S/4HANA Fiori Best Practices – Collective Note
- SAP Note 3097626 – Slow processing of sales documents via WebGUI
Profile Data Analyser:
- Analyse ABAP Performance Traces-with the Profile-Data Analyzer Profile Data Analyser. This is used to analyse server response time. If database analysis is required, then transaction ST05 should be used.
- Changes to the Profile Data Analyser Change log for the Profile Data Analyser
- SAP Note 2881237 – How to collect performance trace for the profile data analyzer
- SAP Note 2879724 How to analyze performance traces with the profile data analyzer
Fiori Launchpad Configuration Parameters can have a significant impact on performance. Especially stateful session and “inplace” navigation parameters:
Role/catalog design and launchpad layout has a direct impact on performance – review the recommendations in:
Conclusion: With these guidelines you will be able to ensure the performance in all layers of your SAP Fiori landscape is optimized – thereby increasing productivity, user satisfaction, customer loyalty & solution adoption.
For Questions and Answers on SAP Fiori – please see the SAP Community Q&A area and feel free to post your own questions.
I hope you found this blog post helpful – feel free to leave comments and feedback, you can follow the SAP Fiori for S/4HANA tag to receive updates on blog posts here.
Becoming an SAP Fiori for SAP S/4HANA guru
You’ll find much more on the community topic page for SAP Fiori for SAP S/4HANA
Other helpful links in the SAP Community:
- Follow our tag SAP S/4HANA RIG for more from the SAP S/4HANA Customer Care and RIG
- See all questions and answers about SAP Fiori for SAP S/4HANA
- Follow SAP Fiori for SAP S/4HANA for more blogs and updates
- Ask a Question about SAP Fiori for SAP S/4HANA
Brought to you by the SAP S/4HANA Customer Care and RIG.