| Previous Next |
Load TestingThe discussion of load testing in Section 1.6 of is relevant to J2EE app tuning. Here's a summary of the steps involved:
Load testing should be repeatable. Use load-test suites and frameworks. Many products are available, including free tools (see http://www.JavaPerformanceTuning.com/resources.shtml). Continuously retest and measure against established benchmarks to ensure that app performance hasn't degraded as changes are made. The server must be designed to handle peak loads, so tests including expected peak loads should be scrutinized. Peak user loads are the number of concurrent sessions managed by the app server, not the number of possible users. The key elements of a load-test design are the test objective (e.g., can the server handle N sessions per hour at peak load level?), pass/fail criteria (e.g., pass if response times stay within a certain range), script description (e.g., user1: page1, page2, ...; user2: page1, page3, start transaction1, etc.), and scenario description (which scripts at which frequency and how the load increases). One stress-test methodology requires the following steps:
When testing performance, run tests overnight and on weekends to generate longer-term trends. Your tests could generate inaccurate results. Consider these potential pitfalls:
Performance testing should continue even after the app is deployed. For apps expected to perform 24/7, inconsequential issues like database logging can degrade performance. Continuous monitoring is the key to spotting even the slightest abnormality. Set performance capacity thresholds, monitor them, and look for trends. When app transaction volumes reach 40% of maximum expected volumes, you should execute plans to expand the capacity of system. Note that 40% is an arbitrary choice, but it's a good place to start; if you're at 40% and don't see the first hints of more serious problems, like significant spikes in usage profiles, you might relax and set a new, higher threshold. The point is that you should watch for signs that your app is outgrowing the system and make plans for an upgrade well before the upgrade is needed. |
| Previous Next |