29.11.2012 Views

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

the exact same working set of data, the impact <strong>on</strong> the<br />

server load can vary greatly with the dataset size. It is<br />

therefore important for realistic benchmarks to provide<br />

realistic datasets.<br />

5.3. Real browsers vs emulators<br />

5.3.1. Complexity of <strong>Web</strong> interacti<strong>on</strong>s<br />

Real <strong>Web</strong> applicati<strong>on</strong>s have complex interacti<strong>on</strong>s with<br />

the <strong>Web</strong> browser as shown in Table 2. While accessing<br />

the home page of older benchmarks such as RUBiS or<br />

TPC-W <strong>on</strong>ly generates 2 to 6 requests to fetch the page<br />

c<strong>on</strong>tent. Their real life counterpart, eBay.com and amaz<strong>on</strong>.com<br />

require 28 and 141 browser-server interacti<strong>on</strong>s,<br />

respectively. A more modern benchmark applicati<strong>on</strong><br />

such as CloudSt<strong>on</strong>e’s Olio requires 28 requests<br />

which is still far from the 176 requests of the most popular<br />

social network <strong>Web</strong> site Facebook. When the user<br />

enters http://en.wikibooks.org/ in his favorite <strong>Web</strong><br />

browser, 62 requests are generated <strong>on</strong> his behalf<br />

by the <strong>Web</strong> browser to fetch the c<strong>on</strong>tent of the Wikibooks<br />

home page. Even if modern HTTP client libraries<br />

such as Apache HttpComp<strong>on</strong>ents Client [1] provide a<br />

good implementati<strong>on</strong> of HTTP transport very similar to<br />

the <strong>on</strong>e used in <strong>Web</strong> browsers, other functi<strong>on</strong>alities<br />

such as caching, JavaScript executi<strong>on</strong>, c<strong>on</strong>tent type<br />

detecti<strong>on</strong>, request reformatting or redirecti<strong>on</strong> may not<br />

be accurately emulated.<br />

Table 2. Browser generated requests per type when<br />

browsing the home page of benchmarks and <strong>Web</strong><br />

sites.<br />

Benchmark HTML CSS JS Multimedia Total<br />

RUBiS 1 0 0 1 2<br />

eBay.com 1 3 3 31 28<br />

TPC-W 1 0 0 5 6<br />

amaz<strong>on</strong>.com 6 13 33 91 141<br />

CloudSt<strong>on</strong>e 1 2 4 21 28<br />

facebook.com 6 13 22 135 176<br />

wikibooks.org 1 19 23 35 78<br />

wikipedia.org 1 5 10 20 36<br />

To further understand how real browsers interact with<br />

real applicati<strong>on</strong>s, we investigate how Firefox fetches a<br />

page of the Wikipedia <strong>Web</strong> site and compare it to an<br />

HTTP replay. The workflow of operati<strong>on</strong>s and the corresp<strong>on</strong>ding<br />

timings are shown in Figure 2. The times<br />

for each block of GET operati<strong>on</strong>s corresp<strong>on</strong>d to the<br />

network time measured by our HTTP replay tool (<strong>on</strong><br />

the left) and Firefox (<strong>on</strong> the right). Times between<br />

blocks corresp<strong>on</strong>d to processing time in Firefox.<br />

First we observe that the complexity of the applicati<strong>on</strong><br />

forces the browser to proceed in multiple phases. After<br />

sending the requested URL to the <strong>Web</strong> applicati<strong>on</strong>, the<br />

browser receives an HTML page that it analyzes (step 1<br />

<strong>on</strong> Figure 2) to find links to JavaScript code and additi<strong>on</strong>al<br />

c<strong>on</strong>tent to render the page (.css, images…). Fire-<br />

fox opens six c<strong>on</strong>necti<strong>on</strong>s and performs the c<strong>on</strong>tent<br />

download in parallel. It then starts to render the page<br />

and execute the JavaScript <strong>on</strong>Load operati<strong>on</strong>s (step 2).<br />

This requires additi<strong>on</strong>al JavaScript files to be downloaded<br />

and another round of code executi<strong>on</strong> (step 3).<br />

0.25s<br />

0.06s<br />

GET /wiki/page<br />

Analyze page<br />

1<br />

GET combined.min.css<br />

GET jquery-ui.css<br />

GET main-ltr.css<br />

GET comm<strong>on</strong>Print.css<br />

GET shared.css<br />

GET flaggedrevs.css<br />

GET Comm<strong>on</strong>.css<br />

GET wikibits.js<br />

GET jquery.min.js<br />

GET ajax.js<br />

GET mwsuggest.js<br />

GET plugins...js<br />

GET Print.css<br />

GET Vector.css<br />

GET raw&gen=css<br />

GET ClickTracking.js<br />

GET Vector...js<br />

GET js&useskin<br />

GET WikiTable.css<br />

GET Comm<strong>on</strong>sTicker.css<br />

GET flaggedrevs.js<br />

GET Infobox.css<br />

GET Messagebox.css<br />

GET Hoverbox.css<br />

GET Autocount.css<br />

GET toc.css<br />

GET Multilingual.css<br />

GET mediawiki_88x31.png<br />

2 Rendering + JavaScript<br />

GET ExtraTools.js<br />

GET Navigati<strong>on</strong>.js<br />

GET Navigati<strong>on</strong>Tabs.js<br />

GET Displaytitle.js<br />

GET RandomBook.js<br />

GET Edittools.js<br />

GET EditToolbar.js<br />

GET BookSearch.js<br />

GET MediaWikiComm<strong>on</strong>.css<br />

Rendering + JavaScript<br />

3<br />

GET page-base.png<br />

GET page-fade.png<br />

GET border.png<br />

GET 1.png<br />

GET external-link.png<br />

GET bullet-ic<strong>on</strong>.png<br />

GET user-ic<strong>on</strong>.png<br />

GET tab-break.png<br />

GET tab-current.png<br />

4 Rendering<br />

GET arrow-down.png<br />

GET portal-break.png<br />

GET arrow-right.png<br />

generate<br />

page<br />

Figure 2. Time breakdown of a Wikibooks page access<br />

with Firefox 3.6.13 and HTTP replay.<br />

Finally images are downloaded reusing the same six<br />

c<strong>on</strong>necti<strong>on</strong>s and a final rendering round (step 4) triggers<br />

the download of the 3 final images at the bottom of the<br />

page. The total page loading time in Firefox is 4.09s<br />

with 1.88s for networking and 2.21s for processing and<br />

rendering. The single threaded HTTP replay tool is not<br />

44 <strong>Web</strong>Apps ’11: <str<strong>on</strong>g>2nd</str<strong>on</strong>g> <str<strong>on</strong>g>USENIX</str<strong>on</strong>g> <str<strong>on</strong>g>C<strong>on</strong>ference</str<strong>on</strong>g> <strong>on</strong> <strong>Web</strong> Applicati<strong>on</strong> <strong>Development</strong> <str<strong>on</strong>g>USENIX</str<strong>on</strong>g> Associati<strong>on</strong><br />

Replay<br />

0.25s<br />

1.02s<br />

1.19s<br />

1.13s<br />

0.27s<br />

0.67s<br />

0.90s<br />

0.14s<br />

0.97s<br />

0.70s<br />

0.28s<br />

0.12s<br />

3.86s 1.88s<br />

+ 2.21s total rendering time<br />

Total network time<br />

send<br />

files<br />

send<br />

files<br />

send<br />

files<br />

send<br />

files

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!