By Jesper Led, IT Architect Infrastructure, Tryg Forsikring and
Karlheinz Kronauer, Director Product Management, Software AG
Natural Profiler has come a long way from its first introduction as a new utility for Natural for Mainframes v8.2.1, as described in TECHniques Issue 3, 2012. Improved based on customer experience, it is now fully integrated in the NaturalONE Eclipse environment and provides a complete new user interface with many new features that help programmers analyze and optimize programs to ensure high quality and high performance results.
Natural Profiler in Action
Tryg is Denmark’s largest general insurance company and forms part of Tryg Forsiking.
More than one million families and companies are insured by Tryg.
Tryg has been running Software AG’s Adabas and Natural for more than 25 years, and EntireX for the last 10 years
Denmark’s largest general insurance company, Tryg, has been using Natural Profiler on the mainframe after we introduced Natural for Mainframes version 8.2.1. We selected Natural Profiler to monitor the internal process flows of an application and to record trace data for select events that are performed within Natural applications. As the lead IT Architect for this project, I would like to share with you our experience.
When you have performance problems such as excessive use of resources or long response times for an online transaction, you want a quick way to find the main reason for the problem. Who is using the resources or where is the time spent?
Before there was a tool to help you, it took a long time to determine the causes of these performance problems. Adding write/display statements and running it again and again to see where the time was spent was a tedious process.
With Natural Profiler on the mainframe, this can be done much faster. Basically you switch on Profiler, run the transaction that has the problem and then you can see where the time is spent or the resources are used.
Addressing the limitations
Before I could use Profiler effectively, I had to address two issues:
- limits in the information size area (RDCSIZE), and
- how to accumulate the trace results for analysis.
To address these issues, I had to write a series of small programs.
Knowledge is power
By using Natural Profiler, I was able to quickly find the right place to look for candidates consuming resources. Even if there are no heavy transactions, the programs are not badly written and the database statements are not at fault, this analysis still gives you good insight and hints for tuning.
In my case, one thing I learned through this analysis was that “all” the data of a customer was fetched immediately. The information of thirty products was read even though only six were meant to fit the page. The user would probably never go to page 2. Using this knowledge, I can probably save a lot of resources.
Improved Natural Profiler Included with NaturalONE
Thanks to feedback from customers like Tryg, Software AG has improved Natural Profiler and integrated it with NaturalONE version 8.3.1. As part of the NaturalONE Eclipse environment, Profiler has a complete new user interface while accessing profiling data recorded during Natural mainframe sessions or LUW (Linux, Unix, Windows) sessions.
Powerful Trace Events
All activities required for a successful Profiler session can now be managed directly from NaturalONE. There is no longer a need to switch Profiler on and off and new configuration settings enable you to start multiple tracing sessions in parallel.
First, you define the trace events. Trace events are pre-defined locations in a program where Profiler collects data during runtime of the application, like the name of the program or statement executed, how many times the trace event is executed, or the execution time of the event. Possible trace events include:
- Program Load
- Program Start
- Program Termination
- Before / after Data Base Call
- Before / after Terminal I/O
- Before / after External Program Call
- Runtime Error
- Natural Statement
- User Defined Event
Using these trace events, the user can define in detail where and on what level of abstraction he would like to collect data for later review. He could, for example, begin at program level and subsequently drill down to analyze the programs on statement level. He can also include his own user-defined events at any position in a program that may be of interest. This can be used to measure time consumption in new code the user has added while developing enhancements to the program.
Saving Trace Data
After having defined the events, the user can start the program from NaturalONE (that is actually running on a server like a mainframe) and the trace data are collected. The RDCSIZE no longer limits your ability to store trace data. When invoking Profiler from NaturalONE, you can specify a new buffer size for Profiler data. The default size for the Profiler Data Pool (PDPSIZE) is 500 KB and the maximum size is 2 GB (if the server region allows). This is significantly greater than the maximum value of 128 KB in the RDCSIZE available in the mainframe version of Natural Profiler, allowing you to store significantly more data.
Analyzing Trace Data
The collected data will be available in a new Profiler view showing the statistics of the Profiler session. These data include the hotspots detected during the Profiler session such as the programs accessed frequently or programs and statements that consume significant execution time. This view allows you to sort the data in any order you need for further analysis. The data can also be archived in order to compare it with data from earlier or later profiling sessions and see the impact of modifications applied to the programs.
Natural Profiler helps application programmers, administrators and quality engineers to analyze the logical flow of Natural applications and to trace the utilization of resources during run-time. Now included in NaturalONE, Natural Profiler offers a comprehensive toolset that helps programmers analyze and optimize programs to ensure high quality and high performance results. We welcome continuous feedback on your experience with Profiler as we continue to enhance and enrich it with new functionality as requested by users.