Home > Store

Performance Analysis for Java Websites

Register your product to gain access to bonus material or receive a coupon.

Performance Analysis for Java Websites


  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2003
  • Dimensions: 7-3/8" x 9-1/4"
  • Pages: 464
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-84454-0
  • ISBN-13: 978-0-201-84454-2

Performance is a serious issue. A website must be able to handle the demands of users today, as well as adapt to increasing demands in the future. A website's responsiveness to customers has a direct effect on the success of an organization. Many developers struggle with the complex issues of website performance. This book is a timely guide for enterprise website developers and QA teams. The authors combine their experience analyzing and improving hundreds of websites and show how to conduct an effective performance analysis. They demonstrate how to solve common yet difficult problems, how to monitor tests, and analyze the data collected. Exploring common website types such as brokerage, e-commerce, and B2B, they discuss different performance needs, as well as how to design a performance test for each type of website. They use IBM WebSphere as the example Java application server, yet the content transfers easily to others such as BEA's popular WebLogic.

Sample Content

Online Sample Chapters

Basic Java Performance Lingo

Java Test Environment Construction and Tuning

Downloadable Sample Chapter

Click below for Sample Chapter(s) related to this title:
Sample Chapter 1

Sample Chapter 9

Table of Contents




1. Basic Performance Lingo.

Measurement Terminology.

Load: Customers Using Your Web Site.

Throughput: Customers Served over Time.

Response Time: Time to Serve the Customer.

Optimization Terminology.

Path Length: The Steps to Service a Request.

Bottleneck: Resource Contention under Load.

Scaling: Adding Resources to Improve Performance.


2. Java Application Server Performance.

Web Content Types.

Web Application Basics.

The Model-View-Controller Design Pattern.


JavaServer Pages (JSPs).

Assorted Application Server Tuning Tips 56Beyond the Basics.

HTTP Sessions.

Enterprise JavaBeans (EJBs).

Database Connection Pool Management.

Web Services.

Other Features.

Built-in HTTP Servers.

General Object Pool Management.

Multiple Instances: Clones.


3. The Performance Roles of Key Web Site Components.

Network Components.



Proxy Servers.

Network Interface Cards (NICs).

Load Balancers.

Affinity Routing.

HTTP Servers.

Threads or Processes (Listeners).




Operating System Settings.



Application Servers.


Databases and Other Back-End Resources.


Web Site Topologies.

Vertical Scaling.

Horizontal Scaling.

Choosing between a Few Big Machines or Many Smaller Machines.

Best Practices.


4. Java Specifics.

The Java Virtual Machine.

Heap Management.

Garbage Collection.

Java Coding Techniques.

Minimizing Object Creation.

Multi-Threading Issues.


5. Performance Profiles of Common Web Sites.

Financial Sites.

Caching Potential.

Special Considerations.

Performance Testing Considerations.

B2B (Business-to-Business) Sites.

Caching Potential.

Special Considerations.

Performance Testing a B2B Site.

e-Commerce Sites.

Caching Potential.

Special Considerations.

Performance Testing an e-Commerce Site.

Portal Sites.

Caching Potential.

Special Considerations: Traffic Patterns.

Performance Testing a Portal Site.

Information Sites.

Caching Potential.

Special Considerations: Traffic Patterns.

Performance Testing an Information Site.

Pervasive Client Device Support.

Caching Potential.

Special Considerations.

Performance Testing Sites That Support Pervasive Devices.

Web Services.


6. Developing a Performance Test Plan.

Test Goals.

Peak Load.

Throughput Estimates.

Response Time Measurements.

Defining the Test Scope.

Building the Test.

Scalability Testing.

Building the Performance Team.


7. Test Scripts.

Getting Started.

Pet Store Overview.

Determining User Behavior.

A Typical Test Script.

Test Scripts Basics.

Model the Real Users.

Develop Multiple, Short Scripts.

Write Atomic Scripts.

Develop Primitive Scripts.

Making Test Scripts Dynamic.

Support Dynamic Decisions.

Dynamically Created Web Pages.

Dynamic Data Entry.

Provide Sufficient Data.

Building Test Scenarios.

Putting Scripts Together.

Use Weighted Testing.

Exercise the Whole Web Site.

Common Pitfalls.


Hard-Coded Cookies.

Unsuitable Think Times.

No Parameterization.

Idealized Users.

Oversimplified Scripts.

Myopic Scripts.


8. Selecting the Right Test Tools.

Production Simulation Requirements.



Automation and Centralized Control.

Pricing and Licensing.

Tool Requirements for Reproducible Results.


Verification of Results.

Real-Time Server Machine Test Monitoring.

Buy versus Build.


9. Test Environment Construction and Tuning.

The Network.

Network Isolation.

Network Capacity.

e-Commerce Network Capacity Planning Example.

Network Components.

Network Protocol Analyzers and Network Monitoring.

The Servers.

Application Server Machines.

Database Servers.

Legacy Servers.

The Load Generators.

Master/Slave Configurations.

After the Performance Test.

Hardware and Test Planning.


10. Case Study: Preparing to Test.

Case Study Assumptions.

Fictional Customer: TriMont Mountain Outfitters.

An Introduction to the TriMont Web Site.

Site Requirements.

Initial Assessment.

Next Steps.

Detailed TriMont Web Site Planning Estimates.

Calculating Throughput (Page Rate and Request Rate).

Network Analysis.

HTTP Session Pressure.

Test Scenarios.

Moving Ahead.


11. Executing a Successful Test.

Testing Overview.

Test Analysis and Tuning Process.

Test and Measure.




Test Phases.

Phase 1: Simple, Single-User Paths.

Phase 2: User Ramp-Up.

Test Environment Configurations.

Start Simple.

Add Complexity.


12. Collecting Useful Data.

CPU Utilization.

Monitoring CPU on UNIX Systems.

Monitoring CPU on Windows Systems.

Monitoring CPU with a Test Tool.

Java Monitoring.

Verbose Garbage Collection.

Thread Trace.

Other Performance Monitors.

Network Monitoring.

Software Logs.

Java Application Server Monitors.


13. Common Bottleneck Symptoms.


Insufficient Network Capacity.

Application Serialization.

Insufficient Resources.

Insufficient Test Client Resource.

Scalability Problem.

Bursty Utilization.

Application Synchronization.

Client Synchronization.

Back-End Systems.

Garbage Collection.

Timeout Issues.

Network Issues.

High CPU Utilization

High User CPU.

High System CPU.

High Wait CPU.

Uneven Cluster Loading.

Network Issues.

Routing Issues.


14. Case Study: During the Test.


Test Environment.

Hardware Configuration.

Input Data.

Calculating Hardware Requirement Estimate (Pre-Test).

HTTP Session Pressure.

Testing Underway.



Next Steps.


15. Capacity Planning and Site Growth.

Review Plan Requirements.

Review Load, Throughput, and Response Time Objectives.

Incorporate Headroom.

Review Performance Test Results.

Single-Server User Ramp-Up.

Scalability Data.

Processor Utilization.

Projecting Performance.

Projecting Application Server Requirements.

Projecting Hardware Capacity.

Scaling Assumptions.

Case Study: Capacity Planning.

Review Plan Requirements.

Review Performance Test Results.

Project Capacity.

Ongoing Capacity Planning.

Collecting Production Data.

Analyzing Production Data.


Appendix A. Planning Worksheets.

Capacity Sizing Worksheet.

Input Data.

Calculating Peak Load (Concurrent Users).

Calculating Throughput (Page Rate and Request Rate).

Network Capacity Sizing Worksheet.

Input Data.

Calculating Network Requirements.

Network Sizing.

JVM Memory HTTP Session Sizing Worksheet.

Input Data.

Calculating HTTP Session Memory Requirement.

Hardware Sizing Worksheet.

Input Data.

Calculating Hardware Requirement Estimate (Pre-Test).

Capacity Planning Worksheet.

Part 1: Requirements Summary.

Part 2: Performance Results Summary.

Part 3: Capacity Planning Estimates.

Appendix B. Pre-Test Checklists.

Web Application Checklist.


Java Server Pages.



Static Content.


HTTP Session.

Enterprise JavaBeans.

Web Services.

Database Connection.

Object Pools.

Garbage Collection.

Component Checklist.



Proxy Servers.

Network Interface Cards.

Operating System.

HTTP Servers.

Web Container.

Thread Pools.

Enterprise JavaBean Container.

JVM Heap.

Application Server Clones.

Database Server.

Legacy Systems.

Test Team Checklist.

Test Team.

Support Team.

Web Application Developers.

Leadership and Management Team.

Test Environment Checklist.

Controlled Environment.



Prerequisite Software.

Application Code.


Test Simulation and Tooling Checklist.

Performance Test Tool Resources.

Test Scripts and Scenarios.


Appendix C. Test Tools.

Performance Analysis and Test Tool Sources.

@BHEADS = Java Profilers.

Performance Test Tools.

Java Application Performance Monitoring.

Database Performance Analysis.

Network Protocol Analyzers.

Product Capabilities.

Production Monitoring Solutions.

Load Driver Checklist.

Sample LoadRunner Script.

LoadRunner Initialization Section.

LoadRunner Action1 Section.

LoadRunner End Section.

Sample SilkPerformer Script.

, Browse, and Purchase Script.

Search Script.

New Account Script.

Appendix D. Performance Test Checklists and Worksheets.

Performance Test Results Worksheet.

Results Verification Checklist.

Tuning Settings Worksheet.


Operating System.

HTTP Server.

Application Server.


Application Parameters.

Database Server.

Bottleneck Removal Checklist.


Bursty Utilization.

High CPU Utilization.

Uneven Cluster Loading.

Summary Test Results Graph.


Index. 0201844540T08282002


Does your website have enough capacity to handle its busiest days? Will you lose potential customers because your web application is too slow? Are you concerned about your e-business becoming the next cautionary tale highlighted on the evening news?

The authors of this book combine their experiences with hundreds of public and private websites worldwide to help you conduct an effective performance analysis of your website. Learn from the experts how to design performance tests tailored to your website's content and customer usage patterns.

In addition to designing better tests, the book provides helpful advice for monitoring tests and analyzing the data collected. Are you adding load, but not seeing increased throughput? Do some machines in your environment work much harder than the others? Use the common symptom reference to isolate bottlenecks and improve performance.

Since many sites use a Java application server to power their web applications, the authors discuss the special considerations (garbage collecting, threading, heap management, to name a few) unique to the Java environment. Also, the book covers the special performance requirements of sites supporting handheld devices, as well as sites using Enterprise Java Beans (EJBs).

Designed to benefit those with a little or a lot of performance testing background, this book helps you get the most from your performance analysis investment. Learn how to determine the best your site will do under the worst of conditions.



Untitled Document Foreword

About a year ago I was sent out to a large Fortune 500 WebSphere customer to solve a critical "WebSphere performance" problem. The customer was close to putting a WebSphere application into production, and believed they had discovered-with less than a week to go before the application was to go into production-that WebSphere "did not perform well."

No one seemed to have many details about the problem, but we were assured by the highest levels of management at both the customer's company and IBM that this was indeed a critical situation. So I dropped everything and headed out the next morning on a 6:30am flight. At the company I met with the customer representative, who showed me an impressive graph (the output of a popular load-testing tool) that demonstrated that their application reached a performance plateau at five simultaneous users, and that response times increased dramatically as more load was placed on the system.

I asked if they could run the test while I watched so that I could see the numbers myself. I was told no-the hardware they were using for performance testing was also being used for user-acceptance testing. It would not be available until after 4pm that day. So I asked if I could see the test scripts themselves. to see how they were testing the application. Again the answer was no. The fellow who wrote the scripts wouldn't return until 5pm, and no one else knew where he kept them.

Not wanting to seem like I was wasting time, I next asked for the source code for the application. They were able to provide it, and I spent the next eight hours reading through it and making notes about possible bottlenecks. When the script author returned at 5pm, we reconfigured the test machine and ran the script. Sure enough, the performance curve looked like what the test had caught the previous night. I asked him to walk me through the code of the test script. He showed me what each test did, and how the results were captured. I then asked him about one particular line of code in the middle of the script: "So, here you seem to be hard-coding a particular user ID and password into the test. You neverm vary it, regardless of the number of simultaneous users the load testing tool simulates?"

He said that this was true and asked if that could be a problem. I explained to him that their test setup used a third-party security library, and that one of the "features" of this library was that it restricted users with the same user ID and password from logging in twice. In fact, it "held" requests for the second login until the first user using that login has logged out. I had picked up on this fact by reading the code that morning. I then asked if he could rewrite the script to use more than one login ID. In fact, if they wanted to test up to a hundred simultaneous logins, could he rewrite the script so that it used a hundred different login IDs? He ended up doing just that, and the next night, after a few more such adventures, we reran the modified test.

This time WebSphere performed like a champ. There was no performance bottleneck, and the performance curve that we now saw looked more like what I had expected in the first place. There were still some minor delays, but the response times were much more in line with other, untuned customer applications I had seen.

So what was wrong here? Why did this company have to spend an enormous amount of money on an expensive IBM consultant just to point out that their tests weren't measuring what they thought they measured? And why were we working under such stressful, difficult circumstances, at the last possible moment, with a vendor relationship on the line?

What it came down to was a matter of process. Our customer did not have a proper process in place for performance testing. They did not know how to go about discovering performance problems so that they could be eliminated. The value that this company placed on performance testing was demonstrated by the fact that the performance tests were scheduled for after hours, and were done on borrowed hardware. Also, the fact that this problem was not discovered until less than a week before the planned deployment date of the application showed the priority that performance testing had among other development activities; it was an "afterthought," not a critical, ongoing part of development.

I have repeatedly seen large, expensive systems fail-and thousands or millions of dollars lost-because of this attitude. As a wise man once said "failing to plan is planning to fail." The book you hold in your hand can help you to avoid such failures. It offers concise, easy to follow explanations of the different kinds of performance problems that large-scale web applications face. More important, it provides you with a process and methodology for testing your systems in order to detect and fix such problems before they become project-killers.

The authors of this book are all respected IBM consultants and developers, with years of collective experience in helping solve customer problems. They've dealt with the foibles of application servers, customer application code, network configuration issues, and a myriad of other performance-stealing problems. They convey their experiences and recommendations in a laid-back, easy to understand way that doesn't require that you to have a Ph.D. in stochastic modeling to understand. I believe their greatest contribution to the world is a process for injecting performance testing into all stages of the development process-making it, appropriately, a key part of web site development.

If you are building a large web site using J2EE technologies-or even just a small, departmental application-buy this book. Performance problems can creep in to all sizes of applications, and the time that you will save by following the advice given here will easily repay the purchase price of this book many times over. I've come to rely on the authors for advice in this area, and I'm sure you will too.

-Kyle Brown
Senior Technical Staff Member
IBM Software Services for WebSphere


Click below to download the Index file related to this title:


Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020