Why Profile and Benchmark?


Profiling is an essential tool to understand the performance or desired performance of your applications. You can also use it to help diagnose problems such as memory leaks and resource overuse by drilling down to the methods and interface calls made within your classes and objects. Because Java is an object-based environment, profiling is essential.

Profiling can come in many different forms. It includes everything from the most basic form of monitoring the high-level network calls between communicating devices to thread and memory analyzers that help you understand what's going on within an application at the lowest level.

You probably at some stage have faced an irate customer or end user complaining about "poor performance." Alternatively, you may have noticed a performance degradation of your applications through some form of proactive alarming or monitoring. You can use profiling and benchmarking to isolate where these problem are occurring.

I'll use an example of a WebSphere-based application that's running poorly. End users are complaining about poor performance when retrieving information from a particular application screen. To understand this, you can take the problem to your staging or Stress and Volume Testing (SVT) environment and run some simulated tests.

You first run some benchmarking at a reasonable production load to understand how the application response times compare when under load. Your average benchmarked response time for the application is 10 seconds to log in, go to a particular screen, and request details that happen to go off to a backend database and retrieve information. Noticing that there's some performance degradation in that particular area of the application, you decide to profile the application to start to build up some empirical data to quantify what you're seeing.

Using a profiling tool such as JProbe (discussed later in this chapter), you're able to monitor and profile what the application is doing. In this example, by profiling the application using JProbe, it's possible to look at each component (object/ class, method call, interface call, and so on) and understand the average time taken to complete each thread, memory consumed, number of calls, and so forth.

After running JProbe on the example application for some time, you'll build up a statistical profile of how the application operates. What JProbe may show about the example application is that a particular method call in a JavaBean that queries the database is taking 150 percent longer than any other bean in the application. Another example of where profiling and benchmarking is important is in ongoing capacity management and planning.

Using a combination of both forms of tooling, you're able to produce baseline capacity forecasts of various aspects of your environment. That is, it's not uncommon for Java 2 Enterprise Edition (J2EE)/WebSphere system managers to run benchmarking on particular functions of their applications on a periodic basis to understand and validate any skewing in their overall WebSphere platform. These skewings can be caused by slight variations in the environment such as extra operational processes running in the background on servers impacting performance, extra network load causing method calls to various remote systems to take longer to complete, and so forth.

You'll now look at when and how you should tackle profiling.




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