Machine Learning for Adaptive Power Management

Adaptive Power Management (APM) systems for laptops decide when to place a component into various powersaving states given the user activity. The long-term goal of an APM system is to maximize the battery life while minimizing the annoyance to the user. The state-of-the-art in commercial solutions is timeout policies. These policies switch components into their low power states based on thresholds of periods of inactivity. Unfortunately, such methods not only waste power during the periods of inactivity, but also needlessly annoy the user when they turn off components at inappropriate times. Research in APM, on the other hand, has focused more on modeling system dynamics and not on usage patterns. We propose a system that learns when to turn off components based on different user patterns. We describe the challenges of building such a system and progressively explore a range of solutions. We experiment with a direct approach that predicts when to turn off a component given usage features (e.g., historical keyboard and mouse activity, active application, history of network traffic, and history of CPU utilization). To improve performance of the direct approach we partition data based on the context and train the learning algorithms separately for each context. Context could be past idleness or any partitioning of the data that improves performance. We then propose a model-based approach that captures the temporal dynamic of system and user state, the cost of power and user annoyance, as well as the effect of power-saving actions on the user and system. Our direct approach is validated on a large data corpus collected from multiple real users where results show a considerable improvement over traditional timeout methods. INTRODUCTION Adaptive Power Management (APM) attempts to increase the perceived battery life of a laptop by turning off certain components when their services are not going to be needed. Of course, it is not known in advance which services will be needed and when. Moreover, the perceived impact of having certain services not available is much greater than the perceived impact of others. The goal of APM is to extend the battery life as much as possible with an acceptable perceived loss of performance. APM, as opposed to non-adaptive power management, attempts to make better decisions with time and to adapt to individual users. APM is an example of an autonomic system. The autonomics concept is derived from the human body’s autonomic nervous system that regulates individual organ function, and for the most part is not subject to voluntary control. An autonomic computing system controls the functioning of computer applications or systems without explicit user input. The goal of autonomic computing is to create systems that are self-managing, self-healing, and self-protecting. Autonomic computing promises to reduce expenditures associated with operations, maintenance, and support, and to significantly improve the end user’s experience. Autonomic systems ensure smooth and uninterrupted operation by monitoring the system state, diagnosing problems, identifying user context, and executing actions to fix the problems. For example, an APM system monitors the user and laptop state, diagnoses the user mood or context, and changes power states such that the user is not noticeably impacted. Autonomic systems need to naturally reason about uncertainty in both perception Intel Technology Journal, Volume 10, Issue 4, 2006 Machine Learning for Adaptive Power Management 300 and action. In an APM system, perception uncertainty arises from the fact that the user context cannot be directly observed from sensors, such as keyboard and mouse activity, or the currently active application. Actions that turn off components also generate uncertainty. They create uncertainty in terms of the time it takes to turn a component on and off and in terms of the effect it would have on the user’s context. For example, placing the machine on standby does not always take the same amount of time and sometimes the Operating System (OS) does not even allow it. If the user context is for example a measure of idleness, then going to standby, could either increase idleness if it succeeds or decrease it if it fails, hence the uncertainty. If the user context is a measure of the users’ mode of operation (e.g., working, browsing for fun) then going to standby could again change the context in an unpredictable manner. Modeling real-world phenomena as stochastic processes and sequential decision-making under uncertainty (see Figure 1) are widely used paradigms in artificial intelligence. The process of estimating these stochastic process models and the computation of optimal policies fall into the category of machine learning. Machine learning refers to the problem of constructing computer programs that automatically improve with experience. The simplest class of machine learning algorithms are classifiers, which are functions that learn (from examples) to map input patterns to output classes. For the APM domain, our algorithms learn to map laptop usage patterns (at the OS level) into power management actions as shown in Figure 2. In this paper, we first summarize past approaches to the APM problem and then describe a machine-learning approach that maps user patterns to power-saving sections. Our approach outperforms current commercial solutions such as timeout policies. We then propose a more general model-based approach that relies on building stochastic process models. We finally discuss the potential application of such models to other domains. Figure 1: A classic sequential decision-making task under uncertainty. The doctor performs treatments and diagnostic tests on the patient, which change in a stochastic manner the internal state of the patient. The doctor then observes symptoms. The optimal policy is one where in the long run the patient is made well. Figure 2: APM takes as input user and system activity and issues power management actions to the OS and to the hardware APM User-OS Interaction OS-HW Interaction Senses user activity and annoyance Senses hardware activity and power consumption Senses OS activity Actions for PM