Showing posts with label performanceadvisor. Show all posts
Showing posts with label performanceadvisor. Show all posts

Tivoli performance viewer (TPV) Advisor

In order to use the Tivoli Performance Viewer Advisor you will have to make sure that necessary PMI data collection is turned on. I wanted to try how it works so i used the HelloWorldServlet and generated some load using Apache JMEter.

Then i went to TPV and inside that i clicked on the advisor, i saw this advice being generated


Click on the first link and it shows the advice in detail

Configuring Performance and diagnostic advisor

You can configure the Performance and Diagnostic advisor (PADA) either through the WAS Admin Console or using the wsadmin tool.

The PADA framework makes use of PMI data so before you start using the tool or make any configuration changes make sure that PMI is enable with suitable collection

You can enable it using WAS Admin console by following these steps. In the WAS Admin Console, go to Servers -> Application Servers -> Server Name. Select the server for which you want to enable the advice and go to its detail page. On the server detail page click on Performance And Diagnostic Advisor Configuration link


Then you have to two options either you can enable Performance and Diagnostic provider, either you can enable it on Configuration tab, which requires server restart to take effect or you can make the changes on the Runtime tab.




After configuring PADA, i wanted to test is so i created a Apache JMeter test that will send request to HelloWorldServlet, which has a doGet() method like this


protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("Inside HelloWorldServlet.doGet()");
HttpSession httpSession = request.getSession();
System.out.println("File Name " + request.getParameter("fileName"));

httpSession.setAttribute("testFile", getFileContent(request.getParameter("fileName")));
getServletContext().getRequestDispatcher("/index.jsp").include(request , response);
}


As you can see in the doGet() method i am getting HTTPSession object and then storing a file content into the httpSession as session attribute. I used JMeter to generate quite few hits to the HelloWorldServlet and then i started getting the performance advice in the SystemOut.log file like this


[8/31/09 22:34:33:268 PDT] 0000000f TraceResponse W TUNE0214W: The session cache for HelloWorld#HelloWorldWeb.war is smaller than the average number of live sessions. Increasing the session cache size to at least 4900.0 may improve performance.
Additional explanatory data follows.
Session cache size (the maximum in memory session count): 1,000.
Current live sessions: 4,900.
Average live sessions over the last sampling interval: 4,900.
This alert has been issued 1 time(s) in a row. The threshold will be updated to reduce the overhead of the analysis.


You can also look at these tuning advice using WAS Admin Console by going to Troubleshooting -> Runtime Messages -> Runtime Warnings like this



Important: To achieve the best results for performance tuning, start the Performance and Diagnostic Advisor when a stable production level load is running.

Types of performance advisor

Two types of performance advisors are available


  1. Performance and Diagnostic advisor: Runs within the JVM of application server. It writes the information warnings in SystemOut.log file as well as provides JMX notifications

    You can configure the Performance and Diagnostic advisor using either WAS Admin console or wsadmin tool. Running in the JVM of the application server, the PADA checks for inefficient settings and issues recommendations as standard product warnings messages.These recommendations are displayed both as warnings in the administrative console under Runtime Messages in the WebSphere Application Server Status panel and as text in the application server SystemOut.log file. Enabling the Performance and Diagnostic Advisor has minimal system performance impact. The advice that the Performance and Diagnostic Advisor gives is all on the server level

    You can also use the Performance and Diagnostic Advisor to enable the lightweight memory leak detection, which is designed to provide early detection of memory problems in test and production environments.


  2. Performance advisor in Tivoli performance viewer: In stanad alone environment runs in the JVM of application server, in the ND environment runs in the JVM of node agent. Requries that you enable performance modules, counter or both on. You can look at the warning messages generated using the TPV in WAS admin console

    The performance advisor in Tivoli Performance Viewer (TPV) provides advice to help tune systems for optimal performance and provide recommendations on inefficient settings by using collected Performance Monitoring Infrastructure (PMI) data. Obtain the advice by selecting the performance advisor in TPV.

What is performance advisior

The advisors analyze the Performance Monitoring Infrastructure (PMI) data of WebSphere Application Server using general performance principles, best practices, and WebSphere Application Server-specific rules for tuning. The advisors that are based on this information provide advice on how to set some of your configuration parameters to better tune WebSphere Application Server.

The advisors provide a variety of advice on the following application server resources:

  • Object Request Broker service thread pools

  • Web container thread pools

  • Connection pool size

  • Persisted session size and time

  • Data source statement cache size

  • Session cache size

  • Dynamic cache size

  • Java virtual machine heap size

  • DB2 Performance Configuration wizard