Docsity

Anatomizing Application Performance Differences on Smartphones, Study notes of Computer Networks

Toggle sidebar
bg1
Anatomizing Application Performance Differences on
Smartphones
Junxian Huang§Qiang Xu§Z. Morley Mao§Ming Zhang†Paramvir Bahl†
§University of Michigan †Microsoft Research
Abstract – The widespread deployment of 3G tech-
nologies and the rapid adoption of new smartphone de-
vices like iPhone and Blackberry are making cellular
data networks increasingly popular. In addition to email
and Web browsing, a variety of different network ap-
plications are now available, making smartphones po-
tentially reasonable substitute for their desktop counter-
parts. Unfortunately, the performance of smartphone ap-
plications, from the perspective of the users and applica-
tion developers, is still not well understood.
We believe our study, the first of its kind, fills this
void. We identify and study important factors that impact
user perceived performance. We formalize the method
for comparing the performance of smartphone applica-
tions along several unique dimensions such as carrier
network, device capabilities, application types, and net-
work protocols. To ensure a fair comparison across plat-
forms and networks we develop a detailed measurement
methodology. Our work is an important and necessary
step towards understanding the performance of smart-
phone applications from users and application develop-
ers perspective. Our analysis culminates with a set of
recommendations that can lead to better application de-
sign and infrastructure support for smartphone users.
1 Introduction
As of the third quarter of 2008, global smartphone
shipments reached 40 million units representing 13% of
the total mobile phone market [2]. It is widely accepted
that in the n ext few years smartpho nes sales will outpace
the sales of regular phones. Vendors such as Research in
Motion, Samsung, Nokia, HTC, and Apple offer a vari-
ety of smartphones that are equipped with fast CPU and
large memory. These phones support various high-speed
3G networks such as EVDO and UMTS. They are pow-
erful enough to run modern operating systems and so-
phisticated network applications such as Web browsing,
email, and streaming media.
The performance of network applications on smart-
phone depends on several factors including the quality
of the hardware, the software, the wireless link, and net-
work traffic load. Understanding the performance of ap-
plications on smartphones is an important and challeng-
ing problem. This understand ing can assist consumers in
selecting the carriers and phones on which their favorite
applications perform well and can guide application de-
velopers to write smarter software. Also, cellular net-
work operators, smartphone hardware and software ven-
dors can use this knowledge to optimize their networks
and phones in a way that lead to better end-user experi-
ences.
Researchers have done extensive work in measuring
and optimizing TCP performance over cellular links.
For example, Liu et al. [7] studied multiple TCP vari-
ants by correlating the link-layer measures, e.g., SINR
(signal-to-noise ratio) and DRC (data rate cover), with
TCP performance. While many applications are built on
TCP, their actual user-level performance does not match
that of TCP alone due to various adaptation strategies
and overheads induced by the applications. Realizing
this problem, Chesterfield et al. [4] evaluated the per-
formance of streaming media application over a WWAN
(Wireless Wide Area Network). They studied how link-
layer characteristics impact the inter-packet arrival time,
bandwidth, and buffer delay of streaming media. But
their work is limited to a customized streaming applica-
tion named vorbistreamer. In a separate study, Chakra-
vorty et al. [3] measured the performance of TCP and
Web browsing over WWANs. However, that study is also
different from ours because they focus only on compar-
ing the overall throughput across different link layers.
We focus on developing a systematic set of method-
ologies and tools for measuring and analyzing the per-
formance of smartphone applications in a way that is
directly relevant to end users. As a consequence, (1)
we measure the performance of applications instead of
just low-level protocols. Prior work has shown that ap-
plication performance often significantly deviates from
protocol performance [14]. We target the pervasive web
browsing application that most end-users care about; (2)
We measure the application performance on several dif-
ferent mobile devices that consumers actually use. We
find that due to the differences in hardware and the plat-
form software, application performance varies widely
across different devices. This then leads us to study and
compare the performance of application both on laptops
(as has been done in most prior work) and on smart-
phones; (3) We study the application performance under
real-world scenarios. We quantify the performance of
Web browsing by measuring the performance of access-
ing real Web services instead of just the ones under our
control (once again, this differs from prior work). We do
perform some experiments using our own web site but
those are only for the purpose of dissecting the perfor-
mance implications of the dynamic interactions between
consumers and real Web services.
In addition to shedding light on the overall application
performance, we perform detailed analysis to help car-
riers, hardware vendors, operating system vendors, and
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Anatomizing Application Performance Differences on Smartphones and more Study notes Computer Networks in PDF only on Docsity!

Anatomizing Application Performance Differences on

Smartphones

Junxian Huang§^ Qiang Xu§^ Z. Morley Mao§^ Ming Zhang†^ Paramvir Bahl† § (^) University of Michigan † (^) Microsoft Research

Abstract – The widespread deployment of 3G tech- nologies and the rapid adoption of new smartphone de- vices like iPhone and Blackberry are making cellular data networks increasingly popular. In addition to email and Web browsing, a variety of different network ap- plications are now available, making smartphones po- tentially reasonable substitute for their desktop counter- parts. Unfortunately, the performance of smartphone ap- plications, from the perspective of the users and applica- tion developers, is still not well understood. We believe our study, the first of its kind, fills this void. We identify and study important factors that impact user perceived performance. We formalize the method for comparing the performance of smartphone applica- tions along several unique dimensions such as carrier network, device capabilities, application types, and net- work protocols. To ensure a fair comparison across plat- forms and networks we develop a detailed measurement methodology. Our work is an important and necessary step towards understanding the performance of smart- phone applications from users and application develop- ers perspective. Our analysis culminates with a set of recommendations that can lead to better application de- sign and infrastructure support for smartphone users.

1 Introduction

As of the third quarter of 2008, global smartphone shipments reached 40 million units representing 13% of the total mobile phone market [2]. It is widely accepted that in the next few years smartphones sales will outpace the sales of regular phones. Vendors such as Research in Motion, Samsung, Nokia, HTC, and Apple offer a vari- ety of smartphones that are equipped with fast CPU and large memory. These phones support various high-speed 3G networks such as EVDO and UMTS. They are pow- erful enough to run modern operating systems and so- phisticated network applications such as Web browsing, email, and streaming media. The performance of network applications on smart- phone depends on several factors including the quality of the hardware, the software, the wireless link, and net- work traffic load. Understanding the performance of ap- plications on smartphones is an important and challeng- ing problem. This understanding can assist consumers in selecting the carriers and phones on which their favorite applications perform well and can guide application de- velopers to write smarter software. Also, cellular net- work operators, smartphone hardware and software ven- dors can use this knowledge to optimize their networks

and phones in a way that lead to better end-user experi- ences. Researchers have done extensive work in measuring and optimizing TCP performance over cellular links. For example, Liu et al. [7] studied multiple TCP vari- ants by correlating the link-layer measures, e.g., SINR (signal-to-noise ratio) and DRC (data rate cover), with TCP performance. While many applications are built on TCP, their actual user-level performance does not match that of TCP alone due to various adaptation strategies and overheads induced by the applications. Realizing this problem, Chesterfield et al. [4] evaluated the per- formance of streaming media application over a WWAN (Wireless Wide Area Network). They studied how link- layer characteristics impact the inter-packet arrival time, bandwidth, and buffer delay of streaming media. But their work is limited to a customized streaming applica- tion named vorbistreamer. In a separate study, Chakra- vorty et al. [3] measured the performance of TCP and Web browsing over WWANs. However, that study is also different from ours because they focus only on compar- ing the overall throughput across different link layers. We focus on developing a systematic set of method- ologies and tools for measuring and analyzing the per- formance of smartphone applications in a way that is directly relevant to end users. As a consequence, (1) we measure the performance of applications instead of just low-level protocols. Prior work has shown that ap- plication performance often significantly deviates from protocol performance [14]. We target the pervasive web browsing application that most end-users care about; (2) We measure the application performance on several dif- ferent mobile devices that consumers actually use. We find that due to the differences in hardware and the plat- form software, application performance varies widely across different devices. This then leads us to study and compare the performance of application both on laptops (as has been done in most prior work) and on smart- phones; (3) We study the application performance under real-world scenarios. We quantify the performance of Web browsing by measuring the performance of access- ing real Web services instead of just the ones under our control (once again, this differs from prior work). We do perform some experiments using our own web site but those are only for the purpose of dissecting the perfor- mance implications of the dynamic interactions between consumers and real Web services. In addition to shedding light on the overall application performance, we perform detailed analysis to help car- riers, hardware vendors, operating system vendors, and

application developers gain insight on the factors that impact user-perceived performance. For carriers, we in- fer various network-level problems, e.g., high latency or high loss rate, which they can directly take action on. For hardware and software vendors, we identify issues with the devices or the customized contents. They can resolve these issues either independently or by cooper- ating with content providers, and for application devel- opers we identify issues such as the impact of HTML parsing and Javascript executions.

We comprehensively study the UDP, TCP, and Web browsing performance for four major US carriers includ- ing AT&T, Sprint, Verizon, and T-Mobile. These four carries operate both 2G and 3G networks. For devices, we use iPhone from Apple Inc., Windows Mobile phones from Palm, HTC, and Samsung, and desktop comput- ers for carrying out our experiments. Our results show that their performance varies significantly across differ- ent Web services. In fact, even for the same Web ser- vice, the desktops and certain types of phone consistently outperform others due to the difference in downloading behavior, customized contents, and page rendering tech- niques. We show that the performance also heavily de- pends on various factors in carriers’ network including DNS lookup, RTT (round trip time), and loss rate.

Below, we summarize our main observations obtained after extensive experimentation. Some of these are con- sistent with expectations, while some are non-intuitive and even surprising.

  1. The same set of smartphones accessing the same set of websites exhibits performance differences among one other. We attribute this observation to several factors including customization of content based on device type, web servers transferring web objects in different compression modes, and differences in browser concurrency, page rendering delay at the client, object download speed, DNS lookup delay, and TCP three-way handshake delay.
  2. For the same cellular data network, device (and operating system) specific differentiation appears to exist, even after we compensate for end-system software issues.
  3. Network performance differs between laptops that use the phone as a modem and phones that access the Internet directly. We attribute these differences to the differences in hardware capability and soft- ware features between the two set-ups. Previous studies have ignored this fact and presented results for the former case only.
  4. All the smartphones can reap significant perfor- mance benefit from WiFi Ad-Hoc proxy based In- ternet access, However, this cannot eliminate ap- plication performance differences due to many non- networking issues, such as page rendering delay at the client, browser concurrency, and content cus- tomization. In the rest of the paper we elaborate on these observa-

tions, share additional ones and discuss the implication on application design, network operation, and platform design.

2 Related Work

We were influenced by the NetDiff system [8], which established a benchmark for comparing performance of different Internet Service Providers (ISPs). In our re- search we attempt to establish an equivalent benchmark for 3G carriers based on the network application per- formance observed on the smartphone and laptops. Al- though some user-based online comparisons are avail- able [1], we believe that ours is the first comprehensive study that analyzes and compares the network behavior of both 2G and 3G networks from the perspective of the applications executing on end-user devices. There are several studies that have examined cellular data networks but their focus was different. Examples include, a study of the interaction between the wireless channels and applications [7]; of application-aware ac- celeration to improve application performance [14], and of performance of multimedia streaming [4]. Our work is the first to evaluate 3G cellular network performance directly using phones as the platform for measurement, thus it accurately reflects the actual user experience. All previous studies ( e.g., [7, 3]) perform measurements on the desktop or laptop systems, relying on cellular net- work data cards or phones connected through a USB as a modem. We show later in the paper that the performance measured on laptops versus that measured on phones for the same network is different. Phones have more severe resource restrictions, execute potentially different types of applications, and send and receive different applica- tion content compared to their laptop and desktop coun- terparts. Unlike many previous works, we mostly take a black- box approach to performance measurement by examin- ing network behavior at the application, transport, and network layers without relying on detailed information of the wireless channels ( e.g., [7]) nor the internal state of cellular data networks ( e.g., [13]). This then presents an interesting challenge of inferring the bottleneck or the root cause for observed application performance. We ar- gue that this approach will stand the test of time as it is better suited for periodic analysis of evolving networks. The limitation it has, of reduced visibility into the inner working of the network, does not prevent us from achiev- ing the goal of effectively comparing network perfor- mance across different cellular data network providers. Our work builds on numerous previous TCP studies for cellular data networks which aim to understand the behavior of TCP using cross-layer measurement tech- niques [9], modeling of multi-rate and multi-user behav- ior [6], and potential transport improvements for wireless wide-area networks [12]. These studies expose the lim- itations of existing designs and our work confirms some of these problems as measured from the perspective of end-users.

produce an overall measure of network performance of a page download. Given that TCP throughput can be mod- eled as (^) RT TMSS ×√ p where MSS is the maximum segment

size [10], the download time of a connection of size S

can be estimated as

S × RT T ×√ p MSS. Since the download time of a connection is proportional to S , RT T , and

p , we

use ∑( Si ∑× SRT Ti i^ )and ( ∑^ ( Si ×

√ p i ) ∑ Si )

(^2) as the average RTT and

loss rate of a page download. Browser concurrency Most browsers support con- current TCP connections within the same domain to im- prove download efficiency. The maximum number of concurrent TCP connections within a domain varies by browsers. Because each connection has its own start and end time, we compute the average concurrency of a page load as the total duration of all the connections divided by the page load time. When the network is not the bot- tleneck, higher concurrency usually means better utiliza- tion of bandwidth which in turn leads to shorter down- load time. DNS lookup time A page load may involve many DNS lookups of different domains. We compute the total DNS lookup time to quantify the overall impact of DNS lookup on performance. Since DNS lookup requests are handled by local DNS (LDNS) servers, we also compute the average DNS lookup time as a measure of LDNS server performance. TCP handshake time Each TCP connection starts with a three-way handshake during which no data is transferred. We compute the total handshake time as a measure of overhead induced by handshake. TCP idle time & transfer time Given a TCP con- nection, an idle period is defined as a period of at least 1 second during which no data is transferred and no re- transmission is detected. The remaining periods in the connection are the transfer periods. An idle period usu- ally corresponds to the processing time on the phone be- tween the instance when a response is received and the instance when the next request is issued. The process- ing time is particularly pronounced on the phone due to its limited CPU power and memory. We choose 1 sec- ond threshold because it is almost always bigger than the measured RTTs (Figure 5). When TCP has data to send and is not in retransmission, there should be data trans- mission in every RTT. There are a few other factors that may affect web ap- plication performance, e.g., object compression. In § 7, we will conduct controlled experiments to study the ef- fects of compression on page load time.

4 Experimental Setup

Table 1 lists the devices and carriers used in this work. We study the four major carriers in the US, including AT&T, Sprint, Verizon, and T-Mobile. Among them, T-Mobile only provides 2G EDGE service in our loca- tions. The other three 3G carriers are split between HS- DPA/UMTS (AT&T) and EVDO (Sprint and Verizon). AT&T has the highest advertised downlink and uplink data rates, up to 1.7 and 1.2 Mbps respectively. The

Carrier AT&T Sprint Verizon T-Mobile Network UMTS EVDO EVDO EDGE D(Mbps) 0.7-1.7 0.6-1.4 0.6-1.4 n/a U(Mbps) 0.5-1.2 0.35-0.5 0.5-0.8 n/a Vendor Apple Palm Samsung HTC Device iPhone Treo800w SCHi760 TyTNII Mem 128MB 128MB 64MB 128MB ARM 1176 1136 920T 1136EJS MHz 620 333 400 400 OS OS 2.1 WM 6.1 WM 6.1 WM 6. Browser Safari IE IE IE Table 1. Carriers and devices

§ Experiment Description # 5.1 UDP performance (^) Transport layer 12 5.2 TCP performance 6.1 Video streaming (^) App overall 6 6.2 Web browsing

7

DNS lookup

App breakdown 7

TCP handshake Object download Javascript execution HTML parsing

7

Browser concurrency Object compression Controlled scenario 5 WiFi proxy Table 2. Summary of experiments

advertised data rates of Verizon and Sprint are some- what lower. We cannot find any official advertised data rate from T-Mobile. The actual data rates that a user can attain depend on many other factors, such as signal strength, location, and background traffic. One of our goals is to understand the extent to which the actual data rates match the advertised ones and how such mis-match impacts the relative performance of applications such as web browsing. To measure user-perceived performance on devices, we conduct our experiments on four popular smart- phones listed in Table 1. The three Windows Mobile phones and iPhone are different in terms of CPU, mem- ory, OS, and browser. The hardware and software dif- ferences between the phones are among the most dom- inant factors that contribute to the application perfor- mance differences. In the case of web browsing, the CPU speed and OS scheduling algorithm determine how fast Javascripts or HTML objects are executed. Browser con- currency influences how efficiently the available wireless channel capacity is utilized. Different phones may also receive customized contents that directly affect both ex- ecution time and data transfer time. Beside the four phones, we also use 2 desktops in three different ways in our experiments: i) a client that uses phone as a modem; ii) a server that resides on the Internet; and iii) a proxy that provides high-speed Inter- net connection to a phone via WiFi. The desktops have Intel Core2 Duo 2.26GHz processor and 2GB memory. They run Windows Vista and IE 7 browser.

Computer/Sprint

Computer/T-Mobile

Computer/ATT

Computer/Verizon

HTC/ATT

Samsung/Verizon

Palm/Sprint

HTC/T-Mobile

iPhone/ATT

0 200 400 600 800 1000 1200

0 0.2 0.4 0.6 0.

UDP downlink throughput of large packet (kbps)

Loss rate

Throughput (kbps) Loss rate

Fig. 1. UDP results across platforms and carriers.

Table 2 summarizes the experiments and the corre- sponding sections in this paper. We measure both net- work performance and application performance in or- der to understand the correlation between them, e.g., whether a phone with higher TCP throughput will also have smaller page load time. Because application per- formance does not always correlate well with network performance, we conduct controlled experiments to iden- tify other significant factors, such as DNS performance, TCP handshake performance, and page rendering per- formance. Moreover, we study the impact of browser concurrency and the tradeoff between network and CPU overheads of object compression. Finally, we perform a case study on to what extent using a WiFi proxy can help to improve user experience compared to using 3G network. We implement a suite of tools to measure the perfor- mance of TCP, UDP, DNS, and object download on four phones. They are written in Java on iPhone and C++ in Windows Mobile. To capture packet traces for detailed analysis, we use tcpdump on iPhone and Netlog on Win- dows Mobile. The format of Netlog traces is the same as that of tcpdump. Because a 3G link can be quite unstable, we repeat each experiment multiple times to discount the impact of random noise (column 4 in Table 2). We report both mean and standard deviation for results that have signif- icant variations. We repeat some of these experiments at different times of day and different locations to ver- ify the consistency of our observations. To avoid poten- tial interferences by mobility and power management, all the phones are kept stationary in the same location with plugged-in power during the experiments.

5 Network Performance

To understand the different characteristics of network applications, we first focus on controlled network experi- ments to test the throughput of TCP and UDP based data streams. We infer the bottleneck resources by conduct- ing Iperf-like one-way data transfer for exposing sustain- able network throughput between the phones and a well- provisioned host in the wired network. Each through- put test lasts for 5 minutes. We measure UDP through- put with packet size of 1300 bytes. We correlate RTT and loss rate to explain the observed throughput of TCP data streams. And we also compare across devices and

networks to identify and explain observed differences in performance.

5.1 UDP performance

Unlike TCP, UDP does not guarantee reliable and in- order delivery, and is more commonly used for multime- dia streaming, e.g., YouTube. We evaluate the maximum throughput sustained for UDP streams for downlink net- work behavior. Since the desktop machine communicat- ing with the phone for performing the experiment is con- nected to 100Mbit Ethernet wired network, we expect the bottleneck link in terms of latency and bandwidth to reside inside the 3G networks. Figure 1 shows the down- link throughput behavior collected mostly during night hours at our location. Cross phone, cross carrier: We compare across the five phone platforms with corresponding carriers. The down- link throughput values shown in Figure 1 range from about 150kbps for HTC/T-Mobile to about 1100kbps for HTC/AT&T. T-Mobile’s network offers only 2G service at our location; however, the corresponding number for Samsung/Verizon phone is only 200kbps, one fifth of the rate of HTC/AT&T. These maximum UDP throughput are the saturated UDP throughput values observed by in- creasing the sending rate. The loss rate observed is ex- pected to be very high, e.g., close to 50% for iPhone/ATT with high variability, though the exact values shown may vary greatly depending on the saturation point chosen. Thus, we do not compare them at a fine-grained level. The clear difference across carriers is also reflected by comparing iPhone/AT&T with HTC/AT&T, where HTC/AT&T consistently outperforms, in fact for TCP and UDP traffic. We do not expect AT&T to intention- ally differentiate traffic based on the actual phones, we expect the differences be caused by factors directly re- lated to the phones, e.g., software such as the network stack or hardware such as the radio. Phone vs. computer: Previous studies have performed measurements using desktop or laptop systems con- nected to the cellular data networks either via data cards or through the phones acting as a modem. We compare the UDP throughput behavior measured on the computer with that on the phones. Given that the phones are much more restricted by limited resources, we expect the desk- top to perform better. This is mostly confirmed by all plots in Figure 1, demonstrating that in some cases, such as Sprint, the computer based performance improved by almost 50% – 662kpbs vs. 442kbps. This confirms our earlier conjecture that performance observed on comput- ers do not truly reflect that experienced by phone users, thus validating the motivation for our study.

5.2 TCP performance

Most applications use TCP as their transport protocol; thus, TCP behavior is critical to the overall performance of network applications. Previous work has proposed various TCP variants optimized for wireless networks. Our study focuses on the behavior of the TCP stack cur- rently running on Windows Mobile phones and iPhone platforms without detailed knowledge of the actual TCP

Experiments Metrics Rank UDP uplink Throughput TCP uplink^ HTC/ATT>Sprint>iPhone>VZW>T-Mobile, C≥phone UDP downlink (^) HTC/ATT>iPhone>Sprint>VZW>T-Mobile, C≥phone TCP downlink YouTube Load time Throughput^ SprintC/Sprint>iPhone>C/ATT>VZW>iPhone>HTC/ATT>VZW>>SprintC/ATT>>HTC/ATTC/Sprint

Real web browsing

Page load time iProxy>C/Sprint≥Sprint≥iPhone>VZW>HTC/ATT>T-Mobile Throughput iProxy>C/Sprint≈iPhone>Sprint>VZW>T-Mobile>HTC/ATT DNS iProxy>Sprint>C/Sprint≥T-Mobile≈VZW≥iPhone TCP handshake iProxy>Sprint>C/Sprint≥VZW>iPhone>HTC/ATT>T-Mobile TCP idle time HTC/ATT>iPhone≥iProxy≥C/Sprint>VZW≥Sprint>T-Mobile TCP transfer iProxy>C/Sprint>VZW>Sprint>iPhone≈HTC/ATT>T-Mobile RTT iProxy>Sprint>C/Sprint>VZW>iPhone>HTC/ATT>T-Mobile

Controlled experiments

Page load time iProxy>C/Sprint>Sprint≥iPhone≈VZW>T-Mobile>HTC/ATT Throughput iProxy>C/Sprint>iPhone>Sprint>VZW≥T-Mobile>HTC/ATT DNS iProxy≥Sprint≥C/Sprint>VZW>iPhone≥T-Mobile TCP transfer iProxy>C/Sprint>HTC/ATT≥Sprint≥iPhone≥VZW≥T-Mobile TCP handshake iProxy>C/Sprint>Sprint>VZW≥HTC/ATT≥T-Mobile≥iPhone Object download iProxy>C/Sprint>iPhone>VZW>Sprint>HTC/ATT>T-Mobile Javascript execution C/IE7>iPhone/safari=iProxy/Safari>GPhone>Samsung>Palm>HTC HTML parsing C/IE7>iProxy/safari>iPhone/Safari>GPhone>Palm>Samsung>HTC Table 3. Performance rank order table (iProxy: iPhone-WiFi-Proxy setup, C: computer)

Computer/Sprint

Computer/ATT

HTC/ATT

Samsung/VZW

Palm/Sprint

iPhone/ATT

0 100 200 300 400 500 600 700 800

0 50 100 150 200 250 300 350

Load time(secs)

Throughput(kbps)

Load time(sec) Throughput(kbps)

Computer/Sprint

Computer/ATT

HTC/ATT

Samsung/VZW

Palm/Sprint

iPhone/ATT

0 2 4 6 8 10 12 14 Average video payload (MB)

0

1

0 0.02 0.04 0.06 0.08 0. Inter-packet arrival time (secs)

iPhone/ATT Palm/Sprint Samsung/VZW HTC/ATT Computer/Sprint^ Computer/ATT

(a) Load time vs. throughput. (b) Total payload differences. (c) Packet interarrival time distribution. Fig. 3. YouTube video streaming performance across platforms for a 4:57min video clip.

cessing or memory related bottlenecks [14]. Table 3 dis- plays the performance rank order based on the average value among the platforms studied for different settings to be explained in the remaining paper. “≈” means that the average value differs in less than 5%. “>=” indicates that the rank order is not consistent if the distribution of all experiments are considered besides the average.

6.1 Video streaming

We focus on video streaming hosted by YouTube given its popularity. We found that Windows Mobile consistently uses UDP regardless of the phone platform. TCP is used for other platforms including desktop. Fig- ure 3 illustrates the performance of watching a 4:57min video clip, measured using average load and through- put (along with standard deviation), repeated five times for each platform. The load time is computed from the client’s SYN packet till the server’s FIN packet. As shown, computers clearly outperform phones in through- put but have slightly longer load time due to much larger payload to be downloaded given larger display and higher resolution. Throughput difference may stem from superior processing capabilities on the desktop ma- chines. Figure 3(c) shows HTC/AT&T has surprisingly much larger packet interarrival times explaining its worse throughput. Note that the result for T-mobile is not in- cluded, as phones using the 2G network are unable to

iPh/ATT Pm/Spr Sam/VZW HTC/TM HTC/ATT 12 6 5 5 6 C/ATT C/Spr C/VZW C/TM 4 6 6 6 Table 4. Max observed concurrency (C: Computer).

mapquest hotmail.com live.com cnn.com maps.yahoo facebook.com google.com ebay.com maps.google weather.com amazon.com espn.com mail.yahoo myspace.com yahoo.com msn.com microsoft youtube.com gmail.com nba.com* wikipedia* blogger.com imdb.com* go.com* Table 5. 24 URLs used in web browsing experiments

consistently complete the video clip download.

6.2 Web browsing

Web browsing is likely the most popular application on smartphones, and its performance is determined by many factors such as network, browser software ( e.g., the degree of parallelism), content customization, DNS over- head, CPU resources, etc. We attempt to dissect these factors to understand the performance differences across platforms. We briefly describe our experimental setup. For our study we select 24 URLs from a diverse set of popular content with a variety of content types as shown

0

1

0.5 0.6 0.7 0.8 0.9 1 Completion ratio

iPhone/WiFi Proxy HTC/T-Mobile Samsung/VZW Palm/Sprint iPhone/ATT^ HTC/ATT Computer/Sprint

0

1

0 10 20 30 40 50 60 Page load time (secs)

iPhone/WiFi Proxy Samsung/VZW^ HTC/T-Mobile Palm/Sprint HTC/ATT Computer/Sprint^ iPhone/ATT 0

1

0 50 100 150 200 Average throughput (kbps)

iPhone/WiFi Proxy HTC/T-Mobile Samsung/VZW Palm/Sprint HTC/ATT Computer/Sprint^ iPhone/ATT

(a) Per URL TCP completion ratio. (b) Page load time. (c) Average throughput. Fig. 4. Overall performance of Web browsing across platforms.

0

1

0 2 4 6 8 10 DNS lookup time (secs)

iPhone/WiFi Proxy Samsung/VZW^ HTC/T-Mobile Palm/Sprint iPhone/ATT Computer/Sprint (^0)

1

0 0.2 0.4 0.6 0.8 1 TCP handshake time (secs)

iPhone/WiFi Proxy Samsung/VZW^ HTC/T-Mobile Palm/Sprint HTC/ATT Computer/Sprint^ iPhone/ATT 0

1

0 5 10 15 20 TCP idle time (secs)

iPhone/WiFi Proxy HTC/T-Mobile Samsung/VZW Palm/Sprint iPhone/ATT^ HTC/ATT Computer/Sprint

(a) DNS lookup. (b) TCP handshake. (c) TCP idle time.

0

1

0 1 2 3 4 5 TCP transfer time (secs)

iPhone/WiFi Proxy HTC/T-Mobile Samsung/VZW Palm/Sprint iPhone/ATT^ HTC/ATT Computer/Sprint (^0)

1

0 0.2 0.4 0.6 0.8 1 RTT (secs)

iPhone/WiFi Proxy HTC/T-Mobile Samsung/VZW Palm/Sprint iPhone/ATT^ HTC/ATT Computer/Sprint 0

1

0 50 100 150 200 250 300 350 400 Web page payload (KB)

iPhone/WiFi Proxy HTC/T-Mobile Samsung/VZW Palm/Sprint iPhone/ATT^ HTC/ATT Computer/Sprint

(d) TCP transfer. (e) Average RTT. (f) Web page payload. Fig. 5. Breakdown of Web transaction performance: (a)-(d), RTT and Web page payload distribution.

in Table 5, only four of them indicated by ’*’ do not have customized content for mobile phones. Each is visited 6 times. To facilitate repeated experiments, for Windows Mobile platform, a C++ program is written to invoke IE to visit each URL in turn. We overcome the challenge of the inability to call the Safari browser from iPhone directly by creating a Web page with Javascript that pe- riodically redirects the browser to each URL in turn after 120 seconds.

Figure 4 shows the overall Web browsing perfor- mance across the representative platforms studied, omit- ting some for ease of exposition. To enable fair com- parison, we exclude browsing sessions with many in- complete TCP connections, due to reasons such as net- work or server errors, insufficient wait time, and contin- uously running Web connection caused by dynamic con- tent. Figure 4(a) shows the distribution per URL TCP connection completion ratio. We use a threshold of 90% to include about 98% of our data samples.

Note that we also show a setup called iPhone-WiFi- proxy (iProxy) , in which iPhone connects to a laptop us- ing wireless Ad-Hoc network and the laptop has wired Internet access. iPhone can use the laptop as a proxy to gain Internet access. We compare this setting with the other platforms using 3G networks, and notice signifi- cant performance differences.

The page load time distribution shown in Figure 4(b)

is quite telling in demonstrating the difference across platforms and the fact that network throughput alone, i.e., measured via TCP downlink Iperf experiments, is not sufficient for predicting application performance. The rank order for Web performance in terms of download time is shown in Table 3. The iPhone-WiFi-Proxy setup is clearly superior for both measures of page load times as well as throughput. HTC/T-mobile has the longest page load time likely due to limited bandwidth in a 2G network compared to 3G networks for other setups. HTC/AT&T again anomalously performs poorly, much worse than iPhone/AT&T. The remaining platforms have similar performance, with iPhone/AT&T slightly ahead of others in average throughput.

It is surprising that although the HTC/AT&T setup has previously shown to have higher TCP downlink through- put than most other platforms (Figure 2), its overall page load time and average throughput lag behind platforms such as iPhone/AT&T and Samsung/Verizon. Upon fur- ther inspection we found that HTC/AT&T always con- tacts a proxy server IP before any URL visits. In our experiments, the IP contacted is 66.209.11.32 with the DNS name of vdispwap2.mycingular.net. Such a setup helps improve caching and reduce DNS lookup de- lay, but also enables ISPs to instrument potential traffic differentiation. We also note that the computer based se- tups are not consistently better in page download times

slightly better indicating that application layer perfor- mance depends on not only transport layer capacity but also other factors. Result summary: We have demonstrated the diverse application performance behavior for video streaming and Web browsing that do not directly correlate with the TCP/UDP throughput. Due to the complexity of Web browsing, it is difficult to fairly compare by visiting ac- tual Web sites. Thus, we investigate the use of controlled experiments to dissect Web browsing performance.

7 Controlled Web Experiments

Given the difficulty caused by client-based content customization for narrowing down the bottleneck ( e.g., CPU for Javascript processing vs. network bottleneck for content download), visiting commercial Web sites alone is insufficient. We design a set of controlled exper- iments to ensure the same content downloaded for each URL visit and the same browser setting by creating a lo- cal Web server using Apache that replicates or mirrors the actual Web content of the sites studied previously. We collect altogether 1758 Web objects (including types such as images, applications, and text) associated with 128 distinct domain names and 258 server IPs. We noted previously that each browser has its own default setting for maximum number of allowed concurrent connections shown in Table 4. To ensure fair comparison we config- ure the maximum TCP concurrency on the client side to 12 which is the upper bound that observed in the trace. Besides the server load behavior, our setup can fairly accurately represent the actual user experience, despite slightly different network paths traversed. The reason is that we expect the bottleneck to reside in the 3G/2G network or on the devices which are mostly unchanged in the controlled experiments. We discuss next how each key contributing factor for Web performance pre- viously examined can be effectively analyzed and more- over fairly compared across platforms, in addition to fine-grained Javascript execution and Web content pars- ing analysis. DNS lookup: For each phone setup, a small pro- gram is run to perform lookups for all 128 unique domain names. The distribution of per DNS lookup completion time is shown in Figure 8(a), which actually disagrees in the rank order shown in Figure 5(a), explained by the observation that a different set of names are resolved for each platform. Understanding DNS delays provides in- sight into the usefulness of DNS caching. TCP handshake: Similar to DNS experiments, each platform establishes a TCP connection with each of the 258 server IPs from the trace in sequence to obtain the TCP handshake time distribution shown in Figure 8(b) where some curves crossing each other, indicating an in- consistent rank order. Compared to Figure 5(b), the rank order also differs and surprisingly iPhone’s performance appears to be slightly worse for some TCP connections likely due to worse network performance. Web object downloading: Popular Web sites of- ten contain many embedded web objects in the main

Computer/IE 7

Samsung/IE 6

Palm/IE 6

HTC/IE 6

iPhone/Safari

iProxy/Safari

GPhone/Browser

0 1 2 3 Average Javascript execution time (secs) Fig. 9. Controlled experiments for JS execution.

page, including images, Javascripts, CSS files, etc. Al- though Web object download and execution can hap- pen concurrently, it is still important to measure web object download time separately which could be a bot- tleneck during web browsing. We measured the down- load time of all 1758 observed Web objects by send- ing the same HTTP GET requests found in the trace. Figure 8(c) shows the distribution, where iPhone-WiFi- Proxy setup again is much superior due to higher network bandwidth. T-Mobile has longest download time as it is using a 2G network. Confirming previous observations, HTC/AT&T again shows much worse performance com- pared to iPhone/AT&T setup. This confirms our previous conjecture that device-based traffic differentiation exists in some 3G networks. Performance: We measure page load time and throughput to compare the performance of Web brows- ing across platforms as shown in Figures 8(d)(e) respec- tively. We did not plot the idle time distribution, as we found very few gaps lasting longer than 1 sec, likely due to shorter round-trip delay, lighter server load, and gen- erally faster networks in the wired part of the testbed in- frastructure compared to experiments visiting commer- cial Web sites. Consistent with previous observations, HTC/AT&T again is an outlier in experiencing worst performance, outperformed even by T-Mobile’s 2G net- work. Computer/Sprint setup immediately trails behind the iPhone-WiFi-Proxy setup with the best performance, proving the importance of high processing capabilities. The average throughput for iPhone/AT&T is among the third best, demonstrating sufficient network resources within the AT&T 3G networks. Concurrent TCP connections: Previously, we found iPhone has somewhat an unfair advantage, as we found it is configured with a much higher limit for maximum number of allowed concurrent TCP connections for each server IP or domain. We also explore how increasing maximum TCP concurrency, conveniently configured at our server side due to a lack of control for iPhone, has an impact on the average HTML parsing time. This met- ric is measured as the elapsed between the start of the first byte from the server until the end of the last HTTP request which is embedded at the end of the Web page using a Javascript. Overlapping with parsing, this time also includes download time which is improved with in- creasing concurrency as shown in Figure 8(f). Javascript execution time: Due to limited resources,

0

1

0 0.1 0.2 0.3 0.4 0.5 0. DNS lookup time (secs)

iPhone/WiFi proxy HTC/T-Mobile Samsung/VZW iPhone/ATT^ Palm/Sprint Computer/Sprint (^0)

1

0 0.1 0.2 0.3 0.4 0.5 0. TCP handshake time (secs)

iPhone/WiFi proxy Samsung/VZW^ HTC/T-Mobile Palm/Sprint iPhone/ATT^ HTC/ATT Computer/Sprint (^0)

1

0 0.5 1 1.5 2 2.5 3 Web object download time (secs)

iPhone/WiFi Proxy Samsung/VZW^ HTC/T-Mobile Palm/Sprint HTC/ATT Computer/Sprint^ iPhone/ATT

(a) DNS lookup. (b) TCP handshake. (c) Web object download.

0

1

0 2 4 6 8 10 12 14 Page load time (secs)

iPhone/WiFi Proxy Samsung/VZW^ HTC/T-Mobile Palm/Sprint HTC/ATT iPhone/ATT Computer/Sprint 0

1

1 10 100 1000 Average throughput (kbps)

iPhone/WiFi Proxy HTC/T-Mobile Samsung/VZW Palm/Sprint iPhone/ATT^ HTC/ATT Computer/Sprint

0

5

10

15

20

25

30

35

Avg HTML parsing (sec) 1 1.5 2 2.5 3 Maximum concurrency

Palm/IE6 HTC/IE Samsung/IE6 iPhone/Safari

(d) Page load time. (e) Average throughput. (f) Concurrency’s effect on HTML parsing. Fig. 8. Controlled experiments for Web transaction breakdown.

Computer/IE 7

Samsung/IE 6

Palm/IE 6

HTC/IE 6

iPhone/Safari

iProxy/Safari

GPhone/Browser

0 0.5 1 1.5 2 2.5 3 Average HTML parsing time (secs)

iPhone URLs WM URLs

Fig. 10. Controlled experiments for HTML parsing.

0

1

0 5 10 15 20 Average page load time (secs)

iPhone comp iPhone HTC comp HTC

Fig. 11. Page load time comparison (iPhone vs. HTC, compressed vs. uncompressed).

it takes browsers on smartphones more time to parse and render Web objects compared to browsers executing on desktop computers. We design a set of controlled ex- periments to understand HTML parsing overhead and Javascript execution time. For Javascript analysis, we extract all embedded Javascript objects from real network traces of visiting the 24 Web sites. By replaying to Web servers the same HTTP GET requests in the trace, we can download all Javascript objects on a desktop computer. Two sets Javascripts are obtained: one corresponding to iPhone’s web browsing, the other for Windows Mobile phones. To ensure fair comparison, we exclude platform-specific Javascripts which first infer the browser type and then branch accordingly. Though it is hard to precisely iden- tify such Javascripts, we apply heuristics by searching key words such as ActiveXObject , indicative of being IE-

0

1

0 20 40 60 80 100 120 140 Average throughput (kbps)

iPhone comp iPhone HTC comp HTC

Fig. 12. Throughput comparison (iPhone vs. HTC, compressed vs. uncompressed).

specific. 40 scripts are collected after filtering based on a list of key words. To measure Javascript execution time, we first create an HTML page which includes all selected scripts. Two HTTP HEAD requests are used to mark the start and end of the execution of all scripts. This is to bypass a bug in the implementation of Date objects for IE browsers on some phones preventing us directly invoking getMil- liseconds(). HEAD requests are used for correlating the start and end time of the execution in the packet traces. A small drawback of this method is that the time in the packet trace of the HTTP HEAD request packet always appears later than the timestamp of xmlhttp.send(null), which is used to initiate HTTP HEAD request due to scheduling. However, this time gap of less than 100 ms is negligible relative to the aggregate Javascript execution time and HTML parsing time on the order of seconds. To ascertain to what extent browsers on smartphones are slower than the desktop counterparts, we repeat these experiments using Internet Explorer 7.0 on a desktop ma- chine running Windows Vista. The result is shown in Figure 9 which demonstrates the clear advantage of com- puter based platform over smartphones, among which iPhone performs the best. HTML parsing time: To assess the HTML parsing overhead, we modify the mirrored Web pages on our lo- cal Web server to contain a simple line of Javascript to initiate an HTTP request at two locations: one right af-

[14] Z. Zhuang, T.-Y. Chang, R. Sivakumar, and A. Velayutham. A3: Application-Aware Acceleration for Wireless Data Networks. In Proc. of ACM MOBICOM , 2006.