Sun Java System Application Server Enterprise Edition 8 2004Q4 Beta Performance Tuning Guide |
Chapter 1
About Application Server PerformanceSignificantly improve performance of applications and the application server by adjusting a few deployment and server configuration settings. However, it is important to understand the environment and performance goals. An optimal configuration for a production environment might not necessarily be optimal for a development environment.
This guide aids in tunderstanding the tuning and sizing options available, providing you with the capabilities and practices to obtain the best performance out of your Application Server.
This chapter discusses the following topics:
Process OverviewThe following table outlines the overall administration process, and shows were performance tuning fits in the sequence.
Performance Tuning Sequence
Ideally, do performance tuning in the following sequence:
- Tune your application, described in Chapter 2, "Tuning Your Application."
- Tune the server, described in Chapter 3, "Tuning the Application Server."
- Tune the high availability database, described in Chapter 6, "Tuning for High-Availability."
- Tune the Java runtime system, described in Chapter 4, "Tuning the Java Runtime System."
- Tune the operating system, described in Chapter 5, "Tuning the Operating System."
Application developers will want to tune applications prior to production use. Application tuning often produces dramatic improvements in performance.
The remaining steps in the preceding list are performed by the system administrator. Take those steps when the application has already been tuned, or when application tuning has to wait and you want to improve performance as much as possible in the meantime.
General Tuning ConceptsThe previous discussion guides the administrator towards defining a preferred deployment architecture. However, the actual size of the deployment is determined by a process called capacity planning.
How does one predict either the capacity of a given hardware configuration or predict the hardware resources required to sustain a specified application load and customer criteria? This is done by a careful performance benchmarking process, using the real application and with realistic data sets and workload simulation.The basic steps are briefly described below.
- Determine performance on a single CPU
First determine the largest load that can be sustained with a known amount of processing power. You can obtain this figure by measuring the performance of the application on a uniprocessor machine. Either leverage the performance numbers of an existing application with similar processing characteristics or, ideally, use the actual application and workload, in a testing environment. Make sure that the application and data resources are configured in a tiered manner, exactly as they would be in the final deployment.
- Determine vertical scalability
Know exactly how much additional performance is gained when you add processors. That is, you are indirectly measuring the amount of shared resource contention that occurs on the server for a specific workload. Either obtain this information based on additional load testing of the application on a multiprocessor system, or leverage existing information from a similar application that has already been load tested. Running a series of performance tests on one to eight CPUs, in incremental steps, generally provides a sense of the vertical scalability characteristics of the system. Make sure that the application, application server and backend database resources, operating system are properly tuned so that they not skew the results of this study.
- Determined horizontal scalability
If sufficiently powerful hardware resources are available, a single hardware node may meet the performance requirements. However for better service availability, two or more systems may be clustered. Employing an external load balancers and workload simulation, determine the performance benefits of replicating one well tuned application server node, as determined in step (2).
The following table describes the steps in capacity planning:
The following table describes factors that affect performance. The left most column describes the general concept, the second column gives the practical ramifications of the concept, the third column describes the measurements, and the right most column describes the value sources.
User Expectations
Every application user will have some expectations with respect to application performance. Often they can be numerically quantified. The server administrator must understand these expectations clearly, and use them in capacity planning to ensure that the deployment will meet customer needs, when completed.
With regard to performance, you need to consider the following:
- What are the required average response times expected by the end users for various interactions with the application? What are the most frequent interactions? Are there any extremely time critical interactions? What is the length of each transaction, including think time? In many cases, empirical user studies can need to be performed to come up with good estimates.
- What are the anticipated steady state and peak user loads? Are there are any particular times of the day, week or year when load peaks are observed? While there may be several million registered customers for an online business, typically only a fraction of them are logged in and performing business transactions, at any point in time. A common mistake during capacity planning is to use the total size of customer population as the basis and not the average and peak numbers for concurrent users. The number of concurrent users, also may exhibit interesting time based patterns.
- What is the average and peak amount of data transferred per request? This is also very application specific. Good estimates for content size, combined with other usage patterns, will help the administrator anticipate network capacity needs.
- What is the expected growth in user load over the next 12 months? Planning ahead for the future, will help avoid crisis situations and system downtimes for upgrades.
Further Information
- For details on performance guidelines regarding J2EE applications, see
http://java.sun.com/blueprints/performance/index.html- For details on optimizing EJB's, see
http://developer.java.sun.com/developer/technicalArticles/ebeans/sevenrules/- For details on profiling, see the Application Server Developer's Guide, chapter on Developing J2EE Applications; specifically the section titled Profiling Tools.
- For more details on SNMP monitoring see the Application Server Administrator's Guide, the chapter on Monitoring and Managing Applications.
- For more details on the domain.xml file see the Application Server Reference.