from%feast%to%famine!! - usenix · 48 0 1000 2000 3000 4000 5000 6000 0 100 200 300 400 500 600 700...
TRANSCRIPT
From Feast to Famine Managing mobile network resources across
environments and preferences
Rob Kiefer Erik Nordström
Michael Freedman Princeton University
Network Usage Makes Demands on Limited Resources
• Data
• Ba>ery
• Performance
2
! 2GB
!
App App App App App App ! Running
tasks
• User mobility – indoor vs outdoor – WiFi vs LTE – mulIpath & migraIon
• User interest – foreground vs background apps – InteracIve vs streaming
3
Limita<ons and Opera<ng Condi<ons Are Not Sta<c
Divergent Goals = Resource Conflicts
• User and apps may differ – e.g., apps may prioriIze perf, user is cost sensiIve
• User has to moderate resource usage between apps
4
Streaming Music App
5
User Goals Don’t Match App Goals
Streaming Music App
6
User Goals Don’t Match App Goals
User wants to sacrifice quality; app overuses cell network
Streaming Music App
Flow-‐level Fairness != App-‐level Fairness
7
Video App
Network Usage
Flows
Streaming Music App
Flow-‐level Fairness != App-‐level Fairness
8
Video App
Network Usage
Flows
StreamingMusic App
Flow-‐level Fairness != App-‐level Fairness
9
Video App
Network Usage
Flows
StreamingMusic App
Interac<ve Apps Lack Priori<za<on
10
Browser
Network Usage
StreamingMusic App
Interac<ve Apps Lack Priori<za<on
11
Browser
Network Usage
Streaming Music App
Interac<ve Apps Lack Priori<za<on
12
Browser
Network Usage
Interac<ve apps stuck behind long-‐running flows, hur<ng UX.
Strawman: Users micromanage across seQngs
13
Strawman: Users micromanage across seQngs
14
• Requires user to monitor and esImate usage over potenIally long epochs (hours, days)
• Restricts typically all-‐or-‐nothing, e.g., allow on mobile or not
Strawman: Users micromanage across seQngs
15
Poor reuse in similar apps
Strawman: Users micromanage across seQngs
16
Varying levels of control
Few
Many
Poor reuse in similar apps
Strawman: Users micromanage across seQngs
17
Updates can add, remove, or change seangs without user knowing
Varying levels of control
Poor reuse in similar apps
• OS limits background acIvity
• Only certain classes of apps
• Used by iOS and WinPhone
• User has no choice
18
Strawman: OS-‐level limita<ons and restric<ons
Streaming Music App
✔ OK!
Random App XYZ
✖ NOPE!
• Usage preferences through programmaIc policy; user is priority, but app flexibility
• Address conflicts proac0vely
• MigraIon / mulIpath in mind
• Handle dynamic operaIng condiIons
19
Our Solu<on: Tango
20
Tango Overview
Kernel Measure Control
Controller
Gather plans
Execute
Apps
Plans
User Policy
State
21
Tango Overview
Kernel Measure Control
Controller
Gather plans
Execute
Apps
Plans
User Policy
State
State – metrics from kernel sources Plans – acIons to be taken Policy – generates plans from given state
22
Tango Overview
Kernel Measure Control
Controller
Gather plans
Execute
Apps
Plans
User Policy
State
1. Controller
2. User Policy
3. App Policies
23
Tango Overview
Kernel Measure Control
Controller
Gather plans
Execute
Apps
Plans
User Policy
State
1. Controller
2. User Policy
3. App Policies
Tango: Controller
• Measures device state
• Generates policy constraints
• Carries out policy plans – Verify against constraints – Perform ac<ons in plan
24
Kernel Measure Control
Controller
Gather plans
Execute
Apps
Plans
User Policy
State
Tango: Controller
• Measures device state
• Executes the user policy
• Carries out policy plans – Verify against constraints – Perform ac<ons in plan
25
Kernel Measure Control
Controller
Gather plans
Execute
User Policy
State
Apps
Plans
Tango: Policies
26
Kernel Measure Control
Controller
Gather plans
Execute
User Policy
State
• Programs
• Turn state into plans
• Two levels: user & app
Apps
Plans
Tango: Policies
27
Kernel Measure Control
Controller
Gather plans
Execute
Apps
Plans
User Policy
State
• Programs
• Turn state into plans
• Two levels: user & app
• User level – Global management of network resources – Sets resource constraints for app policies – Default plan for (classes of) apps
28
Policies: Turning State into Ac<ons
29
Policies: Turning State into Ac<ons net_name: eth0 net_type: CELL, ba>_charge: false ba>_perc: 50
flows: 10, 11, 12… …
30
Policies: Turning State into Ac<ons net_name: eth0 net_type: CELL, ba>_charge: false ba>_perc: 50
flows: 10, 11, 12… …
Source Info
Transport Layer # retrans., RTTs, cong. window…
Network Layer (IP) addresses, rouIng rules…
Link Layer type, signal quality, bit errors…
Ba>ery charging status, percent…
State
31
Policies: Turning State into Ac<ons net_name: eth0 net_type: CELL, ba>_charge: false ba>_perc: 50
flows: 10, 11, 12… …
Policy
State Source Info
Transport Layer # retrans., RTTs, cong. window…
Network Layer (IP) addresses, rouIng rules…
Link Layer type, signal quality, bit errors…
Ba>ery charging status, percent…
32
Policies: Turning State into Ac<ons net_name: eth0 net_type: CELL, ba>_charge: false ba>_perc: 50
flows: 10, 11, 12… …
Policy
MIGRATE(10, eth0), MIGRATE(11, eth0), MIGRATE(12, eth0), …, RATELIMIT(eth0, 500kbps)
State Source Info
Transport Layer # retrans., RTTs, cong. window…
Network Layer (IP) addresses, rouIng rules…
Link Layer type, signal quality, bit errors…
Ba>ery charging status, percent…
33
Policies: Turning State into Ac<ons
Ac<on Iface Flow
ENABLE ✔ ✔
RATELIMIT ✔ ✔
LOG ✔ ✔
MANAGE ✔
MIGRATE ✔
State
Ac<ons
net_name: eth0 net_type: CELL, ba>_charge: false ba>_perc: 50
flows: 10, 11, 12… …
Policy
MIGRATE(10, eth0), MIGRATE(11, eth0), MIGRATE(12, eth0), …, RATELIMIT(eth0, 500kbps)
Source Info
Transport Layer # retrans., RTTs, cong. window…
Network Layer (IP) addresses, rouIng rules…
Link Layer type, signal quality, bit errors…
Ba>ery charging status, percent…
Kernel Measure Control
Controller
Gather plans
Execute State
• Leverage local state
• Only act on their flows
• Subject to user policy constraints
• App can provide hints
34
Tango: App Policies
Apps
Plans
User Policy
• ProacIvely address resource conflicts – Constraints known a priori – Simplifies controller & app policy interacIon cycle
• Apps can hint at desired resource needs for future rounds
35
Tango: Constraints & Hints
evaluate(s, c): // Plan returned.
genConstraints(s): c = new Constraints()
for a in s.apps():
if a.isForeground():
c.put(a, HIGH)
return c
36
USER POLICY
Tango: User & App Policy
evaluate(s, c): // Plan returned.
genConstraints(s): c = new Constraints()
for a in s.apps():
if a.isForeground():
c.put(a, HIGH)
return c
37
evaluate(s, ca): plan = new Plan() pstate = GetPlayerState()
// Rest of policy omitted.
plan.hintPriority = NORM
urgent = false
buffer = pstate.bufferTime
if buffer > 30:
urgent = false
elif buffer < 20 || urgent:
urgent = true
plan.hintPriority = HIGH
return plan
USER POLICY APP POLICY
Tango: User & App Policy
evaluate(s, c): // Plan returned.
genConstraints(s): c = new Constraints()
for a in s.apps():
hint = a.hintPriority
if a.isForeground():
c.put(a, HIGH)
elif Allowed(a, hint):
c.put(a, hint)
return c
38
evaluate(s, ca): plan = new Plan() pstate = GetPlayerState()
// Rest of policy omitted.
plan.hintPriority = NORM
urgent = false
buffer = pstate.bufferTime
if buffer > 30:
urgent = false
elif buffer < 20 || urgent:
urgent = true
plan.hintPriority = HIGH
return plan
USER POLICY APP POLICY
Tango: User & App Policy
• Controller, sample policies, sample apps in Java for Android phones
• Flow migraIon provided by Serval (NSDI ‘12)
• Explored the policy space for single and mulIple apps
39
Prototype
• Campus WiFi offers chance to offload
• But, even seamless switching w/ migraIon has problems
• How to use policy to improve when to switch?
• How to minimize cell usage?
• How can app policies help?
40
Evalua<on: Streaming Music Across SpoXy Campus WiFi
• Campus WiFi offers chance to offload
• But, even seamless switching w/ migraIon has problems
• How to use policy to improve when to switch?
• How to minimize cell usage?
• How can app policies help?
41
Evalua<on: Streaming Music Across SpoXy Campus WiFi
42
Clinging to WiFi Leads to Poor Performance
Good WiFi Bad WiFi
43
0 100 200 300 400 500
0 100 200 300 400 500 600 700
Buffe
r (se
cs)
Time (secs)
WiFiCell
Clinging to WiFi Leads to Poor Performance
Good WiFi Bad WiFi
44
0 100 200 300 400 500
0 100 200 300 400 500 600 700
Buffe
r (se
cs)
Time (secs)
WiFiCell
Clinging to WiFi Leads to Poor Performance
Unneeded cell usage
Good WiFi Bad WiFi
45
0 100 200 300 400 500
0 100 200 300 400 500 600 700
Buffe
r (se
cs)
Time (secs)
WiFiCell
0
100
200
300
0 100 200 300 400 500 600 700
Buffe
r (se
cs)
Time (secs)
Pause
WiFiCell
Clinging to WiFi Leads to Poor Performance
Good WiFi Bad WiFi
• More aggressive in leaving WiFi; more conservaIve in joining
• Use heurisIcs on signal strength trends
• Based on measurements across campus of signal strength vs achieved throughput
46
Improving Network Switching
47
0 1000 2000 3000 4000 5000 6000
0 100 200 300 400 500 600 700 800
Buffe
r (se
cs)
Time (secs)
WiFiCell
Improving Streaming Music Through Policy
No rate limit
48
0 1000 2000 3000 4000 5000 6000
0 100 200 300 400 500 600 700 800
Buffe
r (se
cs)
Time (secs)
WiFiCell
0 100 200 300 400 500 600 700 800
0 100 200 300 400 500 600 700 800
Buffe
r (se
cs)
Time (secs)
WiFiCell
Improving Streaming Music Through Policy
No rate limit Rate limit
49
0 100 200 300 400 500 600 700
0 100 200 300 400 500 600 700 800
Buffe
r (se
cs)
Time (secs)
WiFiCell
0 1000 2000 3000 4000 5000 6000
0 100 200 300 400 500 600 700 800
Buffe
r (se
cs)
Time (secs)
WiFiCell
0 100 200 300 400 500 600 700 800
0 100 200 300 400 500 600 700 800
Buffe
r (se
cs)
Time (secs)
WiFiCell
Improving Streaming Music Through Policy
No rate limit Rate limit
App Policy
50
0 50
100 150 200 250
Unl Rate App
Dat
a (M
B)
Policy
WiFiCell
Total
User and App Policy Coopera<on Yields Best Usage
Rate uses 5-‐6x less cell data than Unl. App uses about 30x less cell data than Unl.
51
0
2
4
6
8
0 20 40 60 80 100 120 0
10
20
30
40
50Pa
ge lo
ad ti
me
(s)
Play
back
buf
fer (
s)
Time (secs)
Music appWeb app
Interac<ve App Compe<ng w/ Streaming App
Problem Poor resource isolaIon leads to erraIc load Imes Solu<on App fair share, prioriIze music only when buffer low
52
0
2
4
6
8
0 20 40 60 80 100 120 0
10
20
30
40
50Pa
ge lo
ad ti
me
(s)
Play
back
buf
fer (
s)
Time (secs)
Music appWeb app
Interac<ve App Compe<ng w/ Streaming App
Problem Poor resource isolaIon leads to erraIc load Imes Solu<on App fair share, prioriIze music only when buffer low
53
0
2
4
6
8
0 20 40 60 80 100 120 0
10
20
30
40
50Pa
ge lo
ad ti
me
(s)
Play
back
buf
fer (
s)
Time (secs)
Music appWeb app
0
2
4
6
8
0 50 100 150 200 250 300 350 0
10
20
30
40
50
Page
load
tim
e (s
)
Play
back
buf
fer (
s)
Time (secs)
Music appWeb app
Interac<ve App Compe<ng w/ Streaming App
• Context awareness: CASS, CARISMA, JCAF – Using context to improve apps – Not looking at resource usage; not single device
• Network Choice/Wifi Offloading – Many: Whiffler, IMP, BreadCrumbs, SALSA… – Complementary to Tango
• Serval, MPTCP, TCP-‐Migrate – Need policy to guide decisions on nets to use – Complementary to Tango
54
Related Work
• Context awareness: CASS, CARISMA, JCAF – Using context to improve apps – Not looking at resource usage; not single device
• Network Choice/WiFi Offloading – Many: Whiffler, IMP, BreadCrumbs, SALSA… – Complementary to Tango
• Serval, MPTCP, TCP-‐Migrate – Need policy to guide decisions on nets to use – Complementary to Tango
55
Related Work
• Context awareness: CASS, CARISMA, JCAF – Using context to improve apps – Not looking at resource usage; not single device
• Network Choice/WiFi Offloading – Many: Whiffler, IMP, BreadCrumbs, SALSA… – Complementary to Tango
• Serval, MPTCP, TCP-‐Migrate – Need policy to guide decisions on nets to use – Complementary to Tango
56
Related Work
• Tango is a network resource management framework based on programmaIc policy
• ProacIvely handle resource conflicts while including user and app prefs into decisions
• Demonstrated the value it adds for single apps as well as across apps
57
Conclusions
Thanks! Ques<ons?
58