Interaction-aware energy management for wireless network cards

12
Interaction-Aware Energy Management for Wireless Network Cards Igor Crk, Mingsong Bi, Chris Gniady Department of Computer Science, University of Arizona Tucson, AZ 85704 [email protected], [email protected], [email protected] Abstract Wireless Network Interface Cards (WNICs) are part of every portable device, where efficient energy management plays a significant role in extending the device’s battery life. The goal of efficient energy management is to match the perfor- mance of the WNIC to the network activity shaped by a running application. In the case of interactive applications on mobile systems, network I/O is largely driven by user interactions. Current solutions either require application modifications or lack a sufficient context of execution that is crucial in making accurate and timely predictions. This pa- per proposes a range of user-interaction-aware mechanisms that utilize a novel approach of monitoring a user’s interac- tion with applications through the capture and classification of mouse events. This approach yields considerable improve- ments in energy savings and delay reductions of the WNIC, while significantly improving the accuracy, timeliness, and computational overhead of predictions when compared to existing state-of-the-art solutions. Categories and Subject Descriptors D.4.4 [Operating Systems]: Communications Management— Input/Output; Network Communication General Terms Design, Experimentation, Measurement, Performance 1. INTRODUCTION Mobile devices have become an everyday part of our life. We depend on them for our computation, communication, and entertainment. An ever-increasing demand for perfor- mance, functionality, and better user interfaces has resulted in the demand for longer battery life. However, as advances in battery technology continue to lag behind the demands placed upon the battery, power awareness has become an important consideration in the design of mobile systems. The challenge of designing energy efficient systems lies in Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. SIGMETRICS’08, June 2–6, 2008, Annapolis, Maryland, USA. Copyright 2008 ACM 978-1-60558-005-0/08/06 ...$5.00. understanding the role of user interaction in energy con- sumption and in providing an energy-performance schedule that adequately accommodates user demand. Furthermore, by understanding user interaction we can optimize system performance by tailoring it to a user’s patterns of interac- tion. Performance and energy consumption are tightly coupled where higher performance is usually achieved at the cost of increased power demand. However, the key observation is that higher power demand does not necessarily translate into an increase in energy consumption. For instance, hardware in a higher performance state may complete a particular task faster than the same hardware operating in a lower perfor- mance state. This reduces the time during which the entire system has to be on. On the other hand, a particular device may not be required by all tasks and so may be operated in a low performance state without a significant impact on the performance of the executing application. The challenge in designing efficient energy management mechanisms is to provide a energy/performance schedule that best matches the task at hand to transparently provide energy savings while satisfying the performance demand. Many energy management techniques have been proposed ranging from hardware optimizations all of the way to appli- cation transformation. However, most user interactions are still hidden from the existing approaches, which are unable to capture the context necessary for inferring what a user demands. Monitoring user interaction provides not only the necessary context of execution that was previously unavail- able to the predictors, but also enables timely predictions before the need for high performance arrives [2]. The timely transition of a device to a desired performance/energy level is critical to meet performance demand and achieve energy efficiency. In this paper, we show that the user interactions can be easily monitored and exploited to increase both the timeli- ness and accuracy of prediction mechanisms. More specif- ically, we apply user-interaction-based prediction to reduce energy consumption in Wireless Network Interface Cards (WNICs) while maintaining good performance levels. Sub- sequently, we propose and evaluate a range of prediction mechanisms that balance accuracy, energy consumption, and delay to provide energy efficient management of the WNIC. Each mechanism incorporates high-level contextual informa- tion about user’s activity to predict network access patterns and provide desired energy/performance levels. The idea is motivated by observing that network traffic (for interac- tive applications) usually follows a specific interaction with 371

Transcript of Interaction-aware energy management for wireless network cards

Interaction-Aware Energy Management for WirelessNetwork Cards

Igor Crk, Mingsong Bi, Chris GniadyDepartment of Computer Science, University of Arizona

Tucson, AZ [email protected], [email protected], [email protected]

AbstractWireless Network Interface Cards (WNICs) are part of everyportable device, where efficient energy management plays asignificant role in extending the device’s battery life. Thegoal of efficient energy management is to match the perfor-mance of the WNIC to the network activity shaped by arunning application. In the case of interactive applicationson mobile systems, network I/O is largely driven by userinteractions. Current solutions either require applicationmodifications or lack a sufficient context of execution that iscrucial in making accurate and timely predictions. This pa-per proposes a range of user-interaction-aware mechanismsthat utilize a novel approach of monitoring a user’s interac-tion with applications through the capture and classificationof mouse events. This approach yields considerable improve-ments in energy savings and delay reductions of the WNIC,while significantly improving the accuracy, timeliness, andcomputational overhead of predictions when compared toexisting state-of-the-art solutions.

Categories and Subject DescriptorsD.4.4 [Operating Systems]: Communications Management—Input/Output; Network Communication

General TermsDesign, Experimentation, Measurement, Performance

1. INTRODUCTIONMobile devices have become an everyday part of our life.

We depend on them for our computation, communication,and entertainment. An ever-increasing demand for perfor-mance, functionality, and better user interfaces has resultedin the demand for longer battery life. However, as advancesin battery technology continue to lag behind the demandsplaced upon the battery, power awareness has become animportant consideration in the design of mobile systems.The challenge of designing energy efficient systems lies in

Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.SIGMETRICS’08, June 2–6, 2008, Annapolis, Maryland, USA.Copyright 2008 ACM 978-1-60558-005-0/08/06 ...$5.00.

understanding the role of user interaction in energy con-sumption and in providing an energy-performance schedulethat adequately accommodates user demand. Furthermore,by understanding user interaction we can optimize systemperformance by tailoring it to a user’s patterns of interac-tion.

Performance and energy consumption are tightly coupledwhere higher performance is usually achieved at the cost ofincreased power demand. However, the key observation isthat higher power demand does not necessarily translate intoan increase in energy consumption. For instance, hardwarein a higher performance state may complete a particular taskfaster than the same hardware operating in a lower perfor-mance state. This reduces the time during which the entiresystem has to be on. On the other hand, a particular devicemay not be required by all tasks and so may be operated ina low performance state without a significant impact on theperformance of the executing application.

The challenge in designing efficient energy managementmechanisms is to provide a energy/performance schedulethat best matches the task at hand to transparently provideenergy savings while satisfying the performance demand.Many energy management techniques have been proposedranging from hardware optimizations all of the way to appli-cation transformation. However, most user interactions arestill hidden from the existing approaches, which are unableto capture the context necessary for inferring what a userdemands. Monitoring user interaction provides not only thenecessary context of execution that was previously unavail-able to the predictors, but also enables timely predictionsbefore the need for high performance arrives [2]. The timelytransition of a device to a desired performance/energy levelis critical to meet performance demand and achieve energyefficiency.

In this paper, we show that the user interactions can beeasily monitored and exploited to increase both the timeli-ness and accuracy of prediction mechanisms. More specif-ically, we apply user-interaction-based prediction to reduceenergy consumption in Wireless Network Interface Cards(WNICs) while maintaining good performance levels. Sub-sequently, we propose and evaluate a range of predictionmechanisms that balance accuracy, energy consumption, anddelay to provide energy efficient management of the WNIC.Each mechanism incorporates high-level contextual informa-tion about user’s activity to predict network access patternsand provide desired energy/performance levels. The ideais motivated by observing that network traffic (for interac-tive applications) usually follows a specific interaction with

371

State Power (W)PSM Idle .05PSM Receive .85PSM Transmit 1.05CAM Idle .73CAM Recive .91CAM Transmit 1.16PSM to CAM Switch .78CAM to PSM Switch .67Transition Time (s)PSM to CAM .28CAM to PSM .28

Table 1: WNIC energy consumption specifications.

the application interface. For instance, if the user is chat-ting with a friend in a webcam-enabled instant messagingapplication, when the webcam button is clicked it is rea-sonable to expect additional network traffic. Therefore, theproposed interaction-aware prediction mechanisms monitoruser interactions with the application interface and corre-late such interactions with resulting network activity to pre-dict future levels of I/O demand. As a result, this papermakes the following set of contributions: (1) proposes a setof low-overhead user-interaction-based predictors, (2) pro-poses an implementation of transparent monitoring of userand network activity, (3) performs comprehensive evalua-tions of several proposed prediction mechanisms, (4) showssignificant improvement of WNIC energy efficiency, (5) inte-grates multiple prediction mechanisms to mitigate variabil-ity in user interactions.

2. MOTIVATIONThe challenge in designing an energy efficient system is

to minimize energy consumption without sacrificing per-formance. Therefore an ideal solution would provide theperformance level that closely matches the bandwidth de-manded by the application. The IEEE 802.11 standard [12]offers two energy management schedules: Continuous AwareMode (CAM) and Power Saving Mode (PSM). The defaultoperational mode for wireless network interfaces in portablecomputers is CAM, where the WNIC is continuously ac-tive and responds to a user’s requests immediately. CAMprovides highest performance both in terms of lowest de-lay and highest effective bandwidth at a cost of high energyconsumption. Alternatively, PSM periodically wakes up thenetwork interface, switching it to a high power state at sometime interval during which transmissions can occur, this isknown as beaconing. Once transmissions complete, the net-work interface goes back to sleep. This significantly reducespower consumption [13], but also increases delays and de-grades the performance of applications that demand highbandwidth [4]. The delays in network transmissions due toPSM keep the rest of the system operating for longer peri-ods, resulting in higher overall energy consumption in thesystem presenting a clear need for an adaptive system.

Table 1 illustrates the energy characteristics of the LucentOrinoco WaveLan Silver WNIC used in our study. We ob-serve that PSM has much lower energy consumption thanCAM in the idle state. Therefore, when the applicationdoes not transmit or receive any I/O or the bandwidth de-mand is low the WNIC should remain in the PSM mode.

User Interactions

Low power/performance

High power/performance

STPM Time

TransitionDelay

DecisionDelay

High power/performance

Interaction Aware

TransitionDelay

Monitoring

Time

Low power/performance

TimeDevice in a proper statePrediction

I/O requests

Prediction

Figure 1: Prediction timeliness example.

Systems with applications showing high bandwidth demandshould keep the WNIC in CAM, since transmission powerof CAM and PSM are comparable and CAM offers muchhigher bandwidth. Furthermore, the delays associated withPSM can extend the running time of the application andresult in higher energy consumption than CAM. However,selecting the WNIC mode is not simple, since an applicationmay go through multiple states with varying bandwidth de-mand. Keeping the WNIC in a single state either wastesenergy, as is the case with CAM, or increases transmissiondelays and potentially increases energy consumption, as inthe case of PSM.

To accommodate different application behaviors, manycards provide automatic switching between CAM and PSM,based on the amount of traffic observed. Our WaveLan cardallows the network interface to remain in the PSM whilemonitoring for traffic from the access point. If more thanone packet is waiting at the network interface, the WNICis switched to CAM. The WNIC is switched to PSM oncethe transmission stops. This simple solution provides energysavings for low transmission rates while providing good per-formance for applications demanding high bandwidth. How-ever, certain cases render this solution ineffective. First,communication patterns that exchange one packet at a timewill keep the WNIC in PSM even if the applications re-quire high bandwidth [4]. The pathological case for PSMoccurs with NFS directory listings, which can result in a 16-32x slowdown as compared to CAM [4]. Second, small andbursty transmissions may unnecessarily switch the WNICinto CAM. Therefore, more sophisticated mechanisms areneeded to better adapt WNIC power mode switching to re-flect an application’s performance demand.

To match application demand while saving energy, thenetwork card should be transitioned into CAM when highbandwidth is demanded and remain in PSM when the band-width demand is low. This observation motivated the devel-opment of Self-Tuning Power Management (STPM) [4, 3] todynamically switch between CAM and PSM. STPM relieson programmers for inserting accurate hints about upcomingbandwidth demand into the application. As a result, STPMcan be very accurate, as the programmer knows what partof the applications is executing and perhaps what kind ofdemand can be expected from the user. However, this in-troduces power management as another optimization dimen-sion to already difficult programming requirements that tar-get, among other things, performance, reliability, and usabil-ity. To provide energy savings for unmodified applications,

372

STPM profiles network traffic to anticipate future networkactivity [4]. Passively monitoring low-level network accessprovides little information about user’s current context, howthe user is interacting with the application. In this case, thecontext of execution of an application is completely lost andheuristic profiling is not able to fully realize the potential ofSTPM.

Context of execution is critical to providing accurate andtimely switching between power states to match the appli-cation demand. Figure 1 shows an example of user interac-tions with an application and the impact of STPM and userInteraction-Aware Prediction (IAP) mechanisms on transi-tion timeliness. As a result of user interactions the appli-cation initiates network I/O activity. STPM evaluates ini-tial I/O requests to verify the need for higher bandwidthand the network interface is switched to the high perfor-mance mode when the need for high bandwidth is detected.We observe that both the evaluation period and the modetransition period impact the performance of high bandwidthtransfers and may lengthen the time spent serving the I/Orequests [4].

We observe that we need hints ahead of time, in orderto transition a device to a higher energy state before I/Orequests arrive. These hints are difficult to obtain at theoperating system level, so the need for a higher context ofexecution is clear. Since users are responsible for the ma-jority of I/O activity in interactive applications, the naturalapproach is to observe user interactions and infer from in-teractions when the increase in performance demand will ar-rive. Therefore, in this paper, we propose several IAP mech-anisms and explore in detail the monitoring and predictionof user activity in order to improve prediction timeliness andaccuracy due to the added context of execution. The IAPmechanisms continuously monitor user activity and predictthe need to transition the device to a higher power level intime to meet the increased performance demand, as shownin Figure 1.

3. INTERACTION-AWARE PREDICTIONThe key assumption here is that there exists a strong cor-

relation between user interaction with the application andresulting network activity. Further, this correlation can betransparently exploited to manage the power states of wire-less interfaces. Subsequently, we face several requirements:

• User interactions have to be captured transparentlywithout modification to the application.

• User interaction correlation and classifications shouldbe performed online without any user involvement.

• Capture and prediction have to be efficient to preventexcessive energy consumed by the CPU to train andgenerate predictions.

• The system has to be able to handle multiple applica-tions in a graphically rich environment.

3.1 The Naïve PredictorThe observation that within interactive applications, net-

work activity is largely caused by the user’s interactionsleads us to a proposal of a simple mechanisms that switchesthe WNIC to CAM for every mouse click. This approachwas previously explored for managing the power states of aprocessor [16]. The intuition that motivates the naıve mech-anism is that if the user invoked some I/O that followed a

mouse click it is probably important and should be servedwith least amount of the delay. On the other hand, networkactivity that is not correlated with, or immediately precededby, mouse clicks is probably less important and can incursome delays without degrading the applications interactiveperformance. Therefore, our naıve all-click (AC) switchingmechanism transitions the WNIC to CAM upon each clickand transmits all network I/O that follows the last mouseclick within some time interval in CAM, thereby minimizingdelays by already being in the high-power mode before I/Oarrives and serving data with higher throughput than wasmeasured for PSM. Network I/O that is not preceded bymouse activity is served in PSM, saving energy. Once thenetwork I/O is served, the WNIC is transitioned to PSM toconserve energy during idle periods.

Clearly, this mechanism has the effect of capturing andserving all I/O activity periods preceded by clicks in CAM,with the downside of transitioning the WNIC unnecessarilyfor clicks that are not followed by network I/O. It is im-portant to note that the total number of clicks may greatlyexceed the total number of I/O activity periods, since mostof the clicks do not invoke network I/O. In addition, even ifthere is network activity following a click, it may be smalland best served in PSM without the overheads of transi-tion to CAM. The energy consumed in CAM following eachswitch, the energy required to make each switch, and the en-ergy consumed during unnecessary switches make AC one ofthe least energy efficient mechanisms. The AC mechanismillustrates the need for more intelligent prediction schemesthat decide when the WNIC should stay in PSM or transi-tion to CAM for the upcoming I/O activity period.

3.2 Capturing GUI interactionsTo address the shortcomings of the naıve predictor, which

does not distinguish between different types of potential in-teractions with the application, we propose a more sophisti-cated Interaction-Aware Predictor (IAP) approach that uti-lizes a detailed context of user interactions to accuratelypredict WNIC transmission modes. Accurate and detailedmonitoring of user activity forms the basis for IAP’s design.Virtually all interactions with common interactive applica-tions in a GUI environment can be accomplished throughmouse clicks [6]. While the capture of mouse click data, suchas absolute screen coordinates of the event or type of click, isrelatively trivial, capturing application-specific context us-ing mouse clicks is more problematic. In order to uniquelyidentify the components of application GUIs that the user isinteracting with, we developed a monitoring layer betweenthe X Window Server and applications in Linux that uti-lizes the GUI window structure to uniquely identify interac-tive components such as buttons and menu selections withan integer ID. Figure 2 shows the monitoring layer and thekernel structure used to record interaction IDs. This layerprovides us with transparent user interaction monitoring,meaning that no modification of applications is necessary.Furthermore, all interaction IDs are obtained while the useris interacting with the applications, allowing for detection,correlation, and prediction to be performed without any of-fline processing. High prediction accuracy is achieved by useof the hierarchical trees of visible and non-visible windowsthat fully describe an application’s GUI. The structure ofthe window tree is the same across executions and is usedto uniquely identify a particular event.

373

ProcTable

Mouse Display

X Server

X Monitor

App 1 App 2

WNIC

IAP Daemon

Kernel

Process TablePID 1

Clicks Bytes IdlePID 2

Clicks Bytes Idle

Figure 2: Design architecture.

3.3 Advanced PredictionAccurate and detailed description of the user interactions

allows the IAP to distinguish between different types ofuser interactions with an application that generate variousamounts of network I/O. The central part of the IAP is aprediction table that is organized as a hash table indexedby the unique click IDs. The prediction table stores a 2-bitcounter that indicates the most appropriate WNIC modefor a given click ID. The table resides globally in the IAPdaemon and is shared among processes to allow table reuseacross multiple executions of the same application as wellas concurrent executions of the same application. The tablecan be easily retained in the kernel across multiple execu-tions of the application due to its small size [9, 8], and willreduce training in future invocations of an application.

A prediction table lookup is performed for every click, asshown in the Figure 3. The lookup results in three possibleoutcomes: (1) the entry is found and the 2-bit saturatingcounter indicates that the interaction leads to high levelsof network activity (best served in CAM), (2) the entry isfound and the 2-bit saturating counter indicates that theinteraction leads to low or no network activity (best servedby PSM), or (3) the entry is not found, in which case aplaceholder in the prediction table is created. Based on thelookup outcome the IAP daemon switches the network inter-face to the appropriate state. The IAP daemon continues tomonitor the network activity recording the number of bytestransferred and the time of the I/O activity for each pro-cess as shown in Figure 2. Arrival of a new click during themonitoring indicates that there is a new interaction with theapplication and the prediction table entry for the previousclick has to be updated. Detection of a longer idle periodindicates that the network activity initiated by the currentclick ceased, the WNIC can be transitioned from CAM toPSM and the prediction table entry for the given click canbe updated.

To update the 2-bit counter in the prediction table we relyon the information about the given activity collected by theIAP daemon and recorded in the process table as shownin Figure 2. The IAP daemon calculates the relative timeand energy cost of transmitting the observed network I/O inPSM and CAM relying on equations proposed in [3]. Theenergy cost of each mode includes: (1) the WNIC energy totransmit the data in a given mode, (2) energy consumed inthe idle state waiting for the end of the activity signaled bythe arrival of the click or detection of a longer idle period,and (3) the energy consumption of the overall system, since

No

Wait for Click

Add to Table

Yes

No

I/O

Yes

No

Idle Yes

Get Prediction WNIC to CAM

WNIC in PSM

WNIC in PSM

Monitor Activity

Update Table

Event

Switch?

In CAM?

Found inTable?

Click

Figure 3: IAP decision flowchart.

it has to remain on when the request is served. The time costof serving the observed activity in CAM includes the trans-fer time and the time to transition the WNIC from PSM toCAM. The time cost of serving the observed activity in PSMincludes the transfer and the initial latency of receiving data,which is on average one-half of the beacon frequency. Trans-fer time in PSM is higher than in CAM because throughputis lower in PSM mode. Ignoring the switching latency, arequest served in CAM will always complete earlier than ifit were served in PSM.

The relative costs of time and energy for every predictedI/O period can be weighted for emphasis on either timelytransitions or energy-efficient completion of the requests. Inour design, we consider a balanced approach of minimiz-ing delays and energy for completing each activity periodto minimize the energy-delay2 product. The mode with thelowest energy-delay2 product is selected as the best choicefor completing the request and the 2-bit counter in the cor-responding prediction table entry is updated. We selectedthe energy-delay2 to slightly emphasize the delay reductionin interactive applications.

Finally, we observe that we need energy profiles of boththe WNIC and the system. In our case, we obtained therespective profiles prior to our implementation, but we en-vision that eventually, since energy management continuesto increase in importance, the devices themselves will pro-vide energy profiles. In addition, we focused on the PSMto CAM transitions above, leaving the CAM to PSM tran-sition to a simple timeout, making it much easier to directlycompare all the proposed mechanisms with traditional andstate-of-the-art approaches.

3.4 Mode Switching HeuristicsThere are two decisions that IAP has to make upon re-

trieving the prediction from the table. First, what to dowhen there is no prediction for a given click. This occursduring training and becomes less important as time passessince there is only a limited number of ways the user caninteract with the application. The second decision is whenthe prediction should be acted upon. IAP can immediatelyswitch to CAM, if predicted to do so, or delay the switchtill the network I/O arrives. Both of those questions tradeaggressiveness of prediction with higher reduction in delay

374

Predictionpolicy

Switchesaheadof I/O

Energysav-ings

Delayreduc-tion

AC Switches toCAM for eachclick

Yes X XXXXX

IAPD Serves all I/Oin CAM un-less predictedto serve inPSM

Yes XX XXXX

IAPE Serves all I/Oin PSM unlesspredicted toserve in CAM

Yes XXX XXX

IAPDW Same as IAPD No XXXX XXIAPEW Same as IAPE No XXXXX XIAPED Same as IAPE Dynamic XXXXX XX

Table 2: Summary of policies and qualitative com-parison of efficiency.

for higher accuracy with the potential for higher energy sav-ings. As a result, we evaluate several variations of the IAPapproach: IAP with Delay optimization (IAPD), IAPD withdeferred switching/Waiting to switch (IAPDW), IAP withEnergy optimization (IAPE), IAPE with deferred switch-ing/Waiting to switch (IAPEW), and IAP optimizing theEnergy-Delay2 product (IAPED). The basic mechanisms forcontext capture and prediction are shared across all heuris-tics, but the actions taken upon prediction vary significantlyfrom one to the next. An overview of each mechanism is con-tained in Table 2. Table 2 is a brief summary of switchingpolicies, stating when the switch occurs, and the relativebenefit for energy and delay reduction. Checkmarks in en-ergy and delay savings columns compare the relative impacton energy and delay for each of the proposed mechanisms.

3.4.1 IAPD & IAPDW: Minimizing DelaysThe goal of IAPD and IAPDW mechanisms is the reduc-

tion of transmission delays by serving network I/O in CAMby default and in PSM only when the prediction dictates todo so. IAPD and IAPDW switch the WNIC to CAM for: (1)mouse click IDs that have not been seen before, (2) mouseclicks for which IAPD is still training, (3) mouse clicks thatresult in CAM prediction, and (4) any activity not precededby mouse clicks. The main difference between IAPD andIAPDW is that with IAPD transitions from PSM to CAMoccur immediately upon prediction from a given mouse click,while IAPDW defers the same transition until network ac-tivity arrives following the click. IAPD therefore has theadditional benefit of reducing switching delays. The WNICremains in PSM during idle periods and will remain in PSMafter a click when these mechanisms predict that the I/Oactivity following the click is small and best served in PSM.

In the case of IAPD, delays are reduced at the cost ofhigher energy consumption, since IAPD switches for all clickswhere prediction is uncertain. Both mechanisms incur ad-ditional energy consumption due to switching for unpre-dictable periods, which may be efficiently served in PSM.Figure 4 illustrates the switching differences for IAPD andIAPDW. In the example, IAPD switches the WNIC to CAMwhen click with ID 1 is seen the first time, but remains in

AC

IAPD

User Interactions I/O requests

Time

Transitions CAM

Time

Time

IAPE

IAPEW

IAPDW

Time

Time

Time

ID1 ID1 ID2 ID2

Figure 4: Training and prediction example.

PSM when ID 1 is subsequently seen again, since it wasnot previously followed by network I/O. When click withID 2 arrives, the mechanism transitions the WNIC to CAMcorrectly, subsequently using the prediction to again transi-tion the WNIC to CAM correctly when ID 2 is seen again.IAPDW waits for the network I/O to arrive and does notswitch for clicks with ID 1 since they are not followed bythe I/O but switches for the network activity following theclick with ID 2. Furthermore, Figure 4 shows that IAPDWslightly delays the network transmissions due to switchingdelay.

3.4.2 IAPE & IAPEW: Maximizing Energy SavingsIAPE and IAPEW mechanisms differ from IAPD and

IAPDW in how the predictions are utilized in transition-ing the WNIC power modes. Specifically, where IAPD andIAPDW favor CAM for unpredicted or uncertain networkI/O, IAPE and IAPEW default to PSM unless the predic-tion is that the upcoming network I/O is best served inCAM. Therefore, IAPE and IAPEW eliminate unnecessarytransitions to CAM during unpredictable periods of low net-work I/O traffic that can be served efficiently in PSM. Theresulting behavior maximizes energy savings at the cost ofhigher delays. As in IAPD, IAPE transitions the WNICfrom PSM to CAM immediately upon prediction followinga mouse click in order to reduce switching delays. Similarlyto IAPDW and its relationship to IAPD, IAPEW is identicalto its counterpart, IAPE, but the predicted transition fromPSM to CAM is deferred until I/O activity arrives. IAPEWreduces unnecessary switches due to erroneous predictionsand reduces the time WNIC is waiting in CAM for incomingI/O, making it the most energy conscious predictor. How-ever, this is done at the cost of introducing switching delaysfor each predicted PSM to CAM transitions.

We use Figure 4 to further illustrate the differences be-tween the proposed mechanisms. IAPE and IAPEW default

375

Application Trace MB MB I/O Act. # CAM # PSM Total Unique CorrelatedLength Sent Recv. Periods Periods Periods Clicks Click IDs Click IDs

Firefox 37 hrs 43 692 3643 791 2852 3113 128 83Thunderbird 20 hrs 407 434 632 185 447 2175 32 14

GFTP 12 hrs 339 2140 565 74 491 2992 34 18Gaim 12 hrs 459 254 1085 137 948 2253 59 31Pan 15 hrs 64 229 1302 46 1256 7316 50 20

DJGame 30 hrs 281 164 630 214 416 6189 41 13

Table 3: Application execution statistics.

to PSM when a prediction is lacking or uncertain. There-fore, there are no switches for the click with ID 1 and thefirst I/O period, since click with ID 2 has not been encoun-tered previously. The next time ID 3 is seen, the predictionto switch to CAM is made correctly. Additionally, IAPEW,like IAPDW, does not immediately request that the WNICtransition to CAM, but does so only when the first networkI/O is encountered following a prediction.

3.4.3 IAPED: Minimizing Energy-Delay2

The challenge of designing energy efficient predictors isthe balance between reducing delays and reducing energyconsumption, which can be accomplished by minimizing theenergy-delay2 product. A detailed evaluation of the mech-anisms proposed in the previous sections found that IAPEand IAPEW consistently performed better in this respect.This implies that utilizing the CAM mode during trainingand transmissions not preceded by mouse clicks is less sig-nificant than minimizing delays and wrongful switches. Asa result, we propose an additional IAP that minimizes theEnergy-Delay2 (ED) product (IAPED). We selected IAPEand IAPEW, the top performers in Figure 8, to design theIAPED predictor that dynamically selects between the com-bined predictors in an attempt to minimize the energy-delay2

product. Training and predictions are done according to thediagram shown in Figure 3. The only additional step neededis deciding if waiting for the I/O or switching ahead of timeis more beneficial for the energy-delay2 product, given theactivity period that has just ended. We use energy-delay2

calculations from each prediction mechanism and if switch-ing ahead of time is more beneficial, an additional 4-bit sat-urating counter is incremented for each click where this isthe case, otherwise it is decremented. Once the prediction toswitch to CAM is made, the IAPED consults the 4-bit sat-urating counter for each click ID and decides if the switchshould occur immediately or when I/O activity arrives.

We decided to bias the saturating counter to IAPEW per-formance during training, since, as it will be shown in sub-sequent sections, IAPEW outperforms IAPE in terms of theenergy-delay2 product for all applications except Firefox. Asa result, the initial value of the saturating counter is set to0 and will require two incorrect choices for each individualmouse click ID before IAPED starts performing like IAPEsince this can potentially reduce the energy-delay2 improve-ment for applications where IAPEW is the best performer.

4. METHODOLOGYTo accurately compare the various energy management

techniques for WNICs we use a trace-driven simulation. Weimplemented: (1) standard power modes: PSM and CAM;(2) interaction-aware mechanisms: AC, IAPD, IAPDW, IAPE,IAPEW, and IAPED, (3) existing state-of-the art STPM

mechanisms, according to the authors’ specifications [4], (4)optimal power management mechanism that minimizes theenergy-delay2 product based on future knowledge (OPT),and (5) another reference predictor that switches the WNICto CAM for each network I/O period (AN). We use the ANmechanism to show the other side of the spectrum whereall I/O is served in CAM to minimize transmission delays.This mechanism is similar to the hardware PSM to CAMswitching mechanism that switches the card to CAM if thereis more than one packet waiting at the network interface.Through experimentation, we have found that an timeoutof 4 seconds used to delay the transition of the WNIC fromCAM to PSM results in the best energy-delay2 product forstudied mechanisms.

Application traces are composed of two components: themouse event trace, and the network activity trace. Mouseevents are traced using the X monitoring layer. The traceincludes the mouse interaction type, a timestamp, and theunique ID that identifies the component with which the userhas interacted. Network activity traces are collected usinga modified strace that captures the system call informationfrom send and recv interfaces, such as type of request, times-tamp, bytes send, and bytes received. The simulator relieson timestamps from each trace to order the incoming events.

We use six applications commonly executed on desktop orportable systems:

• Firefox is a widely used web browser and representsthe behavior of users surfing the web, reading newsarticles or downloading files among other activities.Browsing web pages generally results in a low net-work activity while downloading files will generate highbandwidth demand. Some page browsing activitiesmay invoke external plug-ins to access media contentwithin a page such as flash animations or movies thatalso may require high bandwidth.

• Thunderbird is an example of a mail application whereusers interact with the application to perform taskssuch as sending, receiving, reading and composing emailmessages. These interactions generate varying amountsof network traffic due to sending or receiving emailswith or without attachments. Transferring attachmentswill usually require much higher bandwidth than trans-ferring a plain text messages.

• Gaim is an Internet messaging application. It gen-erates low bandwidth network traffic when users aresending text messages, while occasional file transfersperformed by users require high bandwidth.

• GFTP is a file transfer client used to upload and down-load files between the client and a server. The traf-fic consists of low overhead directory listings and highoverhead file transfers.

• Pan is a newsreader application, where user interac-

376

AN AC IAPDIAPEIAPDWIAPEWIAPED   AN AC IAPDIAPEIAPDWIAPEWIAPED   AN AC IAPDIAPEIAPDWIAPEWIAPED   AN AC IAPDIAPEIAPDWIAPEWIAPED   AN AC IAPDIAPEIAPDWIAPEWIAPED   AN AC IAPDIAPEIAPDWIAPEWIAPED

Correct MissOpp Insufficient Unnecessary

Firefox                     Thunderbird                       GFTP                             Gaim                              Pan                            DJGame

150%

100%

50%

0%100%

50%

0%

Accu

racy

Figure 5: Normalized prediction accuracy.

tions result in low network traffic generated by con-necting to a news server, getting lists of groups andmessage headers, getting messages, and posting mes-sages.

• DJGame is an interactive online game that initiatesnetwork activity for each action within the game, withsome actions leading to the transfer of information re-garding user actions and others leading to the largertransfers of game-state related information.

Trace details such as trace duration, the amount of datatransferred, and the number of network I/O activity pe-riods representing opportunities for switching the WNICpower mode are included in Table 3. Also included are thenumbers of user interactions, represented by mouse clicks.Unique click IDs serve as a measure of GUI complexity foreach application. Applications with relatively simple staticGUIs, such as Thunderbird or GFTP, have few unique clickIDs, while those with rich interfaces have a somewhat highernumber of unique IDs. Correlated click IDs are a subset ofunique click IDs that belong to clicks that precede networkactivity and can be correlation to the network I/O.

5. EVALUATIONWe evaluate the efficacy of our proposed mechanisms along

several dimensions. First, we consider the prediction perfor-mance of the proposed predictors. Second, we compare thedelay and energy consumption of all mechanisms to identifythe various sources of performance degradation and energyconsumption. Third, we consider the relative energy-delay2

performance of each mechanism, which shows a combinedview of predictor efficacy. Finally, we compare the over-heads of IAP mechanisms and the state-of-the-art STPMmechanism.

5.1 AccuracyFigure 5 shows a breakdown of prediction outcomes for

the studied mechanisms and combines two related metrics:one for the correct CAM periods and the other for wrongswitches, both normalized to AN. The Correct portion ofthe bar represents the number of correctly predicted CAMperiods, while Missed Opportunity represents the number of

CAM periods that were missed by the predictor and weresubsequently served in PSM. Incorrect switches are dividedinto Inefficient and Unnecessary switches. The Unnecessaryswitches occur when the WNIC was switched to CAM upona prediction but the WNIC did not serve any I/O and thecard was transitioned back to PSM. Unnecessary switcheswaste energy without providing any benefit in reducing de-lays. Inefficient switches, on the other hand, occur when theWNIC switches to CAM and serves some I/O but the I/Oactivity is insufficient to justify serving it in CAM. Ineffi-cient switches are less energy efficient but reduce some de-lays by serving I/O in CAM. Therefore, they are less damag-ing to the resulting energy-delay2 product than Unnecessaryswitches. We use AN as the base for Figure 5 since it showsmaximum potential for serving I/O periods in CAM and alsothe maximum amount of network I/Os that can be servedincorrectly in CAM if more sophisticated prediction mech-anisms are not employed. We use the term coverage hereto indicate the percentage of the correcly predicted CAMperiods to the total CAM periods.

As shown in Figure 5, AC covers 87% of CAM periodson average, with the best case being 95% in GFTP. CAMperiod coverage is on average 77% for IAPD and IAPDW;and 74% for IAPE and IAPEW. There is no difference in theconverges for the IAPDW and IAPEW as compared to theirbase cases since the prediction are the same, only the timingof switching is different. The average improvement of wrong-ful switches for IAP mechanisms over AN is on average 77%for IAPD, 79% for IAPE, 82% for IAPDW, 84% for IAPEW,and 82% for IAPED. The lower wrong switches in IAPDWand IAPEW mechanism are due to delaying switches afterprediction. Slightly higher coverages for IAPD mechanismsare due to handling network I/O in CAM during initial train-ing of the predicate when the mouse clicks are observed forthe first time.

The naıve AC mechanism switches for all clicks but doesnot switch for the I/O not preceded by click. Switching forall clicks explains the higher coverage in Firefox, GFTP, andPan, at a cost of much higher incorrect switches. I/O peri-ods that were not immediately preceded by clicks are servedin PSM, since according to the intuition behind AC designthey are not latency sensitive. This explains slightly lower

377

PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED

0.0

0.2

0.4

0.6

0.8

1.0

1.2Transfer Delay Beacon Delay Switch Delay

Firefox                       Thunderbird                         GFTP                           Gaim                              Pan                        DJGame

Dela

y No

rmal

ized 

to P

SM

PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED

0.0

0.2

0.4

0.6

0.8

1.0

1.2Transfer Delay Beacon Delay Switch Delay

Firefox                       Thunderbird                         GFTP                           Gaim                              Pan                        DJGame

Dela

y No

rmal

ized 

to P

SM

PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED

0.0

0.2

0.4

0.6

0.8

1.0

1.2Transfer Delay Beacon Delay Switch Delay

Firefox                       Thunderbird                         GFTP                           Gaim                              Pan                        DJGame

Dela

y (N

orm

alize

d to

 PSM

)

Figure 6: Details of delays incurred by predictors.

coverage in case of Gaim and DJGame for AC. The peri-ods that are not immediately preceded by clicks are foundin Thunderbird, Gaim and DJGame and are due to delaysgenerated by the server providing the data. Those delayscan result in the fragmentation of long network I/O periodsinto several smaller network I/O periods. This delay resultsin the CAM to PSM transition timeout to expire and ACserves the remaining network I/O in PSM. IAP mechanismsgenerate persistent predictions that will serve any I/O inthe last predicted state until a new prediction is generatedat the next mouse click. In this way, fragmented periodsare served in a correct WNIC mode, albeit incurring a smallamount of switching delay for each switch occurring at thearrival of a new I/O period fragment, if predicted mode ofthe WNIC is CAM. This policy is responsible for better cov-erage by IAP mechanisms by an average of 6% in Gaim and5% in DJGame.

Lower coverages in Firefox, GFTP and Pan are due tovariability in transfers following certain mouse clicks. Thoseapplications are dominated by the PSM periods where mostinteractions are efficiently handled in PSM. We observe thatIAP mechanisms are able to correctly handle PSM periodsby having very small fraction of periods that should be han-dled in PSM but are instead handled in CAM. Occasionalinteractions that usually result in low bandwidth demandmay require higher bandwidth to accomplish, resulting inthe predictors missing an occasional CAM switch. Thosescenarios are observed in Firefox where fetching pages usu-ally requires low bandwidth, while some pages contain richgraphical content with high resolution graphics occasionallyrequiring higher bandwidth to load them. Similarly, GFTPrequires high bandwidth for file transfers and usually lowbandwidth for retrieving directory listings. However, somelarge directories will require higher bandwidth to transmita very long list of file names with corresponding informa-tion. Finally, Pan retrieves a majority of messages withoutany attachments, generally requiring low bandwidth that isaccurately handled in PSM. Occasional downloads of themessage with an attachment will result in lower coverage forthe CAM periods.

The goal of the IAP design is to handle I/O periods ac-

curately to minimize energy-delay2 product. Much higheraccuracy is achieved at the cost of reduced CAM coverage,but the ultimate benefit to reduction of energy-delay2 prod-uct is achieved. This is illustrated in case of AN and ACwith both mechanisms having higher coverage of CAM pe-riods than IAP mechanisms. However, both AN and ACmechanism are plagued by incorrect handling of PSM pe-riods, where IAP mechanisms on average improve wrongfulswitches by 80%.

5.2 DelayFigure 6 breaks down the various delays incurred by each

mechanism. The three types of delay shown are Transfer,Beacon, and Switch delay. Since CAM incurs minimum de-lays, the delay of each mechanism is computed relative toCAM. Transfer delay occurs whenever data is served in PSMand is due to the lower throughput rates of PSM. Beacondelays are caused by the delays that occur due to the WNICdowntime between transmitting beacon frames, where serv-ing data following a beacon is delayed by the time remainingbefore the next beacon arrives. Switch delay is the delay in-curred by transitioning the WNIC power modes and is equalto the time to transition the card from PSM to CAM or viceversa. All results are normalized to the PSM delay, showingthe deficiencies of the existing hardware mechanisms.

The delay that results in maximum energy efficiency isshow by the energy-delay2 optimal mechanism, shown asOPT in Figure 6. OPT does not have any switching de-lay since it transitions the WNIC to CAM prior to the ar-rival of I/O activity. The delay incurred by OPT is mainlydue to serving periods in PSM, that minimize energy-delay2

product. Similarly to OPT, AC eliminates switching de-lay by switching upon a mouse click, ahead of network I/O.However, lower than optimal transfer delay indicate thatAC sacrifices energy efficiency at the cost of lower delay.AN eliminates transfer delay altogether since it is servingall I/O in CAM. However, it switches from PSM to CAMwhen I/O arrives, encountering switching delays for the I/Operiods that could be served more efficiently in PSM with-out a switch. Delays, due to the decision-making process inSTPM, result in the network interface serving more I/O inPSM, encountering transmission delays even for the periods

378

PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED   PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED   PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED   PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED   PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED   PSMO

PTSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED

0.0

0.5

1.0

1.5

2.0

2.5Transfer PSM Idle Switching CAM Idle

Firefox                       Thunderbird                         GFTP                           Gaim                              Pan                            DJGame

Ener

gy (N

orm

alize

d to

 PSM

)4.1 2.5

Figure 7: Detailed breakdown of energy consumption results.

that are later switched to be served in CAM. Regardless,STPM improves delay by 59% with respect to PSM. On av-erage IAP mechanisms further improve delay over PSM by71% for IAPD, 69% for IAPE, 62% for IAPDW, 61% forIAPEW, and 63% for IAPED. It is important to note thatthe optimization of energy-delay2 product by each succes-sive variation of the IAP mechanisms results in increasingdelay as this is the cost of reducing the energy consumed byincorrect or early switches. IAPED shows the result of theinterplay of the two mechanisms that have been combined.

The IAPDW and IAPEW mechanisms were proposed toreduce the energy consumed by unnecessary switches andalso reduce the time spent in CAM waiting for the I/O toarrive. Therefore, the only difference for those mechanismsis visible in switching delay, since both IAPDW and IAPEWwait for the I/O to arrive before switching the WNIC mode.Firefox shows a significant difference in delay between IAPDand IAPDW, as well as between IAPE and IAPEW, that isdriven by switching delay. Switching the WNIC to CAMwhen the prediction is made, as in the case of IAPD andIAPE, results in a lower switching delay in situations wherethe transition prior to network activity does not time out be-fore I/O arrives. The switching delay that is present in thecase of IAPD and IAPE is due to persistent predictions tran-sitioning the WNIC to CAM once I/O activity arrives afterthe idle time threshold and the card is switched again fromPSM to CAM. For example, the deferred switches compriseabout 16% of all switches in Firefox for IAPD and IAPE.

Finally, variations in transfer, switching, and beacon de-lays across the applications are due to the composition of anapplication’s I/O activity. Applications with a large amountof low bandwidth activity will incur higher transmission de-lays as compared to CAM, since those periods are more effi-ciently served in PSM. The same applications will also incurbeaconing delays due to the PSM mode. The example ofthis behavior in Figure 6 is Pan with 96% of all periodsthat are best served in PSM. Applications with relativelyhigh number of CAM periods or activity that is hard topredict may incur a higher fraction of switching delay, withFirefox serving as an example.

5.3 EnergyEnergy consumption in Figure 7 is divided into four com-

ponents: PSM idle, CAM idle, switching, and transfer en-ergy. PSM idle energy is consumed by the WNIC when it isin PSM and there is no I/O transfer occurring. It includesenergy consumed during beaconing as well as the base PSMenergy. CAM idle energy is the energy consumed when theWNIC is in CAM but not transferring data. Switching en-ergy is the energy consumed by the WNIC to make the tran-sition from CAM to PSM and vice versa. Finally, transferenergy is the energy consumed while transferring data, ei-ther while in CAM or PSM. Similarly to Figure 6, all resultsare normalized to the PSM energy consumption.

PSM on average consumes the least amount of energy,at the cost of increased delays as shown in Figure 6. En-ergy consumption below the optimal level again suggeststhat the mechanism is not efficient when we consider theenergy-delay2 product. The most energy-hungry mecha-nism is either AN or AC, depending on the application.The behavior of AN and AC, shown in Figure 7, mirrorstheir behavior in Figure 5, showing that the large numberof incorrect switches is responsible for the increased energyconsumption due to switching, and subsequently the energyconsumed waiting for the timeout to expire before switchingback to PSM. We can conclude that accuracy of the pre-diction is critical to energy consumption. Higher switchingaccuracy of STPM, which only switches when it encountersnetwork I/O with sufficiently high bandwidth demand, re-sults in much better energy efficiency than the naıve AC andAN mechanisms. Higher accuracy in IAP mechanisms alsotranslates to better energy efficiency. On average, STPMconsumes 9% more energy than OPT, IAPD 16%, IAPE13%, IAPDW 4%, and IAPEW and IAPED only 3% more.

Energy consumption due to data transfers is similar acrossmechanisms for a given application since all mechanismshave to transfer the same amount of data and transfers inCAM and PSM use approximately the same power, as shownin Table 1. The largest difference is observed in GFTP,which can be attributed to large transfers which when per-formed in PSM take more time and as a result consume moreenergy. This difference stands out most in GFTP since, on

379

PSMSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED  PSMSTPMAN AC IAPDIAPEIAPDWIAPEWIAPED

1.0

1.2

1.4

1.6

1.8

2.0

Firefox                       Thunderbird                       GFTP                                Gaim                              Pan                          DJGame

Ener

gy­D

elay

^2  P

rodu

ct3.1 2.4 2.4 2.9 2.5 2.7 2.1

Figure 8: Energy-delay2 product results.

OPT PSM STPM IAPEDTime (s) Energy (J) Time (s) Energy (J) Time (s) Energy (J) Time (s) Energy (J)

Firefox 2132 19655 3298 15470 2954 15932 2515 20352Thunderbird 3068 7296 3930 6955 3428 6995 3226 7413

GFTP 7215 9215 10250 10954 7371 10959 7514 9321Gaim 2856 5773 4522 5447 3021 6544 3027 6192Pan 1104 4076 1313 3641 1128 5320 1251 4141

DJGame 1800 8524 3199 7342 1915 8759 1889 8373

Table 4: Energy and delay costs for selected mechanisms.

average 71% of energy consumed in GFTP was due to trans-ferring large amounts of data, which is four times more thanthe average of the remaining applications. The smallest en-ergy consumption during transfers occurred in Firefox withan average of 10% of total energy, while PSM idle makes upthe bulk of energy consumption at an average of 61%. As aresult, those differences in transfer delays are less prominentin other applications.

The largest differences among energy management mech-anism are visible in switching energy and CAM idle energy.Every erroneous switch increases switching energy consump-tion and idle CAM energy consumption while waiting forI/O to arrive and idle timeout to expire. Furthermore, evencorrect switches can contribute to idle energy consumptionin the case when they have to wait for I/O to arrive. IAPEconsumes less energy than IAPD, since it has fewer erro-neous switches as shown in Figure 5. The energy consumedwhile waiting for I/O to arrive is further reduced in IAPDWand IAPEW since those mechanisms wait for I/O to arrivebefore switching to CAM. The only energy consumed in idleCAM state in IAPDW and IAPEW is due to timeout inter-val after an I/O has been served and before the WNIC wastransitioned to PSM.

5.4 Energy-Delay2

The final metric in evaluating each of the energy man-agement mechanisms is the energy-delay2 product. Theenergy-delay2 product is an established metric that takesinto account both performance degradation and energy con-sumption, with an emphasis on performance degradation,due to the interactive applications’ requirements for low-delay operation. Energy-delay2 provides a single metric and

therefore is useful for visualizing the tradeoff between en-ergy consumption and performance. Figure 8 shows theenergy-delay2 product for each mechanism as normalizedto OPT. OPT energy-delay2 product is at 1 and the in-creases in energy-delay2 product as compared to OPT areabove 1. To compute the energy-delay2 product, we con-sider the total WNIC energy consumption for each of thetraced applications using each of the described mechanismsand total transmission time, which includes all delays andtime to transmit data, but does not include the idling time,which may vary according to user behavior. For additionalreference, we include Table 4, which shows the transmis-sion time and energy, in seconds and Joules, respectively,for OPT, PSM, STPM, and IAPED.

We observe that the IAPED mechanism outperforms ACand AN by an average of 75% and 60%, respectively, andis 11% lower than STPM. Of the IAP mechanisms, IAPDand IAPE are generally the weaker performers, with an av-erage energy-delay2 product that is 31% and 26% higherthan OPT, respectively, due to larger number of erroneousswitches and resulting higher energy consumption. The ex-ception is Firefox where we see that the trend is reversed,where IAPD and IAPE perform better than their energy-optimizing counterparts do. Firefox overall exhibits a largeramount of activity than the other applications. In thiscase, the switching delay incurred by IAPEW and IAPDWis largely eliminated by the early switching of IAPE andIAPD. In Thunderbird and DJGame the pronounced dif-ferences between IAPD and IAPDW, as well as IAPE andIAPEW, are due to long delays between correlated transmis-sions. While the energy consumed by IAPE is significantlyhigher, by 17% over IAPEW, for example, the savings in

380

Apps. STPM IAPEDFirefox 22 .08

Thunderbird 8 .05GFTP 3 .23Gaim 3 .02Pan 4 .02

DJGame 5 .03

Table 5: Mechanism overheads in seconds.

delay by IAPE are not significant due to a relatively smallnumber of total switches in these applications. Finally, Panis a PSM dominant application, therefore the performanceof IAP mechanisms is comparable to PSM.

5.5 OverheadsA large amount of computational or storage overhead can

reduce or eliminate the gains made by implementing energymanagement for a single system component. For example,high computational overhead results in more energy beingused by the CPU. This additional energy that is not nor-mally consumed by the CPU can result in more energy beingconsumed to run the predictor than is saved by the predic-tor in the managed component. STPM is a relatively highcost prediction mechanism, due to having to compute prob-abilities for upcoming activity from histograms describingprior activity. In our simulations, STPM is implementedas described by its authors, including a 10-minute intervalbetween recomputation of probability lookup tables. Theupdate of probability tables used to determine the likeli-hood of upcoming activity is a high-cost operation which,when performed for each run, results in additional compu-tational overhead without significantly benefiting the result-ing mechanism accuracy. The overheads shown in Table 5can be decreased for STPM at the cost of lower predictionaccuracy. We evaluate the computational overhead shownin Table 5 by a timed execution of the simulation of eachmechanism as it evaluates the application traces. We findthat due to the predictions being made once for each mouseevent rather than once for each incoming I/O request, theoverheads for the IAPED mechanism are obviously lower.Compared to STPM, the IAPED overhead is between 99%and 98% less.

The computational overhead of all IAP mechanisms comesfrom the computation of unique IDs used to index into theprediction table. Firefox has the deepest tree of 27 levelsin the studied applications. We again setup an experimentto measure the average overhead of traversing 27 level oftree hierarchy that is present in Firefox. The overhead ofcalculating the ID in this case is less than .8ms. Currently,each mouse click results in a communication overhead as theapplication window tree is built through use of X Server re-quests, so this overhead can be reduced by use of persistenttree representations of the application’s GUI. Furthermore,ID calculations and subsequent prediction table lookup areperformed once per click, meaning that they need to be per-formed as infrequently as the user interactions occur.

Finally, the storage overhead is relatively small in IAPmechanisms. The IAP daemon has to maintain predictionentries, which ranged from 32 in Thunderbird to 128 in Fire-fox. Each table entry is composed of five fields containinga single unsigned integer each. Therefore, in the worst caseFirefox requires 2.5KB to store 128 entries. A 6.8KB tablewould suffice for storing all entries from every one of the sixapplications we have traced. This relatively small overhead

can be further reduced, since only a small number of the en-tries contain information about clicks that lead to networkI/O. As a result, we may consider aging the less useful entriesand removing them using a simple replacement mechanismsuch as LRU.

6. RELATED WORKTo minimize energy consumption without sacrificing per-

formance, the network card should be switched immediatelyto CAM when a high bandwidth transfer occurs and backto PSM when the transfer is over, since PSM can cause un-acceptable 16-32x slowdown for synchronous traffic [4]. Thedrawbacks of the simple PSM scheme have been addressedthrough prior work that aimed to modify the PSM protocolsin order to further improve the potential for energy savings.One such project produced BSD [14], the bounded slowdownprotocol, for PSM. BSD improved on the static PSM proto-col by dynamically adapting the length of the beacon period,shortening it during active periods and lengthening, backingoff, during periods of inactivity. A further PSM beaconingoptimization was introduced with PSM-Dynamic [5], whichbased the beaconing interval on recently observed RTT ofthe active connections. The drawback is that dynamic bea-coning requires that the hardware be able to support non-static beaconing periods.

As a result, dynamic switching between PSM and CAMhave been explored in Self-Tuning Power Management [4](STPM). STPM explored the use of explicit application-level hints and on-line modeling of application access pat-terns to set network power management parameters. Ap-plication controlled power management has been applied toother devices and system components [7, 10, 17, 19] with ahigh potential for reducing energy consumption. However,this approach places the burden of inserting power manage-ment directives on the programmers and requires modifica-tion of existing applications before the energy saving poten-tial can be realized. As a result, mechanisms for automaticapplication-like hint generation have been proposed [9, 8].

Higher-level context can be leveraged to improve accu-racy and timelines of predictors. The context may includemany aspects of the user environment, such as location, useractivity, and system-user interaction. One of the earliest ef-forts in this area was the Lumiere Project [11]. Lumiereserved as the basis for Microsoft’s Office Assistant. TheLocation Stack project [15] used location based contextualhints to support a range of location-sensitive services. TheLocation Stack focused on information retrieval and cus-tomization. More recently, event-based mechanisms wereused for building environments that respond to users ac-tivities [1]. Using ubiquitously deployed sensors, perceptualsystems in smart environments monitored user behavior andissued hints about user’s activities that customized devices.Layered hidden Markov models [18] were used to character-ize states of a user’s activity based on streams of video, audioand computer (keyboard and mouse) interactions. Finally,statistical models were applied to capture user behavior andcorrelate it to network activity [2]. This approach sufferedfrom complicated clustering that required offline processing.Furthermore, clusters are only an approximation of user in-terfaces and result in a high computational overhead due tothe retraining that occurs when the displayed window layoutor geometry changes.

381

7. CONCLUSIONThis paper proposes a new direction for designing resource

management predictors. While current predictors monitorlow-level application behavior such as network activity orsometimes reach as high as monitoring the application sys-tems calls, we take the next step by monitoring the keycomponent responsible for the behavior of interactive appli-cations, the user. We have proposed and successfully imple-mented several user-interaction-aware energy managementmechanisms that dynamically learn the context of user in-teractions with respect to network activity in interactive ap-plications.

Other recent resource management solutions could poten-tially perform better with hints from modified applications,but for unmodified applications they rely on monitoring low-level activity. Application modifications are impractical dueto the additional burden that is placed on programmers,therefore our proposed mechanisms provide a transparentsolution that provides high energy efficiency without theneed for application modifications. More importantly, theproposed mechanisms are readily implementable in existingsystems due to: (1) the simplicity of the proposed mecha-nism which monitors and correlates user behavior with sys-tem activity, (2) quantifiably low computational and storageoverheads, (3) online monitoring and prediction that doesnot require application modification or offline processing forthe analysis of user interactions.

8. REFERENCES[1] F. Albinali, P. Boddupalli, N. Davies, and A. Friday.

Correlating sensors and activities in an intelligentenvironment: A logistic regression approach.Proceedings of the First European Symposium onAmbient Intelligence, 2875:318–333, 2003.

[2] F. Albinali and C. Gniady. Cpm: Context-awarepower management in wlans. In Eighteenth InnovativeApplications of Artificial Intelligence Conference(IAAI), 2006.

[3] M. Anand, E. B. Nightingale, and J. Flinn. Self-tuningwireless network power management. Proceedings ofthe 9th annual international conference on Mobilecomputing and networking (MobiCom ’03), pages176–189, 2003.

[4] M. Anand, E. B. Nightingale, and J. Flinn. Self-tuningwireless network power management. WirelessNetworks, 11(4):451–469, July 2005.

[5] Z. Anderson, S. Nath, and S. Seshan. Choosing beaconperiod for improved response time for wireless httpclients. Proceedings of the Second InternationalWorkshop on Mobility Management and WirelessAccess Protocols (MobiWac ’04), 2004.

[6] A. Dix, J. Finley, G. Abowd, and R. Beale.Human-computer interaction (3rd ed.). Prentice-Hall,Inc., Upper Saddle River, NJ, USA, 2003.

[7] C. S. Ellis. The Case for Higher-Level PowerManagement. In Workshop on Hot Topics inOperating Systems, pages 162–167, Rio Rico, AZ,USA, March 1999.

[8] C. Gniady, A. R. Butt, and Y. C. Hu. Programcounter based pattern classification in buffer caching.In Proceedings of the 6th Symposium on OperatingSystems Design and Implementation (OSDI),December 2004.

[9] C. Gniady, Y. C. Hu, , and Y.-H. Lu. Program counterbased techniques for dynamic power management. InProceedings of the 6th Symposium on OperatingSystems Design and Implementation, Dec. 2004.

[10] T. Heath, E. Pinheiro, J. Hom, U. Kremer, andR. Bianchini. Application transformations for energyand performance-aware device management. InProceedings of the 11th International Conference onParallel Architectures and Compilation Techniques,September 2002.

[11] E. Horvitz, J. Breese, D. Heckerman, D. Hovel, andK. Rommelse. The lumiere project: Bayesian usermodeling for inferring the goals and needs of softwareusers. the Fourteenth Conference on Uncertainty inArtificial Intelligence, 1998.

[12] IEEE. 802.11 wireless standard. Online TechnicalStandard Specification, 1999.http://grouper.ieee.org/groups/802/11/.

[13] IEEE. Supplement to ieee standard for informationtechnology: Part 11: Wireless lan medium accesscontrol (mac) and physical layer (phy) specifications.Online Technical Standard Specification, 2001.http://grouper.ieee.org/groups/802/11/.

[14] R. Krashinsky and H. Balakrishnan. Minimizingenergy for wireless web access with boundedslowdown. Proceedings of the 8th annual internationalconference on Mobile computing and networking(MobiCom ’02), pages 119–130, 2002.

[15] A. LaMarca, J. Hightower, I. Smith, and S. Consolvo.Self-mapping in 802.11 location systems. Proceedingsof the Seventh International Conference on UbiquitousComputing (Ubicomp 2005), pages 87–104, September2005.

[16] J. R. Lorch and A. J. Smith. Using user interfaceevent information in dynamic voltage scalingalgorithms. Eleventh International Symposium onModeling, Analysis and Simulation of ComputerTelecommunication Systems, 00:46, 2003.

[17] Y.-H. Lu, G. D. Micheli, and L. Benini.Requester-aware power reduction. In Proceedings ofthe International Symposium on System Synthesis,pages 18–24, 2000.

[18] N. Oliver, A. Garg, and E. Horvitz. Layeredrepresentations for learning and inferring officeactivity from multiple sensory channels. ComputerVision and Image Understanding, 96(2):163–180, 2004.

[19] A. Weissel, B. Beutel, and F. Bellosa. CooperativeI/O—a novel I/O semantics for energy-awareapplications. In Proceedings of the Fifth Symposium onOperating System Design and Implementation,December 2002.

382