Performance Analysis for Java Websites / Edition 1

Performance Analysis for Java Websites / Edition 1

5.0 2
by Stacy Joines, Ruth Willenborg, Ken Hygh

ISBN-10: 0201844540

ISBN-13: 9780201844542

Pub. Date: 09/28/2002

Publisher: Addison-Wesley

How well a Web site performs while receiving heavy user traffic is an essential factor in an organization's overall success. How can you be sure your site will hold up under pressure?

Performance Analysis for Java™ Web Sites is an information-packed guide to maximizing the performance of Java-based Web sites. It approaches these sites as

…  See more details below


How well a Web site performs while receiving heavy user traffic is an essential factor in an organization's overall success. How can you be sure your site will hold up under pressure?

Performance Analysis for Java™ Web Sites is an information-packed guide to maximizing the performance of Java-based Web sites. It approaches these sites as systems, and considers how the various components involved, such as networks, Java™ Virtual Machines, and backend systems, potentially impact overall performance. This book provides detailed best practices for designing and developing high-performance Java Web applications, and instructions for building and executing relevant performance tests to gauge your site's ability to handle customer traffic. Also included is information on how to use the results of performance testing to generate accurate capacity plans.

Readers will find easy-to-understand explanations of fundamental performance principles and terminology. The book runs through performance profiles for common types of Web sites, including e-commerce, B2B, financial, and information exchange. Numerous case studies illustrate important ideas and techniques. Practical throughout, the book also offers a discussion on selecting the right test tools and troubleshooting common bottlenecks frequently revealed by testing.

Other specific topics include:

  • Performance best practices for servlets, JavaServer Pages™, and Enterprise JavaBeans™
  • The impact of servlets, threads, and queuing on performance
  • The frozen Web site danger
  • Java™ Virtual Machine garbage collection and multithreading issues
  • The performance impact of routers, firewalls, proxy servers, and NICs
  • Test scenario and script building
  • Test execution and monitoring, including potential pitfalls
  • Tuning the Web site environment
  • Component monitoring (servers, Java™ Virtual Machines, and networks)
  • Symptoms and solutions of common bottleneck issues
  • Analysis and review of performance test results
  • Performance Analysis for Java™ Web Sites not only provides clear explanations and expert practical guidance, it also serves as a reference, with extensive appendixes that include worksheets for capacity planning, checklists to help you prepare for different stages of performance testing, and a list of performance-test tool vendors.


    Read More

    Product Details

    Publication date:
    Edition description:
    New Edition
    Sales rank:
    Product dimensions:
    7.30(w) x 9.00(h) x 1.00(d)

    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.

    Sign-in, 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

    Read More

    Customer Reviews

    Average Review:

    Write a Review

    and post it to your social network


    Most Helpful Customer Reviews

    See all customer reviews >

    5 out of 5 based on 0 ratings. 2 reviews.
    Guest More than 1 year ago
    You have a website with problems. The front end is a set of http servers that invoke Java application servers to run servlets and JSPs. The servlets read and write, maybe via Enterprise Java Beans, to a relational database. The website might be financial (like eTrade), or a portal (like Yahoo), or an information site (like google), or a B2C commerce site (like Amazon) or a C2C (like eBay). You want to measure and improve key metrics like response time, throughput and caching. Security may also be important, but for efficiency, you only want to encrypt the minimum possible. You also probably have a firewall or two; in the latter case, you have a DMZ. And in this case, you often put the http servers inside the DMZ and the application servers and database behind the DMZ. Plus, you anticipate and hope for (and dread) heavy usage. So you also have a caching proxy server and router in the DMZ, where the router will load balance incoming requests to the http servers. So you have many different pieces of hardware and software, usually from multiple vendors. The database could be from Oracle or IBM or Sybase. The application servers could be IBM's Websphere or BEA's Weblogic or the freeware from jBoss. Perhaps the http servers are Apache freeware. The key business logic may be written in java and running on the application servers. There are tons of books on java. But how to test and optimise the entire system? Do you have to hire expensive consultants? Maybe not. Try first looking at this book. Written in fact by 3 IBM consultants. You might be thinking, "Is this some going to be some smarmy sales pitch?" Where the take home message is buy only IBM and you will achieve nirvana? The book does not unfold that way. The authors describe the various problems at a vendor neutral level. The examples (and screen captures) are drawn from several vendors. The writing is clear and rises above being buried in the minutae of specific code. The book is for both the programmer and the systems administrator. This is not really a programming book per se. Rather, it deals with test and design strategies for optimising those abovementioned metrics. Emphasis is placed on quantifying results and on incremental ramp up, where you install hardware and software in stages, measuring at each stage so that you isolate the effect of just that stage. Key issues like network bandwidth, network traffic analysis and vertical and horizontal scaling are the purview of sysadmins. If you are a sysadmin who knows some java, but that's not really your cup of tea, and are confronted with these issues, try this book. IBM, through its alphaworks division and Websphere, has one of the largest development efforts in java. (Comparable to Sun's, in fact.) This book is good evidence of that.
    Guest More than 1 year ago
    First of all this book is very practical. The authors have shared their in-depth knowledge on identifying performance bottlenecks, tuning and deployment of Java webs. The book is loaded with a lot of DOs and DON'Ts for your Java Web performance that will save you a lot of time and effort. The time spent reading this book is highly rewarding. Secondly this book is incredibly methodical. It starts with a big picture and ends with a big picture. You will find many books that talk about Java tuning. However more often than not in a real life situation, the most difficult task is to find out where the bottlenecks are. According to the authors, a Java Web is a comprehensive system that includes components inside your firewall (such as HTTP server, App server, and DB server etc.) as well as outside your firewall (such as routers, load balancer, switch, etc.). The authors guide you through the maze of finding the bottlenecks by showing you what the common symptoms are and what the corresponding root causes will be. The book goes in-depth on how to plan, execute, and interpret effective performance testing. Reading through from chapter to chapter, you will find that you never lose track of what the chapter is about. If you are really short on time, you can actually just read the Introduction at the beginning and the Plan Sheets & Check List at the end. You will find it invaluable. Check it out yourself!