CHAPTER 2. BACKGROUND
2.1 Spectrum of Energy Consumption Studies
Seven methods of the measurement and estimation approaches are introduced.
For distinction, hardware and software energy consumption are discussed separately.
The relationship between software and hardware energy consumption is analogous to the commerce in a market, as shown in Fig. 2. DUT and hardware components on it are analogous to a market and stores in the market separately. Processes running on the DUT are likened to persons spending in the market.
Total energy measurement
Hardware Software
Market revenue Personal spending
Power consumption Daily life expense
Component energy measurement
Subtractive method Counting resource utilization Hybrid estimation
Sampling CPU occupation Concurrent measurement
Total revenue statistic
Income of store Amount of spending
Count of spending rough
detailed detailed
Measurement approach Estimation approach
Fig. 2. Spectrum of energy consumption studies.
Hardware Energy Consumption
Based on the resolution of energy breakdown, the three methods, total energy measurement, subtractive method, and component energy measurement, are generalized.
Total energy measurement, which observes the energy consuming behaviors from the total energy consumption, is like examining the business status from the total
5
revenue of the market. On handheld computers, Assim [3] measured the total energy consumption in different system configurations, and showed that energy consumption of display, processor, and Wi-Fi module plays important roles in determining battery lifetime.
Subtractive method roughly identifies the component-wide energy consumption by comparing energy consumption differences in variant hardware status. Component energy measurement simultaneously probes on each hardware component to sample the energy consumed by the components and can be illustrated with setting up invoice machines to keep track of incomes for each store. On portable computers, Bai and Lin [5] presented the energy measurement method for hardware components with the small resisters. Mahesri and Vardhan [6] measured energy consumption of main hardware components on IBM laptop. Mahesri and Vardhan’s study concluded that the power consumed by CPU and display, again, dominates the power consumption of laptop; and the hardware components, i.e. disk drivers, consume large energy only in the working state.
Software Energy Consumption
According to the accuracy of energy attribution, the methods for examining software power consumption are classified into four methods, i.e. sampling CPU occupation, counting resource utilization, hybrid estimation, and concurrent measurement.
In practice, sampling CPU occupation samples total energy with an external power meter. In order to map the measured energy onto the processes running on the DUT, the meter also triggers the logs of a program counter (PC) and a process identifier (PID) for each energy record. In the analysis time, the energy record can be attributed to the exactly one process according to the PC and the PID. Because the energy-to-process mapping only depends on CPU occupation, the inaccurate energy
6
attribution is raised by concurrent energy consumption of hardware components. With this manner, PowerScope [7] is the most famous tool for discovering the energy-hungry code regions. Chang et al. [8] replaced the time-driven sampling approach of PowerScope with an energy-driven sampling approach to improve accuracy of energy attribution. ePRO [9] integrates energy and performance profiling into a convenient tool with well-defined user interface.
In order to trace software energy consumption on each hardware component, counting resource utilization method counts resource requests for each process. The counts of resource requests can be translated into energy consumption using the energy estimation model mentioned in the chapter 1. For daily life analogy, the method works like counting each kind of receipts for personal spending estimation. In [15], pTop estimates component-wide energy consumption for each process on laptop and provides programming interface for designing energy-aware applications.
ECOSystem [16] counts resource utilization and allocates energy budgets among competing tasks carefully to extend battery lifetime.
Hybrid estimation method is a derivation of counting resource utilization and sampling CPU occupation. In practice, some of the resource utilization can be counted easily, e.g. disk I/O, while the other resource utilization is hard to be counted on the DUT, e.g. memory access. The energy consumed by the countable resources is easy to be estimated, while the residual energy escaped from estimation shall be shared proportionally according to the CPU occupation. Using the hybrid estimation method, PowerSpy [14] roughly distinguishes the battery energy consumed by threads and some hardware components.
Concurrent measurement embeds energy sensors on hardware components to trace energy utilization simultaneously. For accurate energy attribution, it introduces a sophisticated manner for synchronizing the multisource energy samples and the
7
system events. For analogy, it is like keeping track of each spending for persons in the stores. The amount spending of a person can be calculated by summing up the price of his or her bills. Xian et al. [10] proposed an accurate energy attribution which raises the accuracy by up to 90% over sampling CPU occupation. Table 1 summarized the comparisons of tools for software energy profiling. This thesis focuses on calibrating the energy estimation tools of counting resource utilization method by handling the two hardware dependent drawbacks.
Table 1. Comparison of software energy profiling tools.
Method Tool Level Features Drawbacks
Sampling CPU