Showing posts with label tpv. Show all posts
Showing posts with label tpv. Show all posts

Logging performance data with TPV

The Tivoli Performance Viewer (TPV) provides an easy way to store real-time data for system resources, WebSphere Application Server pools and queues, and applications in log files for later retrieval. You can start and stop logging while viewing current activity for a server, and later replay this data. Logging of performance data captures performance data in windows of time so you can later analyze the data.

Lets say during your performance testing you realized that something happens after the load reaches 100 users and the server hangs in next 5 min. Now when your running the test its difficult to look at all the statics or re-run the test several times. So what you can do is log the performance data at the time of running the test and then you can look at the data some later point of time.

Before you start logging data go to the log related settings page to make sure that it has correct settings



After that i went to the current activity screen and started logging of PMI data by clicking on start logging button


Now start executing your performance test, in my case i did manually hit the HelloWorldServlet few times and then i clicked on stop logging button



Once you stop logging you will notice that there is a .zip file that got created in the profiles_home\logs\tpv folder that file has tpv performance data, so you can view that data using was admin console like this



When you click on view data, it will take you the TPV and start displaying the logged data, you will have option play, rewind stop from here


Viewing PMI data with TPV

You can use the Tivoli Performance Viewer (TPV) to view Performance Monitoring Infrastructure (PMI) data in chart or table form. TPV monitors the performance activity of all servers on a node. This article assumes that one or more servers have been created and are running on the node, and that PMI is enabled.

You can debug performance problem by deciding what all performance data you want to look at. Ex. i wanted to see performance of sayHello() method in my HelloWorldEJB and how it relates to performance of HelloWorldServlet. So i selected HelloWorldServlet and sayHello() method of HelloWorldServlet under performance modules and it displayed data about how many times these method were called there response time, how the data relates to each other on time axis,...



In addition to these simple statics you can use TPV to look at all types of data such as how was your data source pool was doing in relation to the spike in Web container thread pool size....

TPV Summary reports

The Tivoli Performance Viewer (TPV) provides five different summary reports that make important data quickly and easily accessible. View summary reports to help you find performance bottlenecks in your applications and modules. The TPV summary reports are generated upon request and are not dynamically refreshed.

This is how the summary report for my HelloWorld EAR looks like, i made 3 calls to HelloWorldServlet which resulted in 3 calls to sayHello() method of HelloWorldEJB, this method show those three calls along with response time for each one of them and average response time


The TPV has following five summary reports

  • Servlet report: show the no of calls and their average and total response time to all the servlets and JSPs. This is same as the current activity report

  • EJBs: Shows the calls made to EJB, ejb method that is getting called and response times


  • EJB Methods:Displays same data as that of EJBs report but in different format

  • Connection Pool: Displays utilization of Data Source connection pools for each of the connection in graphical format



  • Thread Pool: Displays utilization of various thread pools on the server such as web server, ORB thread pool.. in graphical format



Performance tunning for TPV

When you use TPV it adds performance overhead on the server. You can configure the TPV settings to manage the performance of the server. TPV monitors the performance activity of all servers on a node. You can configure the activity monitoring of TPV on a per-user basis. Any changes made to TPV settings are only for the server being monitored and only affect the user viewing the data.




  • Refresh Rate: Specifies how frequently TPV collects performance data for a server from the Performance Monitoring Infrastructure (PMI) service provided by that server. The default is 30 seconds. To collect performance data for the server more frequently, set the refresh rate to a smaller number. To collect performance data less frequently, set the refresh rate to a larger number. The allowed range is 5 to 500 seconds.

  • Buffer Size: Specifies the number of entries to be stored for a server. Data displayed in TPV is stored in a short in-memory buffer. After the buffer is full, each time a new entry is retrieved the oldest entry is discarded. The default buffer size is 40 entries. Supported values are 10, 20, 30, 40, 50, 60, 70, 80, 90 and 100. The larger the buffer size, the more memory is consumed. Thus, specify a buffer size that allows you capture enough monitoring data for analysis without wasting memory storing unneeded data.

  • View data as: Specifies how counter values are displayed.



The values you set for Refresh Rate and Buffer Size depend on your use of TPV. To diagnose a known problem on a test machine, you might poll data more frequently while having a decreased buffer size. To monitor a production server, you might poll data less frequently and specify a buffer size depending on how much history you want. However, TPV is not intended to be a full-time monitoring solution

Viewing current performance activity

Log into the WAS Admin Console and go to Monitor and Tuning -> Performance Viewer -> Current Activity, then select the server which you want to monitor, on this page it displays two parts first on the left hand side it has links to all the TPV modules such as Advisor, Summary Report,.. and on the right hand side it displays the current activity on the server

In order to check what data is displayed in the current activity page, i created a simple HelloWorld.ear. It has a HelloWorldServlet, that makes a call to HelloWorldEJB and then forwards control to index.jsp for generating response. I made 3 requests to the HelloWorldServlet and this is the data that was displayed in the current activity



It displays how many requests were made to the HelloWorldServlet and what is average response and total response time for each of the request. The HelloWorldServlet forwards control to index.jsp for actual markup generation so calls to index.jsp are also monitored and recorded here i.e. each jsp is considered as a servlet

This data is similar to the Summary Report -> Servlet report. The data related to web application gets reset if you update the application and only those applications that you access after starting the server are displayed in the current activity

Tivoli performance viewer (TPV)

Tivoli performance viewer (TPV) enables administrators and programmers to monitor the overall health of WebSphere Application Server from within the administrative console. It provides simpler viewer for the performance data collected by WebSphere PMI

You can use TPV to

  • View current activity

  • View summary reports

  • Log PMI performance data



You can access the TPV by logging into WAS Admin Console and then going to Monitoring and Tuning -< Performance Viewer -< Current Activity