Because your WebLogic Server will exist in a computing environment and will interact with other technology and application infrastructures , such as legacy and relational database systems, performance bottlenecks can potentially exist in any aspect of a WebLogic Server environment. For this reason, performance tuning WebLogic Server cannot be an isolated activity; environmental factors that can influence WebLogic Server's operating behavior and performance also need to be considered . Hence, performance tuning WebLogic Server can include the following activities:
From the preceding list of activities, you can see that performance tuning WebLogic Server is a multiskilled, multifaceted operation, involving a team of people (WebLogic Server administrators, J2EE developers, database administrators, hardware and network engineers ) who together have detailed knowledge of the entire WebLogic Server production environment, including the applications deployed to the server. As a WebLogic Server administrator, you are expected to tune the performance of the WebLogic Server product and the associated Java Virtual Machine (for example, Hotspot or JRockit), and leverage the experience and skills of other people to tune the performance of the WebLogic Server environment as a whole. There are no hard and fast techniques detailing how you can tune the performance of WebLogic Server and its environment because this task involves a patient and iterative test process in which you try to identify bottleneck factors and determine whether they are indeed impeding the performance of your WebLogic Server. However, having a structured and methodical roadmap showing how you intend to conduct these tests does ease ”and instill discipline into ”the performance tuning process. The following sections methodically describe activities you should use as a guide to formulating a performance-tuning roadmap for your WebLogic Server environment. Step 1: Understand Your WebLogic Server EnvironmentIdentify the technical domain of your WebLogic Server environment, which will include WebLogic Server, deployed applications, hardware platform, operating system, databases, legacy systems, and so on. To perform this activity, you need to bring together a team of experts who can technically address each aspect of your WebLogic Server environment. Step 2: Document Your WebLogic Server EnvironmentHave the team document the exact configuration of your WebLogic Server environment. For example, keep track of the following:
This exercise is essential because it documents a control environment for your WebLogic Server, which will serve as a baseline configuration for all your performance-tuning activities. It is also good practice to version-control all configuration files related to creating the WebLogic Server environment, which enables you to audit changes to the environment, as well as re-create the baseline configuration very easily. Step 3: Develop Test Scenarios for Your WebLogic Server EnvironmentDevelop multiple repeatable test scenarios that simulate an end-to-end usage of the WebLogic Server environment in production. Ideally, these tests should encompass the following:
The performance of these scenarios will greatly affect the perception of the WebLogic Server application and contribute to its success or failure from the perspective of the sponsors, business customers, and, most importantly, the end users. Step 4: Benchmark Your Test ScenariosRun your test scenarios and measure (benchmark) the baseline performance of your WebLogic Server environment, collecting metrics related to WebLogic Server's response time, throughput, and latency, as well as the metrics related to the memory management of your JVM. You will also need to leverage your performance-tuning team to collect other relevant performance metrics from the WebLogic Server environment, such as the latency of any database systems and the hardware resource consumption rates (memory and CPU). It is important to document what is being benchmarked and why. This understanding should be coherent across the performance tuning. To benchmark your WebLogic Server environment in an automated manner, you need to use a performance analysis tool . A performance analysis tool should not only be able to simulate your test scenarios, but also be capable of collecting the desired performance metrics and possibly reveal the areas of the WebLogic Server environment where potential bottlenecks exist. Many performance analysis tools are available in the market. Some are free, and some provide more sophisticated testing mechanisms and options than others. Table 28.1 lists a few of these tools and links indicating where you can retrieve more information about them. Table 28.1. Performance Analysis Tools for Benchmarking Your WebLogic Server Environment
Most of the performance analysis tools are typically available for download so that you can test-drive them. Note An example of using the Web Benchmark tool in a benchmarking exercise is provided later in this chapter in the "Run and Monitor a Load Test Against Your WebLogic Server Application" section. Step 5: Identify the Potential Bottlenecks Affecting the Performance of Your Test ScenariosUsing the benchmark results of your test scenarios, you and your team should be able to identify
After you determine which test scenarios do not meet their performance-tuning requirements, you and your team need to examine how those test scenarios can be tuned . Solving the performance-tuning issues in these important test scenarios will generally improve the performance of a WebLogic Server environment as a whole. Performance tuning generally involves modifying one or more configuration properties ”whether they are application related, WebLogic server related, JVM related, or hardware related. The J2EE programming code should be modified only for a test scenario, only if it is deemed to be inefficient by the J2EE developer in your performance-tuning team. Step 6: Resolve the Performance Bottlenecks in Your Test ScenariosTo resolve the identified bottlenecks in your test scenarios, you and your team need to coordinate the modification (tuning) of a single property of your WebLogic Server environment and benchmark the effects of modifying that specific property. For example, you can modify a property of WebLogic Server by modifying its associated parameter value in the server's configuration file ( config.xml ). Note As a WebLogic Server administrator, you need to understand the various tuning parameters available in the server's configuration file ( config.xml ) and the subsystems of WebLogic Server they affect. Tuning more than a single property at a time can make the results difficult to analyze. This benchmark result should be compared to the baseline results to determine if tuning that property increased or decreased the performance of the test scenario. If there is no effect on the performance of your test scenario, you should continue tuning and benchmarking the other relevant properties of your WebLogic Server environment until you see an increase in performance in your test scenario. When you see an increase in performance, the related benchmark results will become your baseline benchmark for comparing the benchmark results from tuning additional properties of your WebLogic Server environment. After you exhaust your tuning options for one test scenario, resolve the performance bottlenecks in your remaining test scenarios using the same approach. This iterative process will help you to approach the optimum configuration for your WebLogic Server environment. |