Tools Available


There are many profiling and benchmarking tools available on the market today. From open -source and General Public License (GPL) tools to large-scale enterprise software suites, there's a tool to suit everyone's needs.

Given that there are so many tools, you can only explore a handful in this book. I've provided a description of tools that I've used or currently use when I work with profiling and benchmarking in WebSphere-based environments. There are four tools I find to be good all-around profiler tools (regarding cost, performance, and features).

Much of the tools' usage is beyond the scope of this book; however, I've provided some guidelines to help get you started. I've also provided links to the Web sites where you can download either full or evaluation copies of each of the packages, as well as documentation, information, FAQs, and more.

You'll now look at each of the profilers in some more detail.

JProbe

JProbe is a software profiling package from Quest Software ( http://www.quest.com ) that provides powerful memory, threading, and profiling capabilities. You can download a 15-day demo copy from Quest so you to evaluate the package. This section provides an example of a basic application being profiled by JProbe.

Consider for a moment that you have a basic class that iterates and appears to be causing you performance difficulty. With JProbe, it's possible to look at the profile of an application from several different angles. Figure 14-2 shows a JProbe screen that displays the initial or standard profiling screen, which indicates an application's overall profile metric. That is, it shows the characteristic, overall, of your application.

click to expand
Figure 14-2: Using JProbe

Figure 14-2 shows a basic profiling exercise that has been conducted . At the bottom of the screen, there's a listing of the methods and objects that were called and used within this particular class profiling. To the right of that, there's a breakdown of the time spent within each method or object. Other components within the JProbe suite will allow you to understand, of the objects and methods invoked, what their memory consumption was and what their thread usage patterns were.

Using the thread profiler tool from JProbe, it's possible to take the information from the standard profiler tool (Figure 14-2) and drill down and understand which objects from which components are consuming the most memory. Figure 14-3 shows an example of a screen from the memory profiler.

click to expand
Figure 14-3: JProbe ” Memory Profiler

In the left pane of Figure 14-3, you can see a list of all the objects that were created during the execution of the particular Java application in question. As you can see, the profiler shows the size of each object created and the creation time, and it can list the number of references and referrers that indicate the number of times this particular object has been used. Additional control buttons at the top of Figure 14-3 allow you to actually have the profiling tool analyze the results and determine if there are possible memory leaks present.

The tool will also highlight where those memory leaks are stemming from via a graph, as shown in Figure 14-4. Note at the bottom of Figure 14-4 how the summary dialog box indicates where it believes a leak is stemming from. Note also at the top right of the screen that the analyzer has determined the path of the memory leak.

click to expand
Figure 14-4: JProbe ” extended memory profiler

JProbe also allows you to remotely monitor an active application via additional components that come with the suite. Furthermore, JProbe supports a plug-in for most leading Integrated Development Environments ( IDEs ), including IBM's WebSphere Studio Application Developer (WSAD). Furthermore, it has direct plug-in support for WebSphere, allowing you to analyze your live applications operating under WebSphere rather than via statically running them such as in the examples provide in Figures 14-2, 14-3, and 14-4.

Table 14-2 summarizes JProbe.

Table 14-2: JProbe Specifications

Feature Set

Capability

WebSphere version supported

Version 3. x , 4. x , and 5. x

Live system testing?

No

IDE support

WSAD and all other major IDEs supported via plug-ins

Operating systems supported

Windows NT, XP, 2000, 2003, AIX, Solaris, Linux

Memory profiler?

Yes

Thread profiler?

Yes

Static profiler?

Yes

Wizards and theorizers?

Yes

HPjmeter

HPjmeter is a Java Virtual Machine (JVM) profiler from Hewlett-Packard that provides a slightly different approach than JProbe yet essentially performs a similar function. You can download HPjmeter and its licensing arrangements from http://www.hp.com/products1/unix/java/hpjmeter/index.html .

HPjmeter works by hooking into the particular JVM that operates your WebSphere application servers ”(typically the IBM Java Development Kit (JDK) ”using a command-line JVM option, -Xrunhprof .

Note  

If you're running a nonstandard JDK/JVM with your implementation of WebSphere, other command-line options that HPjmeter uses are -prof , -eprof , -Xeprof , -Xrunprof , and -Xrunhprof .

HPjmeter reads the JVM output from -Xrunhprof or the equivalent command-line option and allows you to analyze a plethora of technical information about the application that runs within the particular JVM. HPjmeter allows you to analyze threads, memory usage, CPU, and process utilization within your applications. Figure 14-5 depicts the HPjmeter user interface.

click to expand
Figure 14-5: HPjmeter

One of the sound ways to use a nonlive profiler such as HPjmeter is to perform snapshot analysis. That is, when your application first goes into production, you should always create a series of baselines. These baselines will consist of performance and component utilization (for example, heap usage, thread allocation, and so on) measured against predetermined application loads, such as 10 percent, 40 percent, 60 percent, and 100 percent.

Then, with the HPjmeter tool, run it periodically over production-sampled data and compare it with the baseline snapshots you acquired before going live in production. This provides a side-by-side comparison between the baseline and the new results of your profiling. HPjmeter has the facilities to assist with comparison between data snap shots.

Overall, HPjmeter supports all JVMs that come with and are supported by both WebSphere 4 and 5. Table 14-3 summarizes its features.

Table 14-3: HPjmeter Specifications

Feature Set

Capability

WebSphere version supported

4. x and 5. x

Live system testing?

Partial (need to view data once created by JVM output)

IDE support

Supported via updating JVM bootstrap configuration in your IDE

Operating systems supported

All operating systems that support Java and Java Swing Graphical User Interface (GUI) classes

Memory profiler?

Yes

Thread profiler?

Yes

Static profiler?

Yes

Wizards and theorizers?

Yes

Resource Analyzer/Tivoli Performance Tool

The Resource Analyzer and Tivoli Performance tool come with WebSphere 4 and 5, respectively ”and provide detailed information about the operational status of your applications running within WebSphere. As you saw in earlier chapters, both these tools are powerful. In the context of profiling, although both tools do provide profiling-like capabilities, they're more attuned to providing snapshot analysis of your live production environment (as discussed in detail during Chapter 14).

For example, if you were experiencing a problem with your production environment's performance, by using either of these tools, you can drill down to component level within each application. At this point, you're able to set each Java component within your application to a defined level of analysis. That is, you can choose to have the tool analyze and track your Java Database Connectivity (JDBC) connections, pool management, and performance while correlating the live status of the Web container threads. Figure 14-6 shows the Resource Analyzer, and Figure 14-7 shows the Tivoli Performance tool's Performance Viewer.

click to expand
Figure 14-6: Resource Analyzer
click to expand
Figure 14-7: Tivoli Performance Viewer

Both these tools provide similar capabilities. Both tools also offer a logging capability that allows you to log, or capture, snapshots in real time and compare them.

Unlike HPjmeter and JProbe, these two WebSphere tools don't provide deep analysis and heuristic functionality. What the two WebSphere-based tools do provide is the ability to allow you to monitor specific application components in live production environments at a level that suits your needs. They're designed to assist you in monitoring your WebSphere environment and as aids in benchmarking. You can use them to analyze the various components and aspects of your WebSphere environment at a feature level, for example, data sources, Web container, Object Request Broker (ORB) threading, and so on.

You'll find that the Resource Analyzer and Tivoli Performance tools are better for performance analysis and looking at environment- related performance factors than pure application profiling. However, because both tools allow you to view snapshots of your application's performance from an environment perspective, they can both give a different angle of potential performance issues with your applications that standard profilers can't (for example, why look at object utilization and object call rates when the problem may be connections to a database?).

Table 14-4 summarizes the two tools and their features from a profiling perspective.

Table 14-4: Resource Analyzer and Tivoli Performance Tools

Feature Set

Capability

WebSphere version supported

4. x and 5. x

Live system testing?

Yes

IDE support?

No

Operating systems supported

All operating systems that support WebSphere Application Server

Memory profiler?

No

Thread profiler?

Partial

Static profiler?

Partial

Wizards and theorizers?

No

WSAD Profiler/Jinsight

If you're using IBM WebSphere Studio Application Developer (WSAD), then you actually have a powerful profiling tool built-in to your IDE. WSAD is among the best Java/J2EE IDEs available on the market. It has sophisticated testing and profiling suites, smart debugging, and a powerful distributed application development interface ”the IDE itself.

Those who are using the predecessor to WSAD, IBM Visual Studio for Java, will have a limited built-in profiling tool. Instead, you can obtain a product from the IBM alphaWorks site ( http://www.alphaworks.ibm.com ) called Jinsight. Jinsight is another powerful tool that allows you to profile your Java applications. It also includes memory analysis, thread analysis, and other forms of profiling analysis. In the past, Jinsight was used in conjunction with Visual Studio for Java users.

From a development perspective, the WSAD profiling tools are extremely powerful. Given the profiling engine is embedded within the IDE itself, you can integrate the WebSphere testing environment, the debuggers , the code sampling, and the WSAD profiling all within a single application. Figure 14-8 shows the WSAD Profile view. As you can see from the example application that as been profiled, you can obtain a fair degree of information from this output.

click to expand
Figure 14-8: WSAD ” Profile view

It's important to note that the profiler in the WSAD application isn't a live profiler such as JProbe and HPjmeter but more of a development aid. It's important to remember this because timings and other performance-related data will ultimately change once your application is deployed into a real production environment with real production- sized hardware. You may find that specific parts of your application are performing badly within WSAD because of the size and capacity of your development workstation hardware.

In most cases, taking application and profiling metrics within a live production environment will yield different results. Therefore, use the WSAD profiler as a tool to gauge the application's performance. However, you should never rely on it for hard performance and profiling metrics.

Table 14-5 summarizes the WSAD profiler.

Table 14-5: WSAD: Profiler View

Feature Set

Capability

WebSphere version supported

4. x (WSAD 4. x ) and 5. x (WSAD 5. x )

Live system testing

Partial (in IDE only)

IDE support?

Yes

Operating systems supported

All operating systems that support WSAD (for example, Windows, Solaris, Linux, and AIX)

Memory profiler?

Yes

Thread profiler?

Partial

Static profiler?

Partial

Wizards and theorizers?

Yes




Maximizing Performance and Scalability with IBM WebSphere
Maximizing Performance and Scalability with IBM WebSphere
ISBN: 1590591305
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Adam G. Neat

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net