Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API

Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address:

Tackle Java server capacity problems

Improve the capacity of your Java server application through load testing and analysis

Engineers and their managers are familiar with organizing a set of concrete tasks and driving them to completion. Simple performance problems, which can be isolated by a single developer on a personal machine, are straightforward to manage and remedy. However, large capacity problems, occurring when the system is under load, are common, and handling them requires a completely different approach. These problems require an isolated test environment, a simulated load, and careful analysis and tracking of changes.

In this article, I create a test environment using some easily obtainable tools and equipment. I then walk through the analysis of two capacity problems, focusing on memory and synchronization issues, which can be difficult to expose using a simple profiler. By walking through a concrete example, I hope to make tackling complex capacity problems less daunting and provide insight into the general process.

Improving server capacity

Server capacity improvements are inherently data driven. Making any application or environment changes without reliable data will generally yield poor results. Profilers provide valuable information about Java server applications, but they are frequently inaccurate because data derived from a single application user may look entirely different from the data derived from dozens or even hundreds of application users. Utilizing profilers to optimize application performance during development is a good place to start, but augmenting this common approach by analyzing the application under load yields far better overall results.

Analyzing a server application under load requires a few basic elements:

  1. A controlled environment to load-test the application
  2. A controlled synthetic load to drive the application to full capacity
  3. Data collection from monitors, applications, and the load-testing software itself
  4. The tracking of capacity changes


Underestimating this last requirement, the tracking of capacity, is a mistake because, if you fail to track the capacity, you have no way of actually managing the project. It is unlikely that a 10 or 20 percent gain in capacity will make any noticeable difference when only a single person is using the application, but this is not necessarily obvious to everyone supporting the project. A 20 percent improvement is significant, and, by tracking the capacity improvements, you can provide important feedback and keep the project on track.

As important as tracking capacity is, unfortunately, it is sometimes necessary to invalidate previous test results when making future test results more accurate. Over the course of a capacity project, improving the load test's accuracy may require changes in the simulation and environment. These changes are necessary and, by holding the application constant—load testing before and after other changes—you can carefully record the transition.

A controlled environment

A controlled environment, at a minimum, requires two dedicated machines and a third for a controller. One of the machines generates a load; a second machine, the controller, communicates with the first to set up the test scenario and receive feedback on the test; and the third machine runs your application. In addition, the network between the load and application machines should be isolated from the rest of the LAN. The controller receives feedback from the loaded application machines about OS metrics, hardware utilization, and application metrics, especially the VM in this case.

1 | 2 | 3 | 4 | 5 | 6 | 7 |  Next >

Discuss

Start a new discussion or jump into one of the threads below:

Subject Replies Last post
. Quick Questions
By KumarG
3 04/22/08 06:02 AM
by Anonymous
. Tackle Java server capacity problems
By JavaWorldAdministrator
0 04/22/08 06:02 AM
by Anonymous


Resources