• No results found

Energy Performance and Accounting in Mobile Operating Systems

N/A
N/A
Protected

Academic year: 2021

Share "Energy Performance and Accounting in Mobile Operating Systems"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Energy Performance and Accounting in

Mobile Operating Systems

James Snee and

Andrew Rice

Computer Laboratory

(2)

Too many features not enough energy...

(3)

Where is the energy spent?

?

(4)

What is the phone doing? Seconds (s) Po w e r (W a tt s) 4

(5)

Even the idle state of the device is unpredictable Patterns exist

High variance in power consumption

Po w e r (W a tt s) Seconds (s) 5

(6)

Changes in the OS can have profound effects

Andrew Rice, Simon Hay, Measuring mobile phone energy consumption for 802.11 wireless networking,

Pervasive and Mobile Computing, Volume 6, Issue 6, December 2010, Pages 593-606

Joules F re q u e n cy D e n si ty 6

(7)

Android 1.1 checks that no one is using the same IP address

Andrew Rice, Simon Hay, Measuring mobile phone energy consumption for 802.11 wireless networking,

Pervasive and Mobile Computing, Volume 6, Issue 6, December 2010, Pages 593-606

Time (seconds) Po w e r (W a tt s) 7

(8)

Android 2.1 doesn’t bother checking...

Andrew Rice, Simon Hay, Measuring mobile phone energy consumption for 802.11 wireless networking,

Pervasive and Mobile Computing, Volume 6, Issue 6, December 2010, Pages 593-606

Time (seconds) Po w e r (W a tt s) 8

(9)

Consumption difference found by monitoring the network

Some effects not visible outside the device

(10)

What’s going on inside the device?

We instrument Android’s Linux Kernel

Applications

Middleware / Services

Native interfaces

Linux Kernel

(11)

We are able to make use of existing profiling tools Perf SystemTap FTrace KProbes DTrace Linux Trace Toolkit OProfile Valgrind 11

(12)

Perf SystemTap FTrace KProbes DTrace Linux Trace Toolkit OProfile Valgrind

We are able to make use of existing profiling tools

(13)

We logged every system call made during idle test using FTrace Po w e r (W a tt s) Seconds (s) 13

(14)

FTrace places instrumentation in every system function

Adds a call to the ‘mcount’ routine in the

prelude of every function

(mcount: arch/arm/kernel/entry-common.s)

This routine stores tracing information into a small ring-buffer

Requires a ‘rooted’ device and a custom built kernel

(15)

Example FTrace (function tracer) trace output

[Process Name] [CPU] [Time since boot]: [function] <- [parent] sh-679 [000] 131.677753: __fsnotify_parent <-vfs_write sh-679 [000] 131.677764: fsnotify <-vfs_write sh-679 [000] 131.677765: __srcu_read_lock <-fsnotify sh-679 [000] 131.677767: __srcu_read_unlock <-fsnotify sh-679 [000] 131.677772: sys_dup2 <-ret_fast_syscall sh-679 [000] 131.677773: sys_dup3 <-sys_dup2 sh-679 [000] 131.677774: expand_files <-sys_dup3 sh-679 [000] 131.677775: filp_close <-sys_dup3 sh-679 [000] 131.677776: locks_remove_posix <-filp_close sh-679 [000] 131.677778: fput <-filp_close sh-679 [000] 131.677779: __fsnotify_parent <-fput sh-679 [000] 131.677780: fsnotify <-fput sh-679 [000] 131.677781: locks_remove_flock <-fput sh-679 [000] 131.677783: module_put <-fput sh-679 [000] 131.677784: put_pid <-fput sh-679 [000] 131.677785: file_sb_list_del <-fput sh-679 [000] 131.677787: files_lglock_local_unlock_cpu <-file_sb_list_del sh-679 [000] 131.677789: drop_file_write_access <-fput sh-679 [000] 131.677790: mnt_drop_write <-drop_file_write_access sh-679 [000] 131.677791: call_rcu <-fput 15

(16)

Annotated the first 1ms of the idle trace Po w e r (W a tt s) Seconds (s) 1ms 16

(17)

Too much noise in the data

Power sampled at 10kHz

(18)

Instrument individual functions with SystemTap

Applications

Middleware / Services

Native interfaces

Linux Kernel FTrace

ST ST

ST ST

(19)

SystemTap instruments the Kernel without the need to recompile

Report back the internal state of functions Safer interface to kprobes, no more panics

Tap Script Translate to C

Build Kernel Module

Insert and run

(20)

WiFi + TCP energy consumption appears to follow a trend 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 10 20 30 40 50 60 E ne rg y c on su m ed p er k il ob yt e ( J) Message size (kB)

Andrew Rice, Simon Hay, Measuring mobile phone energy consumption for 802.11 wireless networking,

Pervasive and Mobile Computing, Volume 6, Issue 6, December 2010, Pages 593-606

Message Size (kB) En e rg y co n su me d p e r ki lo b yt e (J) 20

(21)

We’re using SystemTap to investigate these outliers

Andrew Rice, Simon Hay, Measuring mobile phone energy consumption for 802.11 wireless networking,

Pervasive and Mobile Computing, Volume 6, Issue 6, December 2010, Pages 593-606

En e rg y co n su me d p e r ki lo b yt e (J) Message Size (kB)

What’s going on inside TCP?

(22)

We are using SystemTap to instrument the Linux TCP implementation probe kernel.function("*@net/ipv4/tcp.c").call{ printf("tcp %ul %s>%s \n",gettimeofday_s(),thread_indent(1) ,probefunc()) } 22

(23)

Moving instrumentation into the OS is giving us a better picture of what’s going on

(24)

Energy Performance and Accounting in Mobile Operating Systems James Snee and Andrew Rice Computer Laboratory

Portions of this page are reproduced from work created and shared by Google and

References

Related documents

Coach Wilson enters the 2015 season with six Bowie State University Bulldogs named among those selected 2014 Preseason D2 (CIAA) All-America Football Team.. Wilson’s

Generic style sheets exist to publish DocBook documents directly to HTML and to PDF; and the CGI Documentation Infrastructure extends the delivered style sheets to provide the

● YARN makes log available in HDFS for old jobs ● Logs of running jobs are available in the YARN UI. ● Spark should link to hadoop log UI from SPARK UI ● SPARK_LOG4J_CONF makes

This paper considers a global game model of a bank that is financed by a continuum of small depositors subject to (partial) deposit insurance, by a large uninsured lender, and by

Therefore a maximizing bank that faces a positive probability of a run, will increase the level of liquidity and liquidity insurance beyond the fi rst best solution increasing

Questions related to co-morbidities in HIV/AIDS (non-AIDS related cancers and systemic diseases) and chronic antiretroviral treatment toxicities (metabolic disorders) accounted

Panel D shows how these savings decisions aggregate into average consumption of high school dropouts, i.e., the 11 percent of households with the lowest innate ability.. In the

Lanit-Tercom provides a variety of services including the development of software/hardware systems, re-engineering of system software and electronic equipment, IT