JaVa
   

Performance Testing and Tuning an app

Overview

So far we've talked a lot about performance and scalability at a theoretical level. In this chapter we'll take a more practical look at how to avoid common causes of performance problems, and how to address any performance problems before they prove costly to a project. We'll look at basic performance and scalability concepts, and why performance and scalability are critical considerations throughout the project lifecycle. If we ignore these issues until an app is functionally complete (a common mistake) we are courting disaster. We'll look at the importance of an empirical approach to meeting performance requirements, and how we can gather the necessary evidence by load testing and profiling key app functionality. We'll look at tools for load testing web apps and ordinary Java classes, and the JProbe profiler. We'll look at techniques for addressing any performance problems identified through testing and profiling. We'll consider how to ensure efficient use of J2EE container services, the benefits (and potential problems with) caching frequently used data, and code-level optimizations. We'll illustrate these techniques, and use of the performance testing tools discussed in this chapter, by analyzing and improving the performance of one of the key use cases of the ticketing sample app. We'll look at why ensuring satisfactory performance in distributed apps is a special challenge, and how we can overcome it by minimizing the overhead of remote method invocation. We'll also consider some performance issues relating to web apps. We'll look at benchmarks of some of the alternative view technologies discussed in . We'll see how we may be able to minimize load on web apps by using HTTP headers to enable proxy and browser caching.

Finally, we'll look at some common causes of performance and scalability problems in J2EE apps, enabling us to avoid making costly mistakes.

JaVa
   
Comments