4 Tools and Tracing
4.5 Additional Analysis Tools for Support
To complement the standard tools for performance analysis, SAP HANA provides additional analysis tools that SAP Support can use to help determine the cause of performance issues.
The following analysis tools are available in SAP HANA; however, these tools are intended only for use when requested by SAP Support:
● Performance trace
This tool records performance indicators for individual query processing steps in database kernel.
● Kernel profiler
This tool provides information about hotspots and expensive execution paths during query processing.
4.5.1 Performance Trace
The performance trace is a performance tracing tool built into the SAP HANA database. It records
performance indicators for individual query processing steps in the database kernel. It is inactive by default.
Information collected includes the processing time required in a particular step, the data size read and written, network communication, and information specific to the operator or processing-step-specific (for example, number of records used as input and output).
It is recommended that you start performance tracing immediately before running the command(s) that you want to analyze and stop it immediately after they have finished. When you stop tracing, the results are saved to trace files that you can access on the Diagnosis Files tab of the Administration editor. You cannot analyze these files meaningfully in the SAP HANA studio, but instead must use a tool capable of reading the output format (*.tpt). SAP Support has tools for evaluating performance traces.
You activate and configure the performance trace in the Administration editor on the Trace Configuration tab.
Related Information
Performance Trace Options [page 175]
4.5.2 Performance Trace Options
Several options are available for configuring the performance trace.
Standard Trace Mode
Table 43:
Option Description
Trace file The file to which the trace data is automatically saved after the performance trace is stop
ped
User and application filters Filters to restrict the trace to a single specific database user, a single specific application user, and a single specific application
Option Description
Passport trace level If you are activating the performance trace as part of an end-to-end trace scenario with the Process Monitoring Infrastructure (PMI), you can specify the passport trace level as an ad
ditional filter. This means that only requests that are marked with a passport of the speci
fied level are traced.
For more information see, SAP Library for NetWeaver on SAP Help Portal.
Note
Process tracing is possible only for components in the ABAP and Business Objects stacks.
Trace execution plans You can trace execution plans in addition to the default trace data.
Function profiler The function profiler is a very fine-grained performance tracing tool based on source code instrumentation. It complements the performance trace by providing even more detailed information about the individual processing steps that are done in the database kernel.
Duration How long you want tracing to run
If a certain scenario is to be traced, ensure that you enter a value greater than the time it takes the scenario to run. If there is no specific scenario to trace but instead general system performance, then enter a reasonable value. After the specified duration, the trace stops automatically.
Related Information
Process Monitoring with PMI (Process Monitoring Infrastructure)
4.5.3 Kernel Profiler
The kernel profiler is a sampling profiler built into the SAP HANA database. It can be used to analyze
performance issues with systems on which third-party software cannot be installed, or parts of the database that are not accessible by the performance trace. It is inactive by default.
Caution
To be able to use the kernel profile, you must have the SAP_INTERNAL_HANA_SUPPORT role. This role is intended only for SAP HANA development support.
The kernel profile collects, for example, information about frequent and/or expensive execution paths during query processing.
It is recommended that you start kernel profiler tracing immediately before you execute the statements you want to analyze and stop it immediately after they have finished. This avoids the unnecessary recording of irrelevant statements. It is also advisable as this kind of tracing can negatively impact performance. When you stop tracing, the results are saved to trace files that you can access on the Diagnosis Files tab of the
Administration editor. You cannot analyze these files meaningfully in the SAP HANA studio, but instead must use a tool capable of reading the configured output format, that is KCacheGrind or DOT (default format).
You activate and configure the kernel profile in the Administration editor on the Trace Configuration tab.
Related Information
Kernel Profiler Options [page 177]
4.5.4 Kernel Profiler Options
Several options are available for configuring the kernel profiler.
Table 44:
Option Description
Service(s) to profile The service(s) that you want to profile
Wait time The amount of time the kernel profiler is to wait between call stack retrievals
When you activate the kernel profiler, it retrieves the call stacks of relevant threads several times. If a wait time is specified, it must wait the specified time minus the time the previous retrieval took.
Memory limit Memory limit that will stop tracing
The kernel profiler can potentially use a lot a memory. To prevent the SAP HANA database from running out of memory due to profiling, you can specify a memory limit that cannot be exceeded.
Database user, application
user The database user and/or application user you want to profile Use KCachegrind format to
write trace files Output format of trace files (configurable when you stop tracing)
4.5.5 Diagnosis Information
You can collect diagnosis information in the SAP HANA studio and using command line scripts.
To collect this information, use the SAP HANA studio Administration Editor, navigate to Diagnosis Files Diagnosis Information and use the Collect function.
The SQL variant can be used when SAP HANA is online, otherwise choose the Python script.