
Fine-Grained Energy Profiling for Power-Aware Application Design Aman Kansal Feng Zhao Microsoft Research Microsoft Research One Microsoft Way, Redmond, WA One Microsoft Way, Redmond, WA [email protected] [email protected] ABSTRACT changing from double precision to single), or quality of service pro- Significant opportunities for power optimization exist at applica- vided [10]. Third, energy usage at the application layer may be tion design stage and are not yet fully exploited by system and ap- made dynamic [8]. For instance, an application hosted in a data plication designers. We describe the challenges developers face in center may decide to turn off certain low utility features if the en- optimizing software for energy efficiency by exploiting application- ergy budget is being exceeded, and an application on a mobile de- level knowledge. To address these challenges, we propose the de- vice may reduce its display quality [11] when battery is low. This velopment of automated tools that profile the energy usage of vari- is different from system layer techniques that may have to throttle ous resource components used by an application and guide the de- the throughput resulting in users being denied service. sign choices accordingly. We use a preliminary version of a tool While many application specific energy optimizations have been we have developed to demonstrate how automated energy profiling researched, there is a lack of generic tools that a developer may use helps a developer choose between alternative designs in the energy- at design time. Application specific optimizations require signif- performance trade-off space. icant development effort and are often only applicable to specific scenarios. We propose to address this problem by providing au- tomated tools for fine-grained application energy measurements at 1. INTRODUCTION design time. The aim is to provide the developer with much needed Energy optimization in software design is gaining importance visibility into an application’s energy usage. The measurements due to increases in the recurring energy utility bill as well as the will allow an application developer to easily compare and choose high cost of power provisioning and backup infrastructure, along among various design options that require only simple changes in with growing citizen concerns about the carbon footprint of com- the source code such as choosing among different library function puting [14, 5, 6]. There is a significant need and potential for en- calls, declaring variables using alternative data structures or preci- ergy optimization as large parts of the IT infrastructure operate at a sion, changing the storage access patterns, or others that are already low average utilization and the idle power consumption of a com- available as part of the development environment but are hard to puter is typically 50-60% of peak power. Energy optimization is select for the particular application under development. Detailed also important for mobile or wireless devices due to limited battery energy visibility also enables the selection of appropriate knobs for life. performance tuning which can then be used at run time to dynami- There are at least three levels at which energy optimizations cally change energy usage for varying workload and energy avail- are being made. The first is at the computer architecture level. ability. Techniques have been proposed to reduce processor energy usage The contributions of this paper are twofold. The work addresses through multi-core processors [15], designing energy proportional the research challenges in enabling generic application layer energy hardware [1], and increasing the number of performance and sleep optimization, and describes the tools that are needed for application states [22]. Benchmarking techniques to quantify the energy costs design-time energy profiling and performance scaling. We show of different computer architectures have been proposed [29]. A that many of the building blocks required to build such tools are second level of optimizations is at the system layer, either at a sin- already available and discuss the research issues to be addressed gle server or across multiple servers, through energy efficient use in order to integrate these components into reusable measurement of the underlying hardware. In our own work, we developed load capabilities. management techniques across servers to reduce the energy of one We conducted experiments using a preliminary version of the large-scale Internet service by 30% without a significant perfor- proposed measurement tools to demonstrate an example of power- mance hit [3]. Other techniques include multi-server power co- aware application design: choosing among two different library ordination [24], hard disk spin-down [21], synchronization aware routines for the same functionality. The design choice does not multithreading [23], and compiler driven optimizations [30, 26]. change the number of lines of code needed, but can impact the en- A third level of optimizations is at the application layer, which ergy usage. Both library routines already exist as part of an avail- is attractive for several reasons. First, this layer has the most infor- able development tool set and our objective is not to design a spe- mation on the actual user impact of performance and energy trade- cific alternate routine with optimized energy consumption. offs, enabling more aggressive performance sacrifice in unimpor- The goal of the paper is to propose the development of auto- tant areas compared to lower layer techniques. For instance, an mated fine-grained energy profiling tools as an important research application may throttle processor frequency to the minimum value area in addressing the significant potential for application layer en- required to satisfy user perceptible delay behavior [16]. Second, ergy optimization. These tools should be integrated with compilers application specific optimizations can be made at this layer such and integrated development environments to provide visibility into as changing the algorithm used [28], accuracy of computation (eg. the energy impact of application design choices. Such tools could The developer may have access to a power management technique lead to a significant reduction in the energy cost of the global IT to improve the energy usage of one resource but since it may affect infrastructures with a relatively small additional effort in design. the energy usage of other resources, accurate profiling is required to determine the overall energy usage changes. The developer may 2. APPLICATION ENERGY USAGE have new ideas to optimize energy by designing a new algorithm or data structure. The profiling tools will help understand the quan- Let us first consider the various components of energy consump- titative advantage of the new idea. The developer may also know tion for an application. Suppose the energy consumed by the com- which aspects of the application performance are flexible and the puting infrastructure for executing an application is EApp which profiling tools may be used to determine where the energy savings may depend on the performance required for the application, and are the maximum. also on the specific system resources used by the application. Before discussing the various challenges in building such fine Part of EApp is spent on running the application software and grained power measurement tools, we show an example to demon- underlying system software. Let EActive denote this part. Another strate how this proposed measurement capability enables applica- portion of the energy, denoted EW ait, is spent in wait states, when tion layer energy optimization at design time. a subsystem is powered up but the application is using another sub- Consider an application that processes a file containing several system. Ideally, unused subsystems should enter a low power sleep data items. There are two choices of the file read-write routines state. However, entering a sleep state and resuming from it has a available to the developer to access the secondary storage: one non-zero overhead, making it impractical to enter sleep states for that compresses the stored data and one that does not. Both al- ternatives are available in existing development tools, through the small periods of inactivity. Some subsystems may not have easy to FileStream() and GZipStream() classes, part of the .Net use low power sleep modes and the idling cost is paid even if the Framework’s System.IO and System.IO.Compression class libraries subsystem is not used at all by the application. The rest, denoted respectively, and the application developer wishes to determine the EIdle, is consumed by the computing equipment in idle state, when best choice. In this simple example, we assume we have available not doing any work for any application. However, this idle energy a data file representative of real data files that the application will may depend on the application mix hosted by a system since with a process after deployment. Partial source code used for the two al- ternatives is shown below: certain mix, the system may be able to enter sleep states while with another mix, the idle periods may be too small to enter sleep states. Alternative 1: Without Compression Another energy component of interest in operating a computing infrastructure is the energy spent on cooling the computer equip- f = new FileStream("/var/records.mds"); f.Open("rw"); ment. This is the energy spent on transferring out the energy EApp /* Workload: read/edit data items
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-