Web Performance Tuning Lin Wang, Ph.D. US Department of Education Copyright [Lin Wang] [2004]. This work is the intellectual property of the author. Permission is granted for this material to be shared for non-commercial, educational purposes, provided that this copyright statement appears on the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requires written permission from the author.
17
Embed
Web Performance Tuning Lin Wang, Ph.D. US Department of Education Copyright [Lin Wang] [2004]. This work is the intellectual property of the author. Permission.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Web Performance Tuning
Lin Wang, Ph.D.US Department of Education
Copyright [Lin Wang] [2004]. This work is the intellectual property of the author. Permission is granted for this material to be shared for non-commercial, educational purposes, provided that this copyright statement
appears on the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requires written permission from the author.
1. Introduction Web-based systems consist of multiple
components working together:
Browser Web ServerApplication
ServerDatabase
HTTP request
HTTP response
2. J2EE and Queue Network Java 2 Enterprise Edition (J2EE) is a platform for
multi-tier Web systems. J2EE applications service HTTP requests through a
network of queues:
Browser Web Server WebContainer
EJBContainer
DataSource
Request flow
3. Performance Tuning Performance refers to how fast HTTP requests
are serviced. Performance becomes a critical issue when a Web
site processes large volume of requests. Performance bottlenecks are software/hardware
components that impede request service. Performance tuning is to identify and eliminate
performance bottlenecks.
4. Tuning Steps
1. Understand the application.
2. Design load tests.
3. Perform the load tests and collect data.
4. Analyze the data to identify bottlenecks.
5. Eliminate the bottlenecks.
6. Repeat Steps 3 – 5 until the performance is satisfactory.
5. A Sample Application: CUSER A customer service Web site, CUSER, is a J2EE application using IBM
WebSphere Application Server. CUSERV implements JSP and Servlet. CUSER consists of an IBM HTTP Server, WebSphere Application
Server (WAS), CICS Transaction Gateway (CTG), and DB2 on OS/390.
CUSER has four pools of runtime elements: HTTP server processes, Servlet threads, CTG worker threads, and DB2 tasks.
The pools are connected by three queues, HTTP transport, data source connections, CTG connections.
HTTP ServerWAS Webcontainer
CTGHTTP
transportqueue
Data sourcequeue
CTGconnection
queueDB2
WAS CTG
IE Browser
6. Load Test Design (I)Test Scenarios
Performance objectives:Response time must not exceed 5 seconds.
1000 users are to be concurrently serviced.
Test scenarios:Retrieve an existing customer record.
Create a new customer record.
7. Load Test Design (II)Test Procedure
Each scenario run takes 4 minutes and is iterated until the end of test.
Each user executes the same scenario throughout the test. Two scenarios are evenly distributed to the users.
The test starts with one user. The next user is added 10 seconds after the previous user’s entry, amounting to total of 1000 users.