High-Performance and Energy-Efficient Mobile Web
Total Page:16
File Type:pdf, Size:1020Kb
High-Performance and Energy-Efficient Mobile Web Browsing on Big/Little Systems Yuhao Zhu and Vijay Janapa Reddi Department of Electrical and Computer Engineering The University of Texas at Austin [email protected], [email protected] Abstract plex and computationally intensive over the past decade. For Internet web browsing has reached a critical tipping point. example, Fig. 1 shows the network transmission time and Increasingly, users rely more on mobile web browsers to ac- content processing time for www.cnn.com over the past 11 cess the Internet than desktop browsers. Meanwhile, webpages years. We randomly pick one image from each year archived over the past decade have grown in complexity by more than by Internet Archive [ 3], and measure on a dual-core ARM tenfold. The fast penetration of mobile browsing and ever- Cortex-A9 mobile processor connected to a 100Mb/s Ethernet. richer webpages implies a growing need for high-performance The trend-line in the plot indicates a tenfold relative increase mobile devices in the future to ensure continued end-user in webpage computational intensity from the perspective of browsing experience. Failing to deliver webpages meeting compute versus network. hard cut-off constraints could directly translate to webpage As the computational intensity of webpages increases, there abandonment or, for e-commerce websites, great revenue loss. is growing concern over webpage loading time. A recent in- However, mobile devices’ limited battery capacity limits the vestigation concluded that users tend to abandon webpages degree of performance that mobile web browsing can achieve. that do not load within a certain cut-off latency [ 4]. Related In this paper, we demonstrate the benefits of heterogeneous statistics on e-commerce websites reveal that a 1-second delay systems with big/little cores each with different frequencies to in webpage load could result in a $2.5 million loss in sales achieve the ideal trade-off between high performance and en- per year [5]. The hard-constraint of cut-off latency implies a ergy efficiency. Through detailed characterizations of different need for high-performance mobile devices. However, energy webpage primitives based on the hottest 5,000 webpages, we constraints limit us from achieving desktop-level compute build statistical inference models that estimate webpage load capability on mobile devices. Therefore, the challenge is to time and energy consumption. We show that leveraging such ensure high performance while minimizing the energy con- predictive models lets us identify and schedule webpages us- sumption. Owing to a large scheduling space, heterogeneous ing the ideal core and frequency configuration that minimizes systems with big/little cores each with DVFS capabilities en- energy consumption while still meeting stringent cut-off con- able a flexible trade-off between performance and energy. straints. Real hardware and software evaluations show that In this paper, we demonstrate the benefits of big/little het- our scheduling scheme achieves 83.0% energy savings, while erogeneous systems in achieving an ideal performance and only violating the cut-off latency for 4.1% more webpages energy trade-off via scheduling. We harness the key insight as compared with a performance-oriented hardware strategy. that different webpages contain strong variances in load time Against a more intelligent, OS-driven, dynamic voltage and and energy consumption. Leveraging this fact, we propose frequency scaling scheme, it achieves 8.6% energy savings webpage-aware scheduling, a mechanism that explores the and 4.0% performance improvement simultaneously. webpage variance and intelligently schedules webpages using different core and frequency configurations for minimizing the 1. Introduction energy while still meeting the cut-off constraint. Mobile web browsing is shifting the balance of Internet Specifically, Fig. 2 shows the load time and energy con- traffic. Recent statistics indicate that users now spend 50.2% of sumption of six hot webpages loaded on the Cortex-A9 at their time using the web browser [1], causing mobile Internet 1.2 GHz. We observe strong variances across the webpages. traffic to surpass the amount of desktop Internet traffic in major For example, www.cnn.com takes approximately 6 seconds regions of the world [ 2]. The proliferation of mobile devices to load while consuming 8.9 Joules of energy. In contrast, and social networks is fueling this trend. Meanwhile, web www.craigslist.org takes less than 1 second to load monetization (i.e., the average revenue per user) is still 5X while consuming only 1.6 Joules of energy. Detailed charac- lower on mobile than desktop [ 1]. Media and advertisement terizations reveal that such variance is the result of inherent providers are harnessing this opportunity, and thus causing an variances of webpage primitives (e.g., HTML, CSS). Regres- even-faster penetration of mobile web browsing. sion modeling techniques capture the inherent webpage vari- Accompanying the critical mass of the mobile market is ance, and let us estimate the webpage load time and energy the trend that webpages are becoming significantly more com- consumption under different core and frequency combinations. 4 8000 15 User JavaScript External events Computation Webpage Loading Time Data flow Energy Consumption Actions Engine Network Internal execution 12 3 6000 Data structures Browser components DOM Render 9 Tree External objects 2 4000 Trend line for computation 6 Style Time (s) Server Parsing Layout Paint Display Resolution 1 2000 Trend line 3 for network www.163.com www.cnn.com www.imdb.com www.ebay.com www.facebook.com www.craigslist.org Energy Consumption Energy Consumption (J) Page Loading Page Loading Time (ms) Style 0 0 0 Rules 2000 2005 2010 Webpages Year Fig. 3: Overview of the web browser architecture. Fig. 1: Increasing computa- Fig. 2: Load time and energy tional intensity of webpages. consumption of webpages. additional second. A 4 second webpage load time can translate to a 25% increase in webpage abandonment [ 5]. On the basis of the estimations, we predict the ideal execution Furthermore, in a world where mobile web-based e- core and frequency for webpages and schedule them accord- commerce is rapidly emerging as the new means of conducting ingly to satisfy the cut-off constraint with the least energy. In online sales, missing the cut-off load time can have signifi- summary, we make the following contributions in this paper: cant financial ramifications to institutions [ 1]. A recent study 1. We explore the energy-delay trade-off of big/little systems concluded that an e-commerce website generating a revenue for mobile web browsing and demonstrate the potential of $100,000 per day stands to lose up to $2.5 million in sales benefits (Sec. 4). each year for every second of delay in webpage load [ 5]. 2. We identify the root cause of webpage variance by char- acterizing and quantifying different aspects of webpage 2.2. The Web Browser Architecture primitives (Sec. 5). At the center of the web browser architecture is the render- 3. We show that webpage load time and energy consumption ing engine, which processes the webpage documents returned can be predicted via regression models (Sec. 6). from the server and displays them on the screen. After the 4. We demonstrate how to leverage a big/little system effec- webpage is loaded, users can dynamically interact with the tively via the proposed webpage-aware scheduling (Sec. 7). webpage through JavaScript. In this paper, we focus only on Measured hardware results, of a synthesized big/little system the rendering engine because it is the first determinant part of based on the ARM Cortex-A9 and A8 processors, demon- the mobile web browsing experience. Dynamic webpage inter- strate that as compared with a performance-oriented hardware action is beyond the scope of this work, and we refer readers strategy, webpage-aware scheduling achieves 83.0% energy to Sec. 8 for a discussion about JavaScript. Using Fig. 3, we savings, while only violating the cut-off latency for 4.1% present an overview of the web browser architecture. more webpages. Against a more intelligent OS-driven DVFS The rendering engine starts with parsing HTML and CSS strategy, webpage-aware scheduling achieves 8.6% energy documents. HTML contains the text and overall skeleton of reduction while shortening load time by 4.0% on average. a webpage through a combination of tags, each associated with zero or more attributes. Along with parsing the HTML 2. Mobile Web Browsing file, the rendering engine dynamically constructs the DOM We explain what is important for end users during the mo- (Document Object Model) tree data structure, in which each bile web browsing experience (Sec. 2.1). Following that we node corresponds to a HTML tag, an attribute, or a section of provide a brief overview of how a web browser works, and we text. The DOM tree can be viewed as an abstract and concise identify potential sources of computational intensity (Sec. 2.2). representation of the webpage structure. Complementary to HTML, CSS determines the webpage’s 2.1. The Mobile Web Browsing Experience visual style information through a set of style rules, each with A neurological study conducted in 2010 by the CA Tech- a selector and a set of properties. Each rule is intended to nologies concluded that poor web browsing experience can select one or a group of HTML tags to apply the properties. lead to “web stress” that causes users to use a rival website During parsing, the rendering engine extracts CSS rules and or abandon the transaction altogether [ 4]. Google engineers constructs the corresponding data structure. measured this effect, stating that “a 400 ms delay leads to a Given the DOM tree and CSS rules, the style resolution mod- 0.44% drop in search volume” [ 6]. With over 2.27 billion ule determines the webpage’s style information (e.g.