Upload
milo-prosper-lawrence
View
213
Download
0
Embed Size (px)
Citation preview
1
PREFETCHING INLINES TO IMPROVE WEB SERVER
LATENCY
Ronald DodgeUS Army
Daniel Menascé, Ph. D.George Mason [email protected]
Dodge & Menascé. All Rights Reserved.
2
Electronic Commerce: online sales are soaring
“… IT and electronic commerce can be expected to drive economic growth for many years to come.”
The Emerging Digital Economy,
US Dept. of Commerce, 1998.
Dodge & Menascé. All Rights Reserved.
3
Business in the Internet Age (Business Week, June 22, 1998)
Type of Business 1997 2001 (forecast)Business to Business 8.000 183.000Travel 0.654 7.400Financial Services 1.200 5.000PC Hardware & Software 0.863 3.800Entertainment 0.298 2.700Ticket Event Sales 0.079 2.000Books & Music 0.156 1.100Apparel & Footware 0.092 0.514Total 11.342 205.514
4
Caution Signs Along the Road
There will be jolts and delays along the way for electronic commerce: congestion is the most obvious challenge.
(Gross & Sager, Business Week, June 22, 1998, p. 166.)
5
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
6
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
7
Response Time Reduction Techniques
• Caching– web browser – proxy server
• Prefetching– predict what documents will be requested
and bring them into the cache ahead of time.
Dodge & Menascé. All Rights Reserved.
8
Browser Caching
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
Dodge & Menascé. All Rights Reserved.
9
Browser Caching
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
1
2
3
4Dodge & Menascé. All Rights Reserved.
10
Browser Caching
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.3
4
1
2
Dodge & Menascé. All Rights Reserved.
11
Browser Caching
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.3
4
1
2
Dodge & Menascé. All Rights Reserved.
12
Caching Proxy Server
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
1
2
3
4Dodge & Menascé. All Rights Reserved.
13
Caching Proxy Server
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
1
2
3
4Dodge & Menascé. All Rights Reserved.
14
Caching Proxy Server
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
1
2
3
4Dodge & Menascé. All Rights Reserved.
15
Caching Proxy Server
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
1
2
3
4Dodge & Menascé. All Rights Reserved.
16
Caching Proxy Server
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
1
2
3
4Dodge & Menascé. All Rights Reserved.
17
Caching Proxy Server
Clients
ProxyServer External Web
Servers
router(50sec/packet)
Internet
LAN (10 Mbps Ethernet)
.
.
.
1
2
3
4Dodge & Menascé. All Rights Reserved.
18
Goal
Improve user perceived latency through caching and
prefetching of inlines at the server side.
Dodge & Menascé. All Rights Reserved.
19
Related Work on Prefetching
• Padmanabhan, 1995– effects of prefetching on latency and network load.
• Chinen and Yamaguchi, 1996– prefetching to the proxy server the first N links of any
Web page.
• Crovella and Badford, 1997– network load can be minimized by adjusting prefetch
rate
• Foxwell and Menasce, 1998– prefetching results of search engine queries.
Dodge & Menascé. All Rights Reserved.
20
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
21
Browser ServerHTTP request
inline 1 request
inline 2 request
HTTP document
inline 1 file
inline 2 file
HTML documentparsed bythe browser
server disk
No Caching/Prefetching of Inlines
Dodge & Menascé. All Rights Reserved.
www.cs.gmu.edu
22
<H1><CENTER>Capacity Planning for Web Performance</H1><hr></CENTER><hr>
The introduction:<p><ul><dt><img src="http://www.cs.gmu.edu/dcc/icons/ball-blue.gif">[<a href="#intro">Introduction</a>]
<dt><img src="http://www.cs.gmu.edu/dcc/icons/ball-green.gif">[<a href="#goals">Capacity Planning</a>]
<dt><img src="http://www.cs.gmu.edu/dcc/icons/ball-red.gif">[<a href="#why economics">Web Performance Problems</a>]
<dt><img src="http://www.cs.gmu.edu/dcc/icons/ball-yellow.gif">[<a href="#questions">Web Performance Modeling</a>]
<dt><img src="http://www.cs.gmu.edu/dcc/icons/ball-orange.gif">[<a href="#papers">Publications</a>]</ul>
Dodge & Menascé. All Rights Reserved.
inline
23
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
24
Browser ServerHTTP request
inline 1 request
inline 2 request
HTTP document
inline 1 file
inline 2 file
HTML documentparsed bythe browser
server disk
HTML documentparsed byserver
cache
Caching/Prefetching of Inlines
Dodge & Menascé. All Rights Reserved.
www.cs.gmu.edu
25
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
26
Workload Characterization
Analysis of the HTTP log of a Web server at GMU:
- requester’s address- request arrival time- type of request- file requested- size of file requested
Dodge & Menascé. All Rights Reserved.
27
Previous Workload Characterization Work
Arlitt and Williamson (1996), Crovella and Bestravos (1996)
� The average size of a transferred document does not exceed 21KB
� Less than 3% of the requests are for distinct files.� The file size distribution is heavy-tailed. � File inter-reference times are exponentially
distributed and independent.
Dodge & Menascé. All Rights Reserved.
28
Interrarival time distribution
0.0
0.2
0.4
0.6
0.8
1.0
0 4 8 12 16 20 24 28 32 36
time (sec)
PDF cdf
F x eT
x~
.( ) 1 0 4493
Dodge & Menascé. All Rights Reserved.
average = 2 sec.
29
HTML file size distribution
0.0
0.2
0.4
0.6
0.8
1.0
0 5 10 15 20 25 30 35 40Size (Kbytes)
PDF cdf
724.1753.1)(~ xxF
H
Dodge & Menascé. All Rights Reserved.
average = 3,552 bytes.
30
Distribution of number of inlines per HTML document
0.0
0.2
0.4
0.6
0.8
1.0
0 20 40 60 80 100
Number of files
PDF cdf
163.2748.1)(~ xxF
NDodge & Menascé. All Rights Reserved.
average = 2.92 inlines.
31
Inline file size distribution
0.0
0.2
0.4
0.6
0.8
1.0
0 50 100 150
size (Kbytes)PDF cdf
473.1754.1)(~ xxF
IDodge & Menascé. All Rights Reserved.
average = 10,392 bytes.
32
File InterreferenceA.html B.html C.html D.html A.html
interreference distance = 3
Repeatfile?
Use interreference distributionto decide how many requests to look
back.
YES
Pick a new fileNO
Dodge & Menascé. All Rights Reserved.
33
File interreference distribution
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
0 20 40 60 80 100 120
PDF cdf
6204.005.00002.)( 2~ xxxFF
Dodge & Menascé. All Rights Reserved.
34
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
35
Network
CPU
Web browsers
WEB Server Cache
Disk
h
1 - h
Simulation Environment:
Dodge & Menascé. All Rights Reserved.
36
Simulation Experiment
• Simulation Tool: CSim
• Batch means analysis: accuracy 10% and confidence level of 95%.
• Cases studied:
Server Cache Size (Kbytes):0 16 32 64 128 256 512 1,024Number of clients:5 10 15 20 25
Dodge & Menascé. All Rights Reserved.
37
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
38
Response time (in sec) of HTML document requests vs. cache size (in Kbytes)
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0 128 256 384 512 640 768 896 1024
5 Clients 10 Clients 15 Clients 20 Clients 25 Clients
Dodge & Menascé. All Rights Reserved.
39
0.00
0.05
0.10
0.15
0.20
0.25
0.30
0.35
0 128 256 384 512 640 768 896 1024
5 Clients 10 Clients 15 Clients 20 Clients 25 Clients
Response Time of Inline Files (in sec) vs. Cache Size (KB)
Dodge & Menascé. All Rights Reserved.
40
Total Response time (in sec) vs. cache size (in Kbytes)
0.00.10.20.30.40.50.60.70.80.9
0 128 256 384 512 640 768 896 1024
5 Clients 10 Clients 15 Clients 20 Clients 25 Clients
Dodge & Menascé. All Rights Reserved.
41
File Hit Ratio vs. cache size (in Kbytes)
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0 128 256 384 512 640 768 896 10245 Clients 10 Clients 15 Clients 20 Clients 25 Clients
Dodge & Menascé. All Rights Reserved.
42
Byte Hit Ratio vs. cache size (in Kbytes).
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0 128 256 384 512 640 768 896 1024
5 Clients 10 Clients 15 Clients 20 Clients 25 Clients
Dodge & Menascé. All Rights Reserved.
43
Server disk utilization vs. cache size (in Kbytes).
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0 128 256 384 512 640 768 896 1024
5 Clients 10 Clients 15 Clients 20 Clients 25 Clients
Dodge & Menascé. All Rights Reserved.
44
Total Response Time (sec) vs Cache Size (KB) for Prefetching and non-Prefetching Cases
0
2
4
6
8
10
12
14
0 128 256 384 512 640 768 896 1024
prefetching non-prefetching
Dodge & Menascé. All Rights Reserved.
caching used in both cases
45
Outline
• Response Time Reduction Techniques
• HTTP Transactions without Prefetching
• HTTP Transactions with Prefetching
• Model– Workload characterization– Simulation Model
• Results
• Concluding Remarks
Dodge & Menascé. All Rights Reserved.
46
Concluding Remarks
• Prefetching can be used in conjunction with caching to decrease user perceived latency.
• No modification to the HTTP protocol nor the browser software is needed.
• Results showed a 48% improvement in response time through prefetching of inlines.
Dodge & Menascé. All Rights Reserved.
47
Relevant Bibliography• Menascé, D. A. and V. A. F. Almeida, Capacity
Planning for Web Performance: metrics, models, and methods,” Prentice Hall, Upper Saddle River, NJ, 1998.
• N. Yeager and R. McGrath, Web Server Technology, Morgan Kaufmann, San Francisco. 1996.
• Foxwell, H. and D. A. Menascé, Prefetching Results of Web Searches, Proc. of the 1998 Computer Measurement Group Conference, Anaheim, CA, Dec. 6-11, 1998.
Dodge & Menascé. All Rights Reserved.