the 29th international technical conference on...

2
Schedule-aware DVFS Algorithm on Android Platforms for Energy Minimization Jae-Beom Lee, Myeongjin Kim, and Eui-Young Chung School of Electrical and Electronic Engineering Yonsei University, Seoul, Republic of Korea {jblee,kmjjang86}@dtl.yonsei.ac.kr, [email protected] Abstract—Saving energy of the portable devices including smartphones have become a critical design problem. Modern components of these devices are suffering from hunger of power. In this purpose, many researchers studied how to minimize the energy consumption. Dynamic voltage and frequency scaling (DVFS) is an effective energy saving technique for these portable devices. This paper proposes a simple but novel DVFS algorithm on Android based smartphones. We use the information from operating system scheduler and process history table which is made by our proposed method. Compared to previous work, our schedule-aware DVFS algorithm is superior in terms of energy saving. Experimental results show that 34% of power saving compared to performance governor. Additionally, when proposed method was used, there is negligible performance overhead. Keywordsdynamic voltage and frequency scaling (DVFS), android, operating system, energy-aware embedded system. I. I NTRODUCTION Mobile computing systems have got better with faster processors and better chips. Although the batter technology has been improved, the limited battery has always been the bottleneck of mobile life environment unfortunately. In addi- tion, constraints of mobile devices’ size and weight has limit the use of large battery packs as power sources. These systems require low power consumption to keep the operational time. One of the ways to achieve the above goal is Dynamic Voltage and Frequency Scaling (DVFS). DVFS is a technique that can be used to reduce the consumption of energy via the adjustment of operation frequency and voltage of devices. This strategy is already used in embedded systems because such systems do not usually require a high operational frequency during all the time. Frequency scaling reduces the number of instructions a processor can issue in a given amount of time, thus reducing performance. Many researchers have studied DVFS algorithm because of its efficiency [3][4]. In the Linux kernel under the Android operating system, the CPUfreq subsystem that the kernel infrastructure provides a modularized interface to manage the CPU frequencies. The policy manager for power management is called a governor in Linux, which controls the CPU frequency through the interface of CPUfreq. There are some governors since Linux kernel version 2.6.12 [2]. Previous governors select voltage/frequency set based on CPU utilization of on to previous time slice. Performance and Powersave governors locks max and min frequency, respec- tively. Ondemand [2] jumps to maximum frequency when CPU is busy and decreases the frequency gradually when CPU is Fig. 1: Overall architecture less loaded. Conservative, based on the ondemand governor, increases and decreases CPU speed more gradually. The remainder of this work is organized as follows: in Sec- tion II, we propose a novel schedule-aware DVFS algorithm for mobile system on Android platforms. We shows effectiveness of our work in Section III, followed by our conclusion in Section IV. II. PROPOSED GOVERNOR Fig. 1 shows the overall structure of our proposed method. First, a Profiler traces a CPU usage of each process and makes a process history table. Then, proposed Estimator in our governor brings schedule information from Android scheduler and estimate which process will be running in next time slice. Finally, v/f selector selects appropriate voltage/frequency set for next time slice. A. Runtime profiler To estimate CPU usage of next time slice, firstly, our method profiles the process information on the fly before v/f scaling. Android system basically provides the environment that capable of extracting the kernel status information and can control through sysfs (file system) interface. We make the Process history table (PHT) by saving the MA (moving average) value of CPU usage of each process of every time slices. The reason of saving MA is to calculate average CPU utilization because CPU usage of each processes is varying with time varies. In our experiments, window size of MA sets 30. Because CPU usage is also changed although same process when frequency is changed, profiler save CPU usage The 29th International Technical Conference on Circuit/Systems Computers and Communications (ITC-CSCC), Phuket, Thailand, July 1-4, 2014 287

Upload: dotuong

Post on 08-May-2018

215 views

Category:

Documents


2 download

TRANSCRIPT

Schedule-aware DVFS Algorithm on AndroidPlatforms for Energy Minimization

Jae-Beom Lee, Myeongjin Kim, and Eui-Young ChungSchool of Electrical and Electronic Engineering

Yonsei University, Seoul, Republic of Korea{jblee,kmjjang86}@dtl.yonsei.ac.kr, [email protected]

Abstract—Saving energy of the portable devices includingsmartphones have become a critical design problem. Moderncomponents of these devices are suffering from hunger of power.In this purpose, many researchers studied how to minimizethe energy consumption. Dynamic voltage and frequency scaling(DVFS) is an effective energy saving technique for these portabledevices. This paper proposes a simple but novel DVFS algorithmon Android based smartphones. We use the information fromoperating system scheduler and process history table which ismade by our proposed method. Compared to previous work, ourschedule-aware DVFS algorithm is superior in terms of energysaving. Experimental results show that 34% of power savingcompared to performance governor. Additionally, when proposedmethod was used, there is negligible performance overhead.

Keywords—dynamic voltage and frequency scaling (DVFS),android, operating system, energy-aware embedded system.

I. INTRODUCTION

Mobile computing systems have got better with fasterprocessors and better chips. Although the batter technologyhas been improved, the limited battery has always been thebottleneck of mobile life environment unfortunately. In addi-tion, constraints of mobile devices’ size and weight has limitthe use of large battery packs as power sources. These systemsrequire low power consumption to keep the operational time.

One of the ways to achieve the above goal is DynamicVoltage and Frequency Scaling (DVFS). DVFS is a techniquethat can be used to reduce the consumption of energy via theadjustment of operation frequency and voltage of devices. Thisstrategy is already used in embedded systems because suchsystems do not usually require a high operational frequencyduring all the time. Frequency scaling reduces the number ofinstructions a processor can issue in a given amount of time,thus reducing performance. Many researchers have studiedDVFS algorithm because of its efficiency [3][4].

In the Linux kernel under the Android operating system,the CPUfreq subsystem that the kernel infrastructure providesa modularized interface to manage the CPU frequencies. Thepolicy manager for power management is called a governor inLinux, which controls the CPU frequency through the interfaceof CPUfreq. There are some governors since Linux kernelversion 2.6.12 [2].

Previous governors select voltage/frequency set based onCPU utilization of on to previous time slice. Performance andPowersave governors locks max and min frequency, respec-tively. Ondemand [2] jumps to maximum frequency when CPUis busy and decreases the frequency gradually when CPU is

Fig. 1: Overall architecture

less loaded. Conservative, based on the ondemand governor,increases and decreases CPU speed more gradually.

The remainder of this work is organized as follows: in Sec-tion II, we propose a novel schedule-aware DVFS algorithm formobile system on Android platforms. We shows effectivenessof our work in Section III, followed by our conclusion inSection IV.

II. PROPOSED GOVERNOR

Fig. 1 shows the overall structure of our proposed method.First, a Profiler traces a CPU usage of each process andmakes a process history table. Then, proposed Estimator in ourgovernor brings schedule information from Android schedulerand estimate which process will be running in next time slice.Finally, v/f selector selects appropriate voltage/frequency setfor next time slice.

A. Runtime profiler

To estimate CPU usage of next time slice, firstly, ourmethod profiles the process information on the fly before v/fscaling. Android system basically provides the environmentthat capable of extracting the kernel status information andcan control through sysfs (file system) interface. We makethe Process history table (PHT) by saving the MA (movingaverage) value of CPU usage of each process of every timeslices. The reason of saving MA is to calculate average CPUutilization because CPU usage of each processes is varyingwith time varies. In our experiments, window size of MAsets 30. Because CPU usage is also changed although sameprocess when frequency is changed, profiler save CPU usage

The 29th International Technical Conference on Circuit/Systems Computers and Communications (ITC-CSCC), Phuket, Thailand, July 1-4, 2014

287

value which is translated when processor runs at maximumfrequency according to following equations.

CUsaved = CUcurrent ×freqmax

freqcurrent(1)

In this equation, CU is CPU usage of each process.

B. Scheduler-aware governor

It divided into two major parts – Estimator and v/f selector.

Because all processes that driving applications run basedon scheduled information in the Linux scheduler, if we knowthis information before processes run, we can estimate whichprocesses will be run and how much time they will run.

The Estimator checks the number of processes that willrun next time slice by reading ‘nr running’ variable in pro-cess structure. Also, it confirms how many time quantum isassigned each processes by checking priority of run queue inscheduler. If it knows the number of processes in next timeslice and time quantum of that processes, we have to knowthat processes use how much CPU resource. PHT describedin Section II-A is used for this purpose. Because PHT savedCPU usage of each process in every time slice on Eq. (1), itcalculates CPU usage of processes that will be run based onPHT. Then, the CPU utilization of all processes is obtainedby sum of the CPU utilization of each process brings on PHT.Estimator transfer this information to v/f selector.

The v/f selector determines minimum v/f sets based onestimated CPU usage. Currently, Processors supporting DVFSprovide only a finite number of discrete frequencies. Wechoose v/f level in order not to violate CUmax which is set to100.

III. IMPLEMENTATION AND EVALUATION

Linux also provides the Userspace governor to export theavailable frequency information to the user space and allowsthe user-level governor to control the CPU frequency throughthe Linux sysfs interface.

We have implemented the proposed energy minimizationDVFS mechanism as an Android service in the user space onthe Samsung Exinos 4412(Cortex A9)-based Galaxy S3 mobilephone. The operating system is Android version 4.1.2 (JellyBean) with Linux kernel version 3.0.31.

We conducted experiments to compare the performance ofour methodology with that of the existing governors describedearlier. Three applications are used for this experiments –sending e-mail, loading web page, and decoding picture. Acomparison of the results are shown in Fig. 2 and Fig. 3.

The key metric of governor algorithm is how much energycan be saved using governor. As shown in Fig. 2, all of theapplications are comparable to the powersave governor whichselects always minimum frequency. Our method only uses66% in terms of energy compared to performance governor.We compared the execution time for all of the applicationsin Fig. 3. Even though the proposed method shows superiorenergy saving in the other metric, it also shows comparable

Fig. 2: Comparison of execution time

Fig. 3: Comparison of energy consumption

performance to the performance governor which chooses al-ways maximum frequency. To summarize, our method out-performs the other governors. It achieves an energy efficiencycomparable to the performance governor.

IV. CONCLUSION

In this paper, we proposed a schedule-aware governor forestimating the CPU usage of next time slice. This techniquesaves process energy efficiently. We use the scheduling in-formation for accurate estimation. Our results indicate thatthe proposed governor can be a highly effective method forreducing the energy consumption in Android smartphones.

ACKNOWLEDGMENT

This work was supported by Samsung Electronics andby Basic Science Research Program through the NationalResearch Foundation of Korea (NRF) funded by the Ministryof Education (2013R1A1A2011208).

REFERENCES

[1] W.-Y. Lian, P.-T. Lai, and C. W. Chiou, “An Energy Conservation DVFSAlgorithm for the Android Operating System,” in Proc. on Journal ofConvergence, pp. 93-100, vol. 1, no. 1, 2010.

[2] P. Venkatesh and S. Alexey, “The Ondemand Governor,” in Proc. LinuxSymposium, pp. 223-238, vol. 2, 2006. https://developer.android.com

[3] S.-Y. Bang, K. Bang, S. Yoon and E.-Y. Chung, “Run-Time AdaptiveWorkload Estimation for Dynamic Voltage Scaling,” in IEEE Trans.Computer-Aided Design of Integrated Circuits and Systems, vol. 28, no.9, pp. 1334–1347, 2009.

[4] J.-B. Lee, M.-J. Kim, S. Yoon and E.-Y. Chung, “Application-SupportParticle Filter for Dynamic Voltage Scaling of Multimedia Applications,”in IEEE. Trans. on Computers, pp. 1256–1269, vol. 61, no. 9, 2012.

The 29th International Technical Conference on Circuit/Systems Computers and Communications (ITC-CSCC), Phuket, Thailand, July 1-4, 2014

288