F ast A pp L aunching for Mobile Devices Using Predictive User Con text

19
F ast A pp L aunching for Mobile Devices Using Predictive User Con text Tingxin Yan University of Massachusetts Amherst David Chu Microsoft Research Deepak Ganesan University of Massachusetts Amherst Aman Kansal Microsoft Research Jie Liu Microsoft Research 1 “The Peregrine Falcon is renowned for its speed, reaching over 322 km/h (200 mph) during its characteristic hunting stoop (high speed dive), making it the fastest member of the animal kingdom.” MobiSys 2012 Low Wood Bay, Lake District, UK falcon

description

“ The Peregrine Falcon is renowned for its speed, reaching over 322 km/h (200 mph) during its characteristic hunting stoop (high speed dive), making it the fastest member of the animal kingdom. ”. falcon. F ast A pp L aunching for Mobile Devices Using Predictive User Con text . - PowerPoint PPT Presentation

Transcript of F ast A pp L aunching for Mobile Devices Using Predictive User Con text

Page 1: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

Fast App Launching for Mobile Devices Using Predictive User Context Tingxin Yan University of Massachusetts AmherstDavid Chu Microsoft ResearchDeepak Ganesan University of Massachusetts AmherstAman Kansal Microsoft ResearchJie Liu Microsoft Research

1

“The Peregrine Falcon is renowned for its speed, reaching over 322

km/h (200 mph) during its characteristic hunting stoop (high speed dive), making it the fastest member of the animal kingdom.”

MobiSys 2012Low Wood Bay, Lake District, UK

falcon

Page 2: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

2

Mobile Apps…

measured on Samsung Focus Windows Phone

Top Apps in Marketplace

Average loading time > 12s

Angry

Birds

SONIC

THE H

EDGE

Need f

or Sp

eed

Fruit N

inja

Tetri

s

PES 2

011

Doodle

Jump

Naviga

tion

HoloPh

one 3

D0

5

10

15

20

25

Load

ing

Tim

e (s

)

Loading Slowly

Page 3: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

Slow Network Content Fetching

3

Email News Social

measured on iPhone 3GS Loading time > 10s in 3G

Page 4: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

4

App Prelaunch with Context

Challenges and Approaches

What is Prelaunch?Prelaunch: Schedule an app to run before the user launches it

Which app to prelaunch?

Context clues indicate predictable app usage

patterns

Data insights shed light on informative

context (3)

At what cost and benefit?

Cost: energy, memory

Benefit: latency reduction

Problem formulation efficiently provides

optimal solution

Requiring what systems support?

FALCON’s scheduling and memory management

complement kernel’s

Windows Phone OS mod prototype

implementation

inference

optimization

systems

Page 5: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

5

Trigger Context

0

0.1

0.2

0.3

SMS Email Social Phone Browser

Session

TimeEmail News Game

Trigger Followers

0

0.1

0.2

WordsWF SMS Email Phone Browser

most popular triggers overallmost popular triggers for Angry Birds

Trigger Context: given a trigger

app, identify most likely follower

apps[interpretation]

Interruptions lead us to habitual

routines

Page 6: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

6

Location Context

HOME WORK SHOPPING0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Game Calendar Social

Pro

babi

lity

Den

sity

Email

Email

Cal

Cal

Twitter

Email

Calendar

Twitter

Twitter

Game

Game

Facebook

Twitter

Twitter

Facebook

Location Context: given a location (cluster

id), identify most likely apps

Productivity Apps @ Work

Social Apps@ Outdoors

[interpretation]What we are

doing depends on Where we are

Page 7: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

7

Burst Context

0

50

100

150

JAN FEB MAR APR MAY JUNE JULY AUG SEPT OCT NOV DEC JAN FEB

App

Usa

ge Angry Bird

2010 2011How long are bursts?

Burst window

0

0.5

1

1 10 20 30 40 50 60

Pro

babi

lity

Days

Burst Context: detect and

predict whether an app is bursting

Apps exhibit bursts of popularity

[interpretation]We get bored of

stuff

Page 8: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

8

Decision Engine, Step 1: Likelihood Estimation

App Likelihood Estimation: Conditional probability on <Trigger,

Location, Burst>

Likelihood Estimates used as ranking metric…

baseline

trigger

+location

+burstbetter

Context:Trigger, Location, Burst

Page 9: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

9

Decision Engine, Step 2: Cost-Benefit AnalysisLikelihood Estimates

• Maximize Latency Reduction

• Subject to energy budget (e.g. 2%)

Optimization Problem

• Knapsack Problem• Top-K Greedy

Approximation

Potential Benefit: Latency reduction

IonBall

Ex

Let's

Golf

3

Metro-Y

outu

beMail

Peop

leMap

s02468

1012141618

Regular LaunchPrelaunched

Laun

ch L

aten

cy (

s)

Potential Cost:Energy wasted

IonBall

Ex

Let's

Golf

3

Metro-Y

outu

beMail

Peop

leMap

s0

200

400

600

800

1000

1200

Laun

ch E

nerg

y (u

Ah)

Page 10: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

Runtime Example

10

Phone SMS Email AngryBirds

Weather

Memory

Trigger Follower Cost/Benefit Rank

SMS WordsWithFriends 1

SMS Facebook 2SMS AngryBirds 3SMS NeedForSpeed 4SMS Twitter 5

Apps likely @ Current Location and BurstingWordsWithFriendsAngryBirdsFacebookNeedForSpeed…

WordsWFriends

Facebook

TriggerPrelaunched FollowersDecision

Engine

Energy Budget

Page 11: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

11

FALCON Architecture & Prototype

Date/Time

Apps Used

Geo Coords

Context Source

Manager

DispatcherFeature Extracto

rs

Decision

Engine

Launch Predictor

Server-based Model Trainer

Model Trainer

Proc TrackerKernel

Memory Manager (not

FALCON)

…App

1App

2 AppN

User

Kernel

FALCONcomponentsshown

Context• Trigger• Location• Burst

• Inference• Cost-

Benefit Analysis

FALCON UI

Windows Phone 7.5 OS mod

2MB main memory; negligible processing & energy overheadsee paper for details

Page 12: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

12

Evaluation: FALCON vs. LRU

Reduced from 9s to 6s

Results for Games & Entertainment

appssimilar results for all

apps

Page 13: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

13

Evaluation: Time-Since-Last-Update

Email Time-Since-Last-Update (minutes)

Reduced from 30min to 3min

FALCON outperforms

polling most of the time

FALCON

Polling (30 mins)

No Prefetching

Page 14: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

14

Evaluation: Cost-Benefit Analysis

6s latency reduction for 2% energy budget

Page 15: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

15

ConclusionFALCON: Fast App Launching with ContextWhich app to prelaunch?

Context clues indicate predictable app usage

patterns

Data insights shed light on informative context

At what cost and benefit?

Cost: energy, memory

Benefit: latency reduction

Problem formulation efficiently provides

optimal solution

Requiring what systems support?

FALCON’s scheduling and memory management complement kernel’s

Windows Phone OS mod prototype implementation

Insightful Context: Trigger, Location,

BurstCost-Benefit

Decision Engine (see paper)

inference optimization systems

Page 16: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

Backup Slides

16

Page 17: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

Evaluation: Micro-benchmarks

17

Sally

's Sa

lon

Sonic

the H

edge

Tent

acles

Doodle

Jump

Mon

opoly

Beard

s & B

eaks

IonBall

Ex

Let's

Golf

3

Metr

o-You

tube

Mail

Peop

leM

aps

0

5

10

15

20

25

Regular Launch

Prelaunched

Laun

ch L

aten

cy (

s)

Sally

's Sa

lon

Sonic

the H

edge

Tent

acles

Doodle

Jump

Monop

oly

Beard

s & Bea

ks

IonBall

Ex

Let's

Golf

3

Metro-Y

outu

beMail

Peop

leMap

s0

200400600800

1000120014001600

Laun

ch E

nerg

y (u

Ah)

benefit: latency reduction if predictions always right

cost: energy expenditure if predictions always wrong

Popular & 1st Party Apps

Page 18: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

Launch Predictor Bootstrap & Training

18

Page 19: F ast  A pp  L aunching for Mobile Devices Using Predictive User  Con text

Context Acquisition Cost• App History is free

• Trigger Context• Burst Context

• Location can be cheap• Coarse-grained location is cheap (base station id, Wi-Fi AP id)• Location Service cache amortizes fine-grained location cost

across apps

19