站内搜索: 请输入搜索关键词
当前页面: 图书首页 > How to be a Successful Technical Architect for J2EE Applications

Chapter 19: Performance Tuning and Load Testing - How to be a Successful Technical Architect for J2EE Applications

Team LiB
Previous Section Next Section

Chapter 19: Performance Tuning and Load Testing

Overview

Management often looks to the technical architect to lead performance-tuning efforts. This chapter provides tips and tricks you can use to tune and load test your J2EE applications. In fact, you can use many of the concepts presented here for other types of applications as well.

Establish performance and scalability targets. This is the first step in performance tuning and load testing. Without targets, you'll never know when those tasks have finished.

Although there are always opportunities for performance improvement, performance tuning has diminishing returns over time. When you start tuning, the changes you make will result in larger performance improvements. But over time, your improvements will get smaller and smaller with most applications. Because most of the benefit you get from tuning will occur in the first 20 percent of the work, the 80/20 rule applies once again.

Don't start tuning until after the application is in testing. Many developers have a desire to tune every piece of code they write. I admire their desire for completeness, but it hurts the timeline of the project. Chances are high that a good percentage of the code being tuned at this level will not result in good performance enhancement to the application as a whole. Although I've meet many developers that are not comfortable with this concept, experience has taught me that at some places in the application, the cost of tuning doesn't reap enough benefit for anyone to care about.

Most performance problems originate in application code. Developers tend to ferret out performance problems by examining container configurations, JVM options, operating system performance, network performance, and the like rather than looking at code. This is usually wishful thinking on the part of developers.

Measure performance before tuning to establish a baseline. The next section discusses how to measure performance. The numbers that result from performance measuring will be the basis for judging the effectiveness of performance improvements.

Performance tuning is an extensive subject. I can only scratch the surface here. Joines, Willenborg, and Hygh (2002) is a good comprehensive reference for performance tuning J2EE applications. I find the numerous tips in Bulka (2000) incredibly useful for improving performance after I've identified a problem.


Team LiB
Previous Section Next Section