• Get application security done the right way! Detect, Protect, Monitor, Accelerate, and more…
  • Monitoring & Performance troubleshooting is always challenging for applications and if you are not equipped with the right tools then you may not know what’s happening in your application infrastructure.

    IBM WebSphere Application Server (WAS) is one of the most popular application servers if you are WebSphere administrator then often you have to deal with performance & capacity issue.

    In this post, I will explain how you can use WebSphere Performance Tuning Toolkit (PTT) to monitor and find performance related issue in WAS.

    What is WebSphere Performance Tuning Toolkit?

    It’s important to understand what is PTT and how it can help you.

    WAS PTT is an Eclipse-based tool which collects the data from WebSphere and provides you nice statistics/graph to find the bottlenecks so you can tune the application for the optimal performance.

    WebSphere PTT collect the data from PMI (performance monitoring interface) through JMX. To summarize it does four main things.

    • Collect the data
    • Transform the data
    • Intelligent alarm
    • Let you configure auto actions

    PTT is real-time monitoring and analysis platform and got easy to use interface. This is a standalone tool so you may not need to install anything additionally on WebSphere Application Server. I hope now you have an idea how it can fit in your WebSphere environment.

    PTT has some predefined rules to alert or take actions when threshold reach the configured level.

    For ex:

    • CPU usage
    • Heap memory usage
    • Thread pool
    • Connection timeout
    • Thread waiting
    • Hung thread
    • Transaction timeout/rolled back
    • Generate thread/heap dump

    The good thing is you can always create your own rule so you control how the tool should behave.

    Download WebSphere PTT

    PTT is available for Windows & Linux so download the one you need from the following URL

    http://www.ibm.com/developerworks/websphere/downloads/performtuning.html#download

    It’s more than 200 MB file so may take few minutes based on your Internet speed. Once downloaded, extract the zip file.

    • It will create a new folder – PerformanceTuningToolkit2_linux32 and inside you will have executable file as “PerfTuningToolkit”
    • Double click to open the WAS Performance Tuning Toolkit

    was-ptt

    • Let’s add one JVM now. Click on “add new host” icon and enter the DMGR host/IP and SOAP port number.

    add-new-host

    • Double click on newly added “host” to connect. It will prompt if you want to monitor all servers or a specific one.

    was-ptt-connect

    Note: if you just want to monitor just JVM then provide JVM host/port instead of DMGR.

    • Once connected, you should see the overview windows with some of the high-level metrics.

    was-ptt-overview

    • CPU Usage
    • Thread hung
    • Transaction TimeOut
    • JDBC response time
    • Servlet response time
    • Used heap

    So now you have successfully connected your WebSphere environment to Performance Tuning Toolkit and its up-to-you to monitor and analyze the various WAS metrics.

    Let’s see some of the useful metrics

    Generate overall performance report

    Would be helpful if you would like to have overall performance report of WebSphere. You can generate report by going to Monitor >> Generate Report

    was-ptt-report

    You have the option to save the report in PDF or HTML format.

    Monitor WebSphere Environment

    Monitor various metrics under single window by navigating to Monitor >> Open monitor page

    was-ptt-monitorpage

    Generate Thread and Heap Dump

    You don’t need to get into WAS server to generate one instead, navigate to Operation >> Generate Thread/heap Dump

    was-ptt-dump

    Enable Trace

    You can enable trace for the following by going to Operation >> Enable Trace

    • Web/EJB container
    • Web services
    • Security
    • Database connection pool
    • Connection leak
    • Classloader
    • Messaging

    enable-trace-was

    WebSphere PPT can really be helpful to tune the performance related issue and especially when your application is in project phase and want to play around with the configuration and see what works the best for you.

    I hope this gives you an idea how to use WAS PTT and what you can do with it. Let me know if you think will be useful to use.