1 / 21

An Energy Consumption Framework for Distributed Java-Based Systems

An Energy Consumption Framework for Distributed Java-Based Systems. Chiyoung Seo Software Architecture Research Group University of Southern California. Contents. Motivation JVM Platform and Life Cycle Energy Consumption Model Computational Cost Communication Cost

Download Presentation

An Energy Consumption Framework for Distributed Java-Based Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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) 1 2 8 9 3 10 PDA (Linux) 4 11 5 12 Laptop (Window XP) 6 7 13 14 10 Joules/invocation Host 1 Host 2 15 16 21 22 26 27 23 17 18 24 28 29 20 26 25 Encryptioncomponent 19 30 Host 5 Host 3 Host 4 Cellular phone(Window CE) PDA Cellular phone 15 Joules/invocation

  5. JVM Platform and Life Cycle Start JVM Java Applications InitializingJVM Java Class Libraries(Base, AWT, net, …) Loadingthe main class Java Virtual Machine Native Libraries Main thread Interpreterloop GC thread Operating System Exit

  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. C2 C3 H2 I1 C1 I2 C6 … In C7 H3 H1 C4 C5 H4 Computational Energy Cost (1/4) • Focusing on a component’s constituent interfaces

  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 jth invocation of a component c1’s interface I1

  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 tgc spent by a GC thread during an interface’s invocation • Multiply tgc by the avg. power pgc (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. C2 C3 H2 I1 C1 I2 C6 … In C7 H3 H1 C4 C5 H4 Communication Energy Cost (1/3)

  12. Communication Energy Cost (2/3) • Energy Consumption for remote communication Host 1 Host 2 Component c1’s interface I1 Component c2 User-to-kernel copy cost kernel’s networking subsystem kernel’s networking subsystem TCP/IP processingcost Kernel-to-WICcopy cost Wireless InterfaceCard Wireless InterfaceCard Wirelessrouter Radio Communicationcost

  13. Communication Energy Cost (3/3) • Suppose during the jth invocation of an interface I1 on Host 1 • Host 1 transmits dtbytes of data to Host 2 • Host 1 receives dr 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 btand br bytes/sec, respectively • Energy consumption on Host 1 due to the transmission • If the avg. bandwidth is reduced to bt /2 bytes/s, then • Energy consumption on Host 1 due to the receipt • Communication energy cost due to the jth invocation of I1

  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 Power Supply DigitalMultimeter PDA (iPAQ) Data CollectionComputer JavaComponents 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. 6 Y (Energy, μJ) 5 Y (Energy, μJ) 4 3 2 1 X1 (Num. of nodes) X2 (Num. of edges) Point 1 Point 2 Point 3 Point 4 Point 5 Point 6 Actual (J) 122688 245395 364891 215760 316622 710709 Estimated (J) 119767 261905 351300 224201 341570 677319 Multiple regression for the findinterface of Shortest-Path component

  17. 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, mt, mr, ct,andcr values should be available for arbitrary BWs btand br bytes/sec. • If available BWs are reduced to bt /2 and br /2 bytes/sec,

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

  20. IBM X22 laptop(host B) Power Supply IDEA DBServer iPAQ (host A) IDEA DBClient Wirelessrouter Desktop server(host C) LZW FTPClient IDEA FTPServer LZW Data CollectionComputer Digital multimeter Runtime Energy Estimation

  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)

More Related