Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad...

82
Deconstructing the Energy Consumption of the Mobile Page Load Yi Cao Joint work with: Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook University 1

Transcript of Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad...

Page 1: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Deconstructing the Energy Consumption of the Mobile Page Load

Yi Cao

Joint work with: Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi

Department of Computer Science, Stony Brook University

1

Page 2: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Overview• Web browser — popular app on phones

2

Page 3: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Overview• Web browser — popular app on phones

- Page speed is critical to users- Several Web optimizations to improve performance

2

Page 4: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Overview• Web browser — popular app on phones

- Page speed is critical to users- Several Web optimizations to improve performance

2

Page 5: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Overview• Web browser — popular app on phones

- Page speed is critical to users- Several Web optimizations to improve performance

• However, often ignore a crucial factor — Energy- Mobile devices are severely constrained by energy

2

Page 6: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Overview• Web browser — popular app on phones

- Page speed is critical to users- Several Web optimizations to improve performance

• However, often ignore a crucial factor — Energy- Mobile devices are severely constrained by energy- Reducing page load time may not imply energy savings

2

Page 7: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Page Load Process• Page load activities (Components)

- Computation: Evaluating HTML, Javascript, CSS.- Network: Downloads.

3

Component

PageLoad

img

img

JavascriptJavascript

HTML2HTML1

Page 8: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Page Load Process• Page load activities (Components)

- Computation: Evaluating HTML, Javascript, CSS.- Network: Downloads.

• In Browser Profiling Tool — WProf-M- Decomposes the page load into different components- Provides component type and time information

3

Component

PageLoad

img

img

JavascriptJavascript

HTML2HTML1

Page 9: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Page Load Process• Page load activities (Components)

- Computation: Evaluating HTML, Javascript, CSS.- Network: Downloads.

• In Browser Profiling Tool — WProf-M- Decomposes the page load into different components- Provides component type and time information

3

Component

PageLoad

img

img

JavascriptJavascript

HTML2HTML1

Page 10: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Page Load Process• Page load activities (Components)

- Computation: Evaluating HTML, Javascript, CSS.- Network: Downloads.

• In Browser Profiling Tool — WProf-M- Decomposes the page load into different components- Provides component type and time information

3

Component

PageLoad

img

img

JavascriptJavascript

HTML2HTML1

Page 11: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Page Load Process• Page load activities (Components)

- Computation: Evaluating HTML, Javascript, CSS.- Network: Downloads.

• In Browser Profiling Tool — WProf-M- Decomposes the page load into different components- Provides component type and time information

3

Component

PageLoad

img

img

JavascriptJavascript

HTML2HTML1

Page 12: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Page Load Process• Page load activities (Components)

- Computation: Evaluating HTML, Javascript, CSS.- Network: Downloads.

• In Browser Profiling Tool — WProf-M- Decomposes the page load into different components- Provides component type and time information- Page load time (PLT) is determined by the critical path

3

Critical Path Component

PageLoad

img

img

JavascriptJavascript

HTML2HTML1

Page 13: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

• Reducing PLT may not imply reducing energy- While PLT depends on the critical path- Energy depends on all page load activities

Energy of the Page Load

4

Page 14: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

BeforeCompression

AfterCompression

• Reducing PLT may not imply reducing energy- While PLT depends on the critical path- Energy depends on all page load activities

Energy of the Page Load

4

Page 15: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

BeforeCompression

AfterCompression

• Reducing PLT may not imply reducing energy- While PLT depends on the critical path- Energy depends on all page load activities

Energy of the Page Load

4

PLT ↓, However…0.5s

Page 16: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

BeforeCompression

AfterCompression

• Reducing PLT may not imply reducing energy- While PLT depends on the critical path- Energy depends on all page load activities

Energy of the Page Load

4

PLT ↓, However…IMG processing time ⇧ due to decompression

0.5s

Page 17: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

BeforeCompression

AfterCompression

• Reducing PLT may not imply reducing energy- While PLT depends on the critical path- Energy depends on all page load activities

Energy of the Page Load

4

PLT ↓, However…IMG processing time ⇧ due to decompression

0.5s

After compression, energy might ↑ although PLT ↓

Page 18: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

BeforeCompression

AfterCompression

• Reducing PLT may not imply reducing energy- While PLT depends on the critical path- Energy depends on all page load activities

• To estimate the Web energy, we need to:- evaluate the energy of entire page load- analyze the energy for each individual component

Energy of the Page Load

4

PLT ↓, However…IMG processing time ⇧ due to decompression

0.5s

After compression, energy might ↑ although PLT ↓

Page 19: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Problem Statement

5

Page 20: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Problem Statement

1. Can we get quick, accurate power and energy estimations for mobile page loads?

5

Page 21: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Problem Statement

1. Can we get quick, accurate power and energy estimations for mobile page loads?

2. Is it possible to provide visibility into both how and why Web page enhancements affect energy consumption?

5

Page 22: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Existing Solutions• Power Monitors:

- Measures power consumption accurately

6

Page 23: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Existing Solutions• Power Monitors:

- Measures power consumption accurately- But only report aggregate power- The energy bottlenecks remain hidden

6

Page 24: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Existing Solutions• Power Monitors:

- Measures power consumption accurately- But only report aggregate power- The energy bottlenecks remain hidden

• Power Modeling- Infers relationship between power and system stats

6

Page 25: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Existing Solutions• Power Monitors:

- Measures power consumption accurately- But only report aggregate power- The energy bottlenecks remain hidden

• Power Modeling- Infers relationship between power and system stats

6

P (CPU) = � ⇥ CPU util

Page 26: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Existing Solutions• Power Monitors:

- Measures power consumption accurately- But only report aggregate power- The energy bottlenecks remain hidden

• Power Modeling- Infers relationship between power and system stats

- However, they are not sufficient for mobile Web browsing…

6

P (CPU) = � ⇥ CPU util

Page 27: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (1/3)1. Transcience

• The page load process is short-lived

7

Page 28: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (1/3)1. Transcience

• The page load process is short-lived• For resource-based power models

- Need extremely fine-grained resource logging to get enough data

7

Page 29: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (1/3)1. Transcience

• The page load process is short-lived• For resource-based power models

- Need extremely fine-grained resource logging to get enough data- Frequent resource logging incurs huge overhead

‣ CPU overhead 30% at 100Hz logging

7

Page 30: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (2/3) 2. Complexity

• A web page consists of many components

8

Page 31: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (2/3) 2. Complexity

• A web page consists of many components• Difficult to tease out the energy effects of

- Specific page load activities

8

Page 32: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (2/3) 2. Complexity

• A web page consists of many components• Difficult to tease out the energy effects of

- Specific page load activities- Web optimizations

8

How will the power change if all images

are cached?

``

`

`

Page 33: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (3/3) 3. Variance

• Energy and PLT can vary significantly when loaded under the same conditions repeatedly.

9

Page 34: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (3/3) 3. Variance

• Energy and PLT can vary significantly when loaded under the same conditions repeatedly.- Example: Three runs of answers.yahoo.com

Red Blue Green

PLT(s) 3.9 3.5 2.8

Energy(J) 12.5 11.8 9.2

9

Page 35: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (3/3) 3. Variance

• Energy and PLT can vary significantly when loaded under the same conditions repeatedly.- Example: Three runs of answers.yahoo.com

Red Blue Green

PLT(s) 3.9 3.5 2.8

Energy(J) 12.5 11.8 9.2

9

• Difficult to estimate the power consumption of a Web page load simply by referring to previous page loads.

Page 36: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Challenges (3/3) 3. Variance

• Energy and PLT can vary significantly when loaded under the same conditions repeatedly.- Example: Three runs of answers.yahoo.com

Red Blue Green

PLT(s) 3.9 3.5 2.8

Energy(J) 12.5 11.8 9.2

9

• Difficult to estimate the power consumption of a Web page load simply by referring to previous page loads.

• Thus, we focus on power per page load instantiation.

Page 37: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Outline• RECON

- Idea- Power Model- Training & Testing

• Evaluation & Results • Application • Conclusion

10

Page 38: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

• Idea: Resource Monitoring + App Semantics

11

High-Level Idea

Page 39: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

• Idea: Resource Monitoring + App Semantics- Coarse-grained resource monitoring (10/sec; 2% overhead)

11

ResourceData● CPUutil/freq● Bytessent/recv

High-Level Idea

Page 40: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

• Idea: Resource Monitoring + App Semantics- Coarse-grained resource monitoring (10/sec; 2% overhead)- Augmented by low-level page load semantics from WProf-M

ComponentData● Componenttype● Componenttime

11

ResourceData● CPUutil/freq● Bytessent/recv

High-Level Idea

Page 41: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

• Idea: Resource Monitoring + App Semantics- Coarse-grained resource monitoring (10/sec; 2% overhead)- Augmented by low-level page load semantics from WProf-M

RECON

ComponentData● Componenttype● Componenttime

11

ResourceData● CPUutil/freq● Bytessent/recv

High-Level Idea

REsource- and COmpoNent-based modeling

Page 42: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

• Idea: Resource Monitoring + App Semantics- Coarse-grained resource monitoring (10/sec; 2% overhead)- Augmented by low-level page load semantics from WProf-M

RECON

ComponentData● Componenttype● Componenttime

11

ResourceData● CPUutil/freq● Bytessent/recv

High-Level Idea

REsource- and COmpoNent-based modeling

Page 43: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

CPU Utilization

• How to match resource with component information

12

Segmentation

Page 44: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

CPU Utilization

• How to match resource with component information- Breakdown the page load process into segments

12

Segmentation

Segment

Page 45: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

CPU Utilization

• How to match resource with component information- Breakdown the page load process into segments- Within each segment..

‣ Collect component info‣ Compute avg resource use

12

Segmentation

Segment

Page 46: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

CPU Utilization

• How to match resource with component information- Breakdown the page load process into segments- Within each segment..

‣ Collect component info‣ Compute avg resource use

• RECON- Segment level power modeling

12

Segmentation

Segment

Page 47: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Linear Regression Model• Weighted Linear combination

- Specifically, for each segment

13

Page 48: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Linear Regression Model• Weighted Linear combination

- Specifically, for each segment‣ (Average power consumption of segment s)

13

Ps

Using a power monitor to get just for

building the modelPs

Page 49: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Linear Regression Model• Weighted Linear combination

- Specifically, for each segment‣ (Average power consumption of segment s)‣ (Resource Usage: CPU %, bytes rx/tx, …)

13

Ps

Ri

Using a power monitor to get just for

building the modelPs

Page 50: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Linear Regression Model• Weighted Linear combination

- Specifically, for each segment‣ (Average power consumption of segment s)‣ (Resource Usage: CPU %, bytes rx/tx, …)‣ (Frequency of Component: EvalHtml, …)

13

Ps

Ri

Using a power monitor to get just for

building the modelPs

Page 51: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Linear Regression Model• Weighted Linear combination

- Specifically, for each segment‣ (Average power consumption of segment s)‣ (Resource Usage: CPU %, bytes rx/tx, …)‣ (Frequency of Component: EvalHtml, …)‣ (Weights)

13

Ps

Ri

Using a power monitor to get just for

building the modelPs

Page 52: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Linear Regression Model• Weighted Linear combination

- Specifically, for each segment‣ (Average power consumption of segment s)‣ (Resource Usage: CPU %, bytes rx/tx, …)‣ (Frequency of Component: EvalHtml, …)‣ (Weights)

- Measure: , , - To Derive unknown :

‣ Use multiple linear regression

13

Ps

Ri

Using a power monitor to get just for

building the modelPs

Ps Ri

Page 53: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Neural Network Model• Detect non-linear relationships:

14

Page 54: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Neural Network Model• Detect non-linear relationships:

• Trade-off- LR: fast | simple — 2 seconds for 4-CV- NN: powerful | complicated, slow — 20 minutes for 1-CV-

14

Page 55: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

15

• Training- Randomly select 80 pages, pick 60 for training

‣ For each Web page, we run 10 times

Model Building — LR

Page 56: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

15

• Training- Randomly select 80 pages, pick 60 for training

‣ For each Web page, we run 10 times- Monitor , , ; derive RiPs

Model Building — LR

Page 57: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

15

• Training- Randomly select 80 pages, pick 60 for training

‣ For each Web page, we run 10 times- Monitor , , ; derive

• Testing- Test on the remaining 20 pages

‣ 10 runs per page

RiPs

Model Building — LR

Page 58: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

15

• Training- Randomly select 80 pages, pick 60 for training

‣ For each Web page, we run 10 times- Monitor , , ; derive

• Testing- Test on the remaining 20 pages

‣ 10 runs per page- Monitor , ; estimate using weighted linear summation

Ri

Ri

Ps

P̂s

Model Building — LR

Page 59: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

15

• Training- Randomly select 80 pages, pick 60 for training

‣ For each Web page, we run 10 times- Monitor , , ; derive

• Testing- Test on the remaining 20 pages

‣ 10 runs per page- Monitor , ; estimate using weighted linear summation

• Experiment on 3 devices: - Samsung Galaxy S4, S5, Nexus- Device-specific weights

Ri

Ri

Ps

P̂s

Model Building — LR

Page 60: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Outline• RECON

• Evaluation & Results- Mean Error- RECON Error CDF & Different devices

• Application • Conclusion

16

Page 61: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Mean Error < 7%

17

• Webpage-level Estimation (Galaxy S4)

Page 62: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

0 20 40 60 80

Web pages

0

10

20

30

Mo

de

ling

err

or

(%)

LR error: 6.29%

NN error: 5.40%

LR model

NN model

Mean Error < 7%

17

• Webpage-level Estimation (Galaxy S4)- Average estimation error 6.3% across 80 Web pages (4-fold CV)

‣ NN reduces the error to 5.4%.

Page 63: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

0 20 40 60 80

Web pages

0

10

20

30

Mo

de

ling

err

or

(%)

LR error: 6.29%

NN error: 5.40%

LR model

NN model

Mean Error < 7%

17

• Webpage-level Estimation (Galaxy S4)- Average estimation error 6.3% across 80 Web pages (4-fold CV)

‣ NN reduces the error to 5.4%.

Page 64: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

0 10 20 30 40 50

Modeling error (%)

0

0.2

0.4

0.6

0.8

1

P(e

rro

r x

)

LR model

NN model

Error CDF• RECON Error CDF

18

Page 65: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

0 10 20 30 40 50

Modeling error (%)

0

0.2

0.4

0.6

0.8

1

P(e

rro

r x

)

LR model

NN model

Error CDF• RECON Error CDF

- The CDF shows the energy estimation errors across all runs of all 80 Web pages. We see that 80% of the errors are below 10%.

18

Page 66: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

0 10 20 30 40 50

Modeling error (%)

0

0.2

0.4

0.6

0.8

1

P(e

rro

r x

)

LR model

NN model

Error CDF• RECON Error CDF

- The CDF shows the energy estimation errors across all runs of all 80 Web pages. We see that 80% of the errors are below 10%.

18

Page 67: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

0 10 20 30 40 50

Modeling error (%)

0

0.2

0.4

0.6

0.8

1

P(e

rro

r x

)

LR model

NN model

Error CDF• RECON Error CDF

- The CDF shows the energy estimation errors across all runs of all 80 Web pages. We see that 80% of the errors are below 10%.

Error S4 S5 Nexus

Webpage 6.3% 7.1% 9.1%

Different Devices

18

Page 68: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Segment Error• Fine-grained power estimation

- Based on segments

19

Segment error 7.8% for yelp.com Segment error 9.7% for sfr.fr

0 50 100 150

Segments

2

3

4

5

Pow

er

(Watts)

ActualEstimated

0 20 40 60 80Segments

2

3

4

5

Po

we

r (W

att

s)

ActualEstimated

Page 69: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Outline• RECON • Evaluation & Results

• Application- Analyze Web enhancements’ non-intuitive energy behaviors- Two case studies‣ Caching‣ Compression

• Conclusion

20

Page 70: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Case 1: Caching• How will PLT and Energy

change due to caching?

21

CSSJavaScript

Image

EvalHTML

Page 71: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Case 1: Caching• How will PLT and Energy

change due to caching?

21

z

z

CSSJavaScript

Image

EvalHTML

Most Disappear

Most cached objects are downloads

Page 72: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Case 1: Caching• How will PLT and Energy

change due to caching?

21

z

z

CSSJavaScript

ImagePLT(s) Energy(J)

Original 2.5 8.2Cached 2.1 5.7

Reduce% 16% 30%

Energy Reduction ~= 2X PLT Reduction

EvalHTML

Most Disappear

Most cached objects are downloads

Page 73: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Case 1: Caching• How will PLT and Energy

change due to caching?

21

z

z

CSSJavaScript

ImagePLT(s) Energy(J)

Original 2.5 8.2Cached 2.1 5.7

Reduce% 16% 30%

Energy Reduction ~= 2X PLT Reduction

EvalHTML

Most not on critical path!

Most cached objects are downloads

Page 74: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Case 1: Caching• How will PLT and Energy

change due to caching?

21

z

z

CSSJavaScript

ImagePLT(s) Energy(J)

Original 2.5 8.2Cached 2.1 5.7

Reduce% 16% 30%

Energy Reduction ~= 2X PLT Reduction

EvalHTML

Most not on critical path!But, they affect energy.

Most cached objects are downloads

Page 75: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Case 1: Caching• How will PLT and Energy

change due to caching?

21

RECON: Energy for Downloads reduces by 81%!

z

z

CSSJavaScript

ImagePLT(s) Energy(J)

Original 2.5 8.2Cached 2.1 5.7

Reduce% 16% 30%

Energy Reduction ~= 2X PLT Reduction

EvalHTML

Most not on critical path!But, they affect energy.

Most cached objects are downloads

Page 76: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isapplied

Case 2: Gzip Compression• Compression level ranges from 1 to 9 (NGINX)

- lv.9 is the highest compression level

22

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isappliedirs.gov under compression level 1

irs.gov under compression level 9

JavaScript CSS

Page 77: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isapplied

JS: 250->500ms CSS: 200->700ms

Case 2: Gzip Compression• Compression level ranges from 1 to 9 (NGINX)

- lv.9 is the highest compression level

22

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isappliedirs.gov under compression level 1

irs.gov under compression level 9

JavaScript CSS

Page 78: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isapplied

JS: 250->500ms CSS: 200->700ms

Case 2: Gzip Compression• Compression level ranges from 1 to 9 (NGINX)

- lv.9 is the highest compression level

- Lower compression level provides more benefits!

22

PLT ↓ Energy ↓Level 1 78% 75%Level 9 47% 39%

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isappliedirs.gov under compression level 1

irs.gov under compression level 9

JavaScript CSSBetter!

Page 79: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isapplied

JS: 250->500ms CSS: 200->700ms

Case 2: Gzip Compression• Compression level ranges from 1 to 9 (NGINX)

- lv.9 is the highest compression level

- Lower compression level provides more benefits!

22

PLT ↓ Energy ↓Level 1 78% 75%Level 9 47% 39%

www.irs.govwhencompressionlevel9isapplied

www.irs.govwhencompressionlevel1isappliedirs.gov under compression level 1

irs.gov under compression level 9

RECON: 37% more CPU energy due to CSS and

Javascript decompressionLonger

Decompression

JavaScript CSSBetter!

Page 80: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Outline• RECON

• Evaluation & Results

• Application

• Conclusion

23

Page 81: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Conclusion• Web performance critical

- Overlook energy- Mobile devices are constrained by energy

• We present RECON- Leverages page load semantics and resource-level information- Less than 7% error across 80 webpages.- Enables evaluating the energy effects of Web optimizations

24

RECON

ComponentData● Componenttype● Componenttime

ResourceData● CPUutil/freq● Bytessent/recv

Page 82: Deconstructing the Energy Consumption of the Mobile Page Load€¦ · Javad Nejati, Muhammad Wajahat, Aruna Balasubramanian, Anshul Gandhi Department of Computer Science, Stony Brook

Conclusion• Web performance critical

- Overlook energy- Mobile devices are constrained by energy

• We present RECON- Leverages page load semantics and resource-level information- Less than 7% error across 80 webpages.- Enables evaluating the energy effects of Web optimizations

• Thank you!

24

RECON

ComponentData● Componenttype● Componenttime

ResourceData● CPUutil/freq● Bytessent/recv