Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Energy Consumption Framework for Distributed Java-Based Systems Chiyoung Seo Software Architecture Research Group University of Southern California.

Similar presentations


Presentation on theme: "An Energy Consumption Framework for Distributed Java-Based Systems Chiyoung Seo Software Architecture Research Group University of Southern California."— Presentation transcript:

1 An Energy Consumption Framework for Distributed Java-Based Systems Chiyoung Seo Software Architecture Research Group University of Southern California

2 Contents Motivation JVM Platform and Life Cycle Energy Consumption Model Computational Cost Communication Cost Design Time Energy Estimation Runtime Energy Estimation Conclusion

3 Motivation (1/2) Newly emerging computing platforms (PDAs, cellular phones, wearable computers) Limited battery resources Distributed mobile applications require much battery power in these platforms Energy-aware initial deployment of software components Dynamic adaptations of software components during runtime Framework for estimating the energy consumption of software components is necessary Both during system construction time and during runtime

4 Motivation (2/2) Host 1Host 2 Host 3 Host 4 Host 5 12 3 4 5 6 7 8 9 10 11 12 1314 1516 1718 19 20 2122 23 24 2526 27 28 29 30 PDA (Linux) Laptop (Window XP) PDA Cellular phone (Window CE) Cellular phone Encryption component 10 Joules/invocation 15 Joules/invocation

5 JVM Platform and Life Cycle Java Applications Java Class Libraries (Base, AWT, net, …) Java Virtual Machine Native Libraries Operating System Start JVM Initializing JVM Loading the main class Interpreter loop Exit Main thread GC thread

6 Energy Consumption Model Modeling a system’s energy consumption at the level of its software components Allows the dynamic adaptation of a entire software system at the component levels Energy consumption of a software component Computational energy cost Communication energy cost Computational energy cost CPU processing and memory accesses Communication energy cost Data exchange among software components over the network

7 Computational Energy Cost (1/4) Focusing on a component’s constituent interfaces H1H1 C1C1 … I1I1 I2I2 InIn C4C4 C2C2 C6C6 C3C3 C5C5 C7C7 H 2 H 3 H 4

8 Computational Energy Cost (2/4) Effect of invoking an interface Represented as the execution of 256 Java bytecode types as well as native methods (e.g., java.io.FileInputStream.read() ) In a multi-threaded environment, monitor enter/exit operations for synchronizing multiple threads are also executed Energy consumption for the j th invocation of a component c 1 ’s interface I 1

9 Computational Energy Cost (3/4) Garbage collection During the garbage collection, all threads except a GC thread within a JVM process stop temporarily Estimating its energy consumption (Joules) Monitor the total time t gc spent by a GC thread during an interface’s invocation Multiply t gc by the avg. power p gc (Joules/sec.) during the garbage collection Implicit OS routines are generally invocated while user applications are being executed Context switching (including timer interrupt and rescheduling), page faults, page reclaims Should be added into the computational energy cost

10 Computational Energy Cost (4/4)

11 Communication Energy Cost (1/3) H1H1 C1C1 … I1I1 I2I2 InIn C4C4 C2C2 C6C6 C3C3 C5C5 C7C7 H 2 H 3 H 4

12 Communication Energy Cost (2/3) Energy Consumption for remote communication Component c1’s interface I 1 kernel’s networking subsystem Wireless Interface Card Component c2 kernel’s networking subsystem Wireless Interface Card Wireless router Host 1 Host 2 User-to-kernel copy cost TCP/IP processing cost Kernel-to-WIC copy cost Radio Communication cost

13 Communication Energy Cost (3/3) Suppose during the j th invocation of an interface I 1 on Host 1 Host 1 transmits d t bytes of data to Host 2 Host 1 receives d r bytes of data from Host 2 If there are no communication failures, and the avg. transmission/ receipt BWs on Host 1 in interacting with Host 2 are b t and b r bytes/sec, respectively Energy consumption on Host 1 due to the transmission If the avg. bandwidth is reduced to b t /2 bytes/s, then Energy consumption on Host 1 due to the receipt Communication energy cost due to the j th invocation of I 1

14 Design Time Energy Estimation (1/3) Computational energy cost for a component For each target host, the following information should be available Energy consumption (Joules) of each bytecode and native method, a monitor operation, and implicit OS routines Average power (Joules/sec) during the garbage collection This is just an one-time effort Java Components PDA (iPAQ) Power Supply Digital Multimeter Data Collection Computer Experimental setup

15 Design Time Energy Estimation (2/3) Identifying three types of component interfaces An interface requiring almost the same amount of computation regardless its input parameters Count the number of bytecodes, native methods, monitor operations, and implicit OS routines only once for an arbitrary input At the same time, monitor the time spent by a GC thread An interface whose input size is proportional to the amount of computation required Use multiple regression technique An interface whose input parameters have no direct relationship to the amount of computation Generate a set of random inputs using the test input generation tools Count the number of bytecodes, native methods, monitor operations, and implicit OS routines executed for each input Monitor the time spent by a GC thread for each input

16 Multiple regression for the find interface of Shortest-Path component Estimated (  J) Actual (  J) 119767 122688 Point 1 261905 245395 Point 2 351300 364891 Point 3 224201 215760 Point 4 341570 316622 Point 5 677319 710709 Point 6 X2 (Num. of edges) Y (Energy, μJ) X1 (Num. of nodes) 1 2 3 4 5 6

17 12345678910 SHAMD5IDEAMedian Filter LZWSortDBShortes t path AVLLinked List Error rate=(calculated value – measured value) * 100 / measured value

18 Design Time Energy Estimation (3/3) Communication energy cost for a component For each target host, m t, m r, c t, and c r values should be available for arbitrary BWs b t and b r bytes/sec. If available BWs are reduced to b t /2 and b r /2 bytes/sec,

19 Transmission energy estimation on an iPAQ with 240 KB/sec BW and no communication errors

20 Runtime Energy Estimation DB Client iPAQ (host A) Power Supply Digital multimeter Data Collection Computer Wireless router IBM X22 laptop (host B) Desktop server (host C) FTP Client IDEA LZW DB Server IDEA FTP Server IDEA LZW

21 Conclusion Suggested the framework for estimating the energy consumption of Java-based systems Modeling the system energy consumption at the component’s level Framework is applicable both during system construction time and during runtime Showed very good precision on the whole (within 5% of actual energy consumption) Plan to emulate various communication failures using emulation tools (e.g., Dummynet)


Download ppt "An Energy Consumption Framework for Distributed Java-Based Systems Chiyoung Seo Software Architecture Research Group University of Southern California."

Similar presentations


Ads by Google