As my last post promised, I’m continuing the performance testing discussion with my thoughts on performance profiling.
What is profiling? Profiling is the extrapolation of information about something, based on known qualities (baselines) to determine its behavior (performance) patterns. In fact, performance profiling is determining the average time and/or resources required to perform a particular task within an application.
During performance testing, profiles will be collected for all application events that have established baselines. It is absolutely critical to follow the same procedure that was used to establish the event baseline to create its profile.
Standard TM1 Application Profiling Metrics
When measuring an events Time, it is important to measure both elapsed time (wall clock time) as well as APT (Actual Processing Time, which is the actual CPU time). Elapsed time is the total time it takes for an event to complete while APT is pure processing time (excluding any waiting time). An event may take a “long time” to complete while its APT is relatively short. There are numerous factors that can cause this and identifying where choke points are can help to determine an overall event optimization strategy.
Other than elapsed time, performance profiling can include information from the following log files, tools, and utilities. It is the responsibility of the performance architect to determine which information is relevant to the testing.
Admin Server log (contains messages about communication between TM1 clients, the Admin Server and individual TM1 servers). The Admin Server Logging feature is one of the most robust and useful logging and audit features that ships with TM1. The following describes the specific logging to enable.
To enable TM1 Web logging, edit the web.config file for TM1 Web. The web.config file is installed in the TM1 Web install_directory. If you installed IBM Cognos TM1 Web to the default installation location, the web.config file is located in the TM1 Install directory, \TM1_64\TM1Web. Always backup the original file before making changes.
TM1 Excel Services Logging
To enable TM1 Excel Service Logging, we must edit the TM1ExcelService.exe.config file. The TM1ExcelService.exe.config file is located in the TM1install_dir\bin directory, on the server where TM1 Web resides. If you installed TM1 to the default installation location, then this file is located in C:\Program Files\Cognos\TM1_64\bin.
TM1 Admin Server Logging
To enable TM1 Admin Server logging, we must edit the tm1admsrv-log.properties file, located in the TM1_64\bin64 or \bin directory.
TM1 Applications Logging
Navigate to the TM1_64\webapps\pmpsvc\WEB-INF\configuration\ folder. Open the log4j.properties file with notepad.
TM1 Server Logging
Use a copy of the logging properties file, tm1s-log.properties, to configure and enable message logging for a specific TM1® server. The tm1s-log.properties should be located in the same directory as the tm1s.cfg file for the TM1 Server you are troubleshooting. If the file does not exist, you should be able to copy it from one of the TM1 Sample DBs that come with the installation.
Transactions Log (tracks the data transactions made by the clients logged into one TM1 server. Recorded information includes the date and time the change was made, name of the client who made the change, before and after value, name of the cube in which the change was made, and the elements that identify the cell that changed).
Server Message Log (contains details on the activity of the TM1 server, such as executed processes, chores, loaded cubes and dimensions, and a synchronized replication).
Audit Log (monitors changes to TM1 objects and system-wide events, such as modifications to dimensions, views and subsets and successful/ unsuccessful login activity).
Minute-by-minute performance statistics for clients, cubes, and servers is tracked and stored in the following TM1 control cubes:
- }StatsByCubeByClient, and
TM1 Top is a utility that dynamically monitors the threads and processes running in an instance of a single TM1 server. TM1 Top is a stand-alone utility that runs within a console (command) window on a Microsoft® Windows® computer and can be configured to log transactions to a text file.
By default, a sample Tm1top.ini file is installed to the TM1_64\bin directory. When you run TM1 Top, the Tm1top.ini file should be located in the same directory as the TM1 Top executable file. If you modify the TM1Top.ini file correctly, launching TM1Top should be as simple as launching the tm1top.exe file. Keep TM1Top open, or logging will stop.
Performance counters are a collection of continuously updated values that provide real-time monitoring of specific TM1 server properties and activities such as usage of cubes, views, subsets, dimensions, and read/write activity. TM1 provides a set of more than 30 performance counters, organized into groups, such as Cubes, Dimensions, Subsets, Memory, Threads, and Views. Examples of TM1 performance counters include:
- Threads created
- Views and Dimensions created and destroyed
- Subsets created, duplicated, destroyed, and deleted
- Read lock requests and waits
Performance counters are viewable in graphical format using the Microsoft Windows Performance Monitor, or in a text-only display using the TM1 PerfMon utility.
You can view TM1 performance counters with the following tools:
- TM1 PerfMon utility – A text-only display of TM1 performance counters that runs in a console window on Microsoft® Windows® and UNIX® systems. The TM1 PerfMon utility can monitor local TM1 servers only.
It is recommended that the TM1 PerfMon utility be initiated and configured to capture profiling information by batch commands which would then be part of an automated performance testing script. TM1 PerfMon can be started using the following batch command:
tm1perfmon -servername Name-loopLoopCount-sleepSleepTime
- Microsoft Windows Performance Monitor – A Microsoft Windows tool that provides an interactive, graphical display of TM1 performance counters to monitor local and remote Windows TM1 servers.
Chronicling the Profiles
All profile data collected should be chronicled using the same standardized collection method and saved in the same, safe repository (preferably a searchable database) that was used to capture event baselines. A typical (and reasonable) option is using structured MS Excel Workbooks.