CMG performance modeeling for web apps
CMG performance modeeling for web apps
Performance Professionals
The Computer Measurement Group, commonly called CMG, is a not for profit, worldwide organization of data processing professionals committed to the
measurement and management of computer systems. CMG members are primarily concerned with performance evaluation of existing systems to maximize
performance (eg. response time, throughput, etc.) and with capacity management where planned enhancements to existing systems or the design of new
systems are evaluated to find the necessary resources required to provide adequate performance at a reasonable cost.
This paper was originally published in the Proceedings of the Computer Measurement Group’s 2001 International Conference.
Copyright 2001 by The Computer Measurement Group, Inc. All Rights Reserved. Published by The Computer Measurement Group, Inc. (CMG), a non-profit
Illinois membership corporation. Permission to reprint in whole or in any part may be granted for educational and scientific purposes upon written application to
the Editor, CMG Headquarters, 151 Fries Mill Road, Suite 104, Turnersville , NJ 08012.
BY DOWNLOADING THIS PUBLICATION, YOU ACKNOWLEDGE THAT YOU HAVE READ, UNDERSTOOD AND AGREE TO BE BOUND BY THE
FOLLOWING TERMS AND CONDITIONS:
License: CMG hereby grants you a nonexclusive, nontransferable right to download this publication from the CMG Web site for personal use on a single
computer owned, leased or otherwise controlled by you. In the event that the computer becomes dysfunctional, such that you are unable to access the
publication, you may transfer the publication to another single computer, provided that it is removed from the computer from which it is transferred and its use
on the replacement computer otherwise complies with the terms of this Copyright Notice and License.
Copyright: No part of this publication or electronic file may be reproduced or transmitted in any form to anyone else, including transmittal by e-mail, by file
transfer protocol (FTP), or by being made part of a network-accessible system, without the prior written permission of CMG. You may not merge, adapt,
translate, modify, rent, lease, sell, sublicense, assign or otherwise transfer the publication, or remove any proprietary notice or label appearing on the
publication.
Disclaimer; Limitation of Liability: The ideas and concepts set forth in this publication are solely those of the respective authors, and not of CMG, and CMG
does not endorse, approve, guarantee or otherwise certify any such ideas or concepts in any application or usage. CMG assumes no responsibility or liability
in connection with the use or misuse of the publication or electronic file. CMG makes no warranty or representation that the electronic file will be free from
errors, viruses, worms or other elements or codes that manifest contaminating or destructive properties, and it expressly disclaims liability arising from such
errors, elements or codes.
General: CMG reserves the right to terminate this Agreement immediately upon discovery of violation of any of its terms.
Learn the basics and latest aspects of IT Service Management at CMG's Annual Conference - www.cmg.org/conference
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
Richard L. Gimarc Amy Spellmann
HyPerformix, Inc. HyPerformix, Inc.
rgimarc@hyperformix.com amy@hyperformix.com
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
an estimate of the workload level at some future
time or event. For example, a brokerage site will measurement and collection techniques for
need to understand the customer experience gathering performance metrics.
during a market storm; an online bookstore will § Validation of the Approach demonstrates the
be interested in site availability following the accuracy of the model results and the efficient
release of a new novel by a best-selling author. collection of the model inputs.
§ Optimization Alternatives outlines the potential
8. Predict eBusiness Site Performance. The
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
Server Processing. With the open TCP For ease of explanation, we make the following
connection, the browser sends a GET request to the assumptions about the complexity of the Web sites
server for a particular Web page. If the request is for and user interaction that we will be studying: the
a static page, the server will prepare to send the user will request a single page with static content,
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
fixed HTML file representing the page back to the page requests will not be redirected, and the
browser. In the case of a dynamic page, additional browser time required to produce a page is
Web server or other backend processing may be negligible. Thus, we will not be including the
required before the page is ready to be returned to following Reference Model components:
the browser. Redirection, Page Rendering, and User Interaction.
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
DNS Server
Page Name & Size
Object Name & Size
Web
Firewall
Browser Server Page
Content
i M ac Internet
we will be viewing the Internet as a single abstract exist, or c) many interdependent concurrent
“cloud” characterized by latency and bandwidth. For transactions compete within a heterogeneous
browsers at different geographic locations, their environment such as modern client-server
respective Internet characterization will be systems.
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
dependent on their connectivity with the Web server.
Simulation is a problem-solving approach that
Firewall. A firewall is generally used to shield a is proactive, more flexible and adaptive than
Web site from the global Internet population. As an are rules of thumb, more predictive than is
abstraction, a Web site’s firewall will not be directly measurement, more efficient and practical
represented in our model. We assume that the than is benchmarking, and better suited to
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
performance characteristics of the firewall are complex new technology than is analytic
captured in the Web server and/or Internet modeling.
measurement data.
Domanski points out a potential drawback of
Web Server. The single Web server will receive simulation modeling in [DOMA1997]:
and service three types of requests: open a TCP
connection, request a page, and request a content Discrete event simulation, while very
element. Since the server time required to open a accurate, is time-consuming in terms of both
TCP connection is negligible, it will not be directly the time required to build the model as well as
represented in the model. Web server service times the time required to execute the model.
are dependent on the server itself and not the
location of the requesting browser. In this study, we develop a reusable Web application
model using Strategizer that has just enough detail
Page Content. The final set of data required by the to accurately predict end user response times. We
model is a description of the pages that are being demonstrate that simulation modeling is an effective
requested. This data must describe the size of each technique for analyzing Web application
HTML page and embedded content element (e.g., performance.
graphic object) requested by the browser. Page
content is an example of static data, that is, data that In addition, a simulation model is the appropriate
is independent of architectural, geographic, or tool for staged development. The high-level model
loading factors. described in this paper is appropriate for
representing the customer experience. The next
step is to refine the representation of the site’s
3 Modeling Techniques components behind the firewall to develop a more
detailed model appropriate for studying site
Analytic Versus Simulation Modeling scalability and architecture.
A simulation model was used in this study, rather
than an analytic model, due to the dynamic nature of A Reusable Web Application Model
Internet applications and the need to vary the level As stated earlier, we are using the Reference Model
of detail in the model. Analytic modeling cannot, as the framework for describing the performance of
without great effort, represent systems at varying a Web application from the end user’s perspective.
levels of detail. Additionally, Internet applications In order to be generally reusable, a performance
tend to have transient loads (bursty and varying by model must represent the same stages as the
time of day); analytic models cannot easily capture Reference Model. The model developed for this
these types of behaviors. Modeling a Web study includes the same components illustrated
application requires a technology that is robust earlier in Figure 1: browsers with varying network
enough to handle these key characteristics. connectivity, the DNS server, the Internet, and the
Web server. Additionally, we include descriptions of
In [NEUS1998], Neuse argues that simulation the Web pages and content elements that are
modeling is the appropriate tool for analyzing requested by the user.
complex systems, especially those with rapidly
changing components and architectures: Strategizer is the general-purpose modeling tool we
used to develop our reusable Web application
Analytic models are poorly suited to projects model. Strategizer contains a number of built-in
in which a) new architectures are being components for representing the basic hardware
studied and little time is available to develop and network elements. This section describes the
and validate the models (e.g., the alternatives additional browser and application logic that was
must be evaluated soon after they are modeled to represent the workflow and resource
proposed), b) new technology is being used requirements of our Web application.
for which existing, validated models do not
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
Figure 2 shows the Strategizer model of the Web The model’s input parameters are shown in Figure
site. Client_1 and Client_2 represent browsers at 3. Note that these are exactly the same parameters
two different locations. Each browser has identified earlier in Figure 1. Each browser is
connectivity to a Local_ISP for DNS lookup and to parameterized with switches to enable local browser
the Internet via a network link. The Web site is caching (CLIENT_ENABLE_BROWSER_CACHE)
represented at a high-level by the components and the use of TCP persistent connections to the
connected to the switched Ethernet (HPFX_LAN): a Web server
Web server and an application server. For this initial (CLIENT_PERSISTENT_TCP_CONNECTION). In
study, the application server is a placeholder order to represent different types of browsers, there
included as a starting point for future analysis. is an additional parameter describing the maximum
number of parallel threads that may be used to
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
// Object_Name Object_Size_Bytes Object_Source
OBJ /images/background.jpg 5624 HPFX_Web_Services
OBJ /images/back.gif 283 HPFX_Web_Services
OBJ /images/top-bar.gif 101 HPFX_Web_Services
OBJ /images/top-bar-fade.jpg 640 HPFX_Web_Services
OBJ /images/below -logo.jpg 2851 HPFX_Web_Services
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
retrieve embedded content elements order of the content elements on the page so that
(MAX_BROWSER_CONNECTIONS). For the model can accurately mimic the behavior of
simplicity, DNS Lookup time is described with a the browser’s download of content.
single parameter (DNS_LOOKUP_SERVICETIME). 2. Browser Connectivity. Data is required that
Each browser location is connected to the Web site characterizes the browser’s connectivity with the
using its own parameterized view of the Internet Web site: latency and bandwidth.
(e.g., Client_1_Link is the network link for Client_1).
3. Web Application Performance. The Web
Web site connectivity for Client 1 is parameterized
server is the primary component of the
with latency (CLIENT_1_LINK_LATENCY) and
application that we are representing in our initial
bandwidth (CLIENT_1_LINK_BANDWIDTH). There
model. Data must be collected that characterizes
are two final parameters that describe the
the service time for page and content element
performance of the Web server: service time for
requests.
processing a page request
(WEBSVR_PAGE_SERVICETIME) and service time
This section describes the measurement data
to process a request for a content element
sources for the performance model. We then
(WEBSVR_OBJECT_SERVICETIME).
describe how we used the collected data to develop
The static data describing Web page content is values for the model’s input parameters.
supplied from a spreadsheet. The spreadsheet
contains a description of the base HTML page and Page Content
the page’s embedded content elements. Figure 4 The following data is required to characterize a Web
lists the initial portion of the spreadsheet. The figure page:
shows a Web page named HIRES_HOME_PAGE.
The size of the base page is 44,709 bytes, and is § Size of the base HTML page. We assume that
located at HPFX_Web_Services. The page’s the base page is stored locally at the Web site.
content elements are listed, in order, on the OBJ § Size and location of each embedded content
lines. element. Note that there may be static content
elements stored remotely on a Content Delivery
The key to quickly building a model of a Web
Network.
application lies in collecting measurement data and
developing appropriate values for the model’s input § Order of the content elements on the page. In
parameters. Automating this process requires a general, the browser will request content
well-defined and repeatable methodology. This elements in the order they appear in the base
methodology is described in the following section. page’s HTML. This may have a performance
impact depending on the number of parallel
4 Measurement Methodology threads a browser uses to retrieve embedded
content.
The measurement data required to build our
performance model can be classified into the Microsoft Internet Explorer can be used to directly
following three categories: determine the size of a Web page.
1. Page Content. Data that characterizes the § The File menu contains a Properties selection
content of each requested page: the size of the that will display the number of bytes in the
base page and the size of each embedded displayed page.
content element. It is also important to know the
§ The View menu contains a Source selection that lists graphic images; if the Web page contains other
displays the HTML source in Notepad. This file downloadable content (e.g., a Macromedia flash file)
may be saved and examined for size they will not be shown in the image list.
information.
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
Internet Explorer can also be used to determine the
§ The File menu also has a Save As selection that
graphic content of a Web page by examining the
allows you to save a copy of the displayed page
subdirectory created with the File menu Save As
and embedded graphics. Note that this
selection. The subdirectory will contain a copy of
technique will modify the base page’s HTML
each graphic object contained on the saved page.
since relative directory names based on the
The problem with this technique is that it does not
page’s title are inserted into the IMG tags. For
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
Reply from 208.44.216.93: bytes=32 time=100ms TTL=112
Reply from 208.44.216.93: bytes=32 time=90ms TTL=112
Reply from 208.44.216.93: bytes=32 time=90ms TTL=112
Reply from 208.44.216.93: bytes=32 time=90ms TTL=112
Reply from 208.44.216.93: bytes=32 time=90ms TTL=112
Reply from 208.44.216.93: bytes=32 time=91ms TTL=112
Reply from 208.44.216.93: bytes=32 time=90ms TTL=112
Reply from 208.44.216.93: bytes=32 time=100ms TTL=112
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
Trace complete.
Sample
Component Description
Value
Total Time 2.98 Response time for the single page request.
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
Time spent translating the domain name of the requested URL into an IP
DNS Time 0.00 address.
The time required for the agent to open a TCP connection with the Web
Connection Setup Time 0.10 server. This is the 3-way protocol handshake done by TCP.
The elapsed time from when the agent sends the request for a page until it
Time to First Byte 0.23 sees the first byte back from the Web server. This is a single round trip
across the Internet.
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
There is one potential drawback when using either between the browser and the Web site. We used
ping or traceroute; many Web site administrators the Index Time metric reported by the measurement
configure their routers to ignore echo packets, so the agents to develop an estimate for bandwidth.
commands timeout.
Index Time is the elapsed time between the arrival
Web Application Performance of the first HTML packet at the browser and the
complete arrival of the last packet in the base page.
Keynote Perspective (see [KEYN2001]) was used to Bandwidth is estimated by dividing the page size by
collect measurements for the time it takes to access Index Time.
and download the total elements of a page. These
measurements are taken from a number of CLIENT_1_LINK_LATENCY. A latency value is
geographically distributed measurement computers required for each browser connected to the Web
(“agents”). The four key operational characteristics site. This value can come from three sources: ping,
of these agents are: traceroute, or Keynote Perspective.
1. The agent’s local cache is cleared before each Ping and traceroute are direct measures of the
page request. round trip time between the issuing station and a
target IP address. The Connection Setup Time
2. The agents use HTTP 1.0. This means that a
new TCP connection is opened for each agent metric can also be used as an estimate. In
[MILL2001] Mills’ states that TCP Connection time
request to the Web server (nonpersistent
(from the Reference Model) is an excellent estimate
connections).
of the round-trip latency between a browser and
3. Page content is downloaded using up to four Web server. The reason for this is that (a) the SYN
parallel threads. and SYN/ACK packets used in the 3-way handshake
4. Agents connect to the Internet using high-speed are relatively small, (b) under normal load, very little
networks (T1 or T3 lines). delay occurs within the server's TCP software, and
(c) no server applications software is executed.
Figure 8 summarizes the measurement data used in Figure 9 compares the three data sources for
this study. The sample values are those measured network latency.
by the Seattle Exodus agent accessing
www.hyperformix.com/index.html. Average Minimum Maximum
ping 93 90 110
Developing Model Input Parameters traceroute 96 90 100
Connection Setup Time 101.4 90 190
The measurement source described in the previous
three sections can be used to develop values for the Figure 9. Network Latency (milliseconds)
performance model’s input parameters. This section
describes the techniques used to determine values CLIENT_ENABLE_BROWSER_CACHE. The
for the parameters listed in Figure 3. modeled browser has a switch that controls caching
of objects within the browser. This option was
CLIENT_1_BANDWIDTH. For each browser, the disabled because (a) we were representing single
model requires a value for the average bandwidth page requests, and (b) no duplicate content
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
Another browser parameter controls whether it is return to the browser. We initially assume equal
using HTTP 1.0 (non-persistent connection) or HTTP values for page and object service time.
1.1 (persistent connection) to communicate with the
Web server. The measured response times for our The page and object service times are verified and
validation targets were taken from agents using non- refined as part of the model calibration. Model
persistent connections; thus we set the modeled calibration will be performed as the first step of
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
browsers to use non-persistent connections. model validation, which is discussed in the next
section.
DNS_LOOKUP_SERVICETIME. DNS Lookup is a
difficult metric to measure without an instrumented
browser or a network packet analyzer. For our
5 Validation of the Approach
model we used DNS Time as reported by the Proving that we have met our goal to develop a
measurement agent. As an alternative, we suggest reusable and efficient modeling and measurement
using industry standard values for DNS Lookup process requires that we demonstrate the following:
since it is such a small rf action (on average, less
than 1%) of the overall end user response time. In 1. Model inputs can be developed quickly using a
[MILL2001] Mills summarizes measurements from repeatable methodology.
40 leading eBusiness sites during January 2001. 2. The performance model accurately predicts Web
Industry average times are shown in Figure 10. site response times.
Average Median Standard We validate our approach by first measuring and
Deviation
modeling the HyPerformix, Inc. home page and
DNS Lookup 0.02 0.01 0.03
validating the accuracy of the model by comparing
Response Time 2.28 1.81 1.78
predicted response times to measured times. Then,
DNS Lookup Pct 0.87% 0.55%
we repeat the process on two other Web sites (that
offer static content) to show that we can quickly build
Figure 10. KB40 DNS Lookup Times
models to accurately predict the response times of
MAX_BROWSER_CONNECTIONS. This those sites.
parameter limits the number of parallel threads the
The baseline model described in Section 3 was used
browser may use for retrieval of embedded page
to predict the response times for all three Web sites.
content. The agents used to take response time
For each site we collected (remote) measurements
validation measurements emulated a browser with
describing the Web page content, user connectivity,
four threads; thus we set the thread limit of our
and the performance of the application. These
modeled browsers to four.
measurements were developed into model input
WEBSVR_OBJECT_SERVICETIME. Object parameters as described earlier. Then, we used
service time is the average amount of time required response time measurements from four remote
by the Web server to fetch and prepare an object for measurement locations to validate each model.
return to the browser. Measurements collected
directly from the Web server are the best data HyPerformix Home Page
source. In this study we used a technique to The first validation test was performed against the
estimate service time for both a page and object home page for HyPerformix, Inc. Approximately 900
request that proved to work quite well. measurements were collected from each remote
measurement agent. The home page’s base HTML
The measurement agents collect and report a metric
is approximately 44Kbytes and contains 33 unique
called Time to First Byte. This value represents the graphic images totaling 39Kbytes. The Web server
time between the completion of TCP Connection
service times were refined during the initial
and the browser’s receipt of the first HTML packet
calibration of the model. These refined values were
containing the requested page. Service time can be then used for the three remaining validation tests for
estimated from this metric by subtracting out the
this site. The results of the validation are shown in
average round-trip latency between the browser and
Figure 11.
Web server.
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
Amsterdam UUNET Boston UUNET
Measured Modeled Delta Measured Modeled Delta
Base Page Download 1.06 1.03 3.1% 0.60 0.63 5.3%
Content Download 2.73 2.90 6.1% 1.52 1.61 5.9%
Response Time 4.02 4.16 3.5% 2.19 2.31 5.4%
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
home page of a technology company. Remote capable of using 4 parallel threads for retrieval of
agents were again used as the measurement embedded content. The model parameter
source. The company’s base page is approximately MAX_BROWSER_CONNECTIONS may be
28Kbytes and contains about 30 unique graphic varied to represent Internet Explorer (2 threads)
images totaling 42Kbytes. The measurements or Netscape Navigator (up to 6 threads) (see
collected from this site were used directly in the [WANG1998]).
model; no refinement of service times was required.
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe
The results of the validation are shown in Figure 12. 3. Web Server Configurations. The model uses
non-persistent TCP connections for retrieval of
TPC Home Page Web pages and content elements. Persistent
The final validation test used the home page for the connections are supported in HTTP 1.1; however
Transaction Processing Performance Council (TPC) there are Web sites that still use HTTP 1.0 due to
at www.tpc.org. Approximately 600 measurements concerns about concurrent connection resource
were collected from each remote measurement usage. The model parameter
agent. The TPC home page’s base HTML is CLIENT_PERSISTENT_TCP_CONNECTION
approximately 14Kbytes with 12 unique graphic can be used to study user response time
images totaling 20Kbytes. The Web server service improvement with persistent connections.
times were refined during the initial validation test.
These refined values were then used for the 4. Page Design. The model supports the ability to
remaining three tests for this site. Figure 13 shows vary page composition (the number and size of
the results of the validation from the four remote the page’s content elements) to predict response
measurement agents. time improvements expected at each remote user
location. Page design changes would be made
Validation Summary to the page description file shown in Figure 4.
The modeled results from each validation test
compared favorably with measured values: modeled 5. Baseline Model. Most importantly, the model is
response times were within 10% of measured. a starting point for analyzing changes to the
Furthermore, the same methodology was used to application(s) behind the firewall. Drilling down to
develop model input parameters for each validation add detail to the model to represent more
test. complex backend processing requires additional
data collection and workload characterization.
These results demonstrate that our model is The high-level model presented in this paper is a
sufficiently accurate to proceed with the evaluation starting point; it contains sufficient detail to study
of optimization alternatives. a number of design and connectivity questions.
Buy the Latest Conference Proceedings and Find Latest Computer Performance Management 'How To' for All Platforms at www.cmg.org
representing response times and therefore can be
easily parameterized to represent any Web [DOMA1997] Bernard Domanski and James J.
application. McGalliard, “Sizing the Server(s) but Not Knowing
Enough: Open System Performance Modeling”,
The greatest challenge comes in collecting the CMG 1997 Proceedings.
metrics needed to develop the model’s input
[HYPR2001] For information about Strategizer from
Join over 14,000 peers - subscribe to free CMG publication, MeasureIT(tm), at www.cmg.org/subscribe