Edwin Hernandez,                     ...
to independently determine the optimal transmission power. Their results indicated that
for web-browsing applications the ...
Section 4 provides the metrics and the modeling concepts used to determine the
simulation parameters. Section 5 presents t...
Max current


the card in “doze” or “off” states, depending on the characteristics of the network and
different security and authenticat...
                                     I rms =
In order to determine the average power using Eq. 8 and Eq. 9, we can use different
network traffic models and determine t...
Table 2. Model used at each interval of time
                 Time                    Model
                 0 < T < Ton  ...
In terms of queues, we will use Qmax to represent the maximum number of packets at the
systems queue. The Queue of the sys...
would lead to severe congestion.

                 7000                                                                 ...
Both matrices are size 1xN and represent the distribution of the inter-arrival rates
measured form the card as well as the...
suitable for a power management algorithm; in fact the buffering and delay introduced by
the wireless service might disrup...
negatively affected by the process of scheduling the duty cycle of the network card,
although many other applications such...
[8]    V. Paxson, S. Floyd, “Wide Area Traffic: The Failure of Poisson Modeling”,
       IEEE/ACM Transactions on Networki...
Upcoming SlideShare
Loading in …5

Power management windows


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Power management windows

  1. 1. A POWER MANAGEMENT ALGORITHM FOR THE WIRELESS SERVICE Edwin Hernandez, Arun Ayyagari CISE department, PO BOX 116120 Microsoft Corporation University of Florida One Microsoft Way Gainesville, FL, 32611 Redmond, WA, 98052 (352) 392 1200 (425) 703 6185 ehernand@cise.ufl.edu aruna@microsoft.com Abstract Power management is an important subject for mobile computing devices. Power savings in battery-operated equipment can be improved by scheduling the active duty cycles on the network card depending upon the current network traffic statistics. We conducted analytical experiments using exponential arrivals to simulate mobile host requests and Pareto service rates for the network responses. The results showed that the buffer size must be carefully chosen every time the management algorithm schedules a short duty cycle being several orders of magnitude greater than deterministic and exponential values expected. A tradeoff between the average power savings and the probability of congestion has to be considered especially for heavily tailed network traffic patterns. 1. Introduction Power management in network cards is a very important issue for battery-operated equipment [1]. In general this type of equipment requires tight constraints in terms of energy consumption. Ideally, a power management algorithm would allow the network card, hard-drive, or any other device to power off, during idle periods of time; and power it on during periods of utilization. Although, the many available methods for power saving in portable computers are based upon timeout periods rather than wisely determining idle periods of time. An average of 20% of the total power consumed by many laptops is due to the wireless LAN interface therefore an intelligent method for power management would improve the life in the battery. This paper proposes a new power management algorithm targeting wireless network cards and how operating system services, such as Microsoft Windows, would interact with the network card. Many algorithms have been proposed to improve the power utilization in wireless devices. Initially T. Simunic, et. al., [1] proposed a power management algorithm based upon renewal processes, this algorithm optimizes a control policy by monitoring the number of elements in the queue at the mobile host and the transition probabilities while in the doze and off states. Additional steps should also be taken to improve power utilization by defining a power control algorithm that monitors the signal strength value at the access point (AP) and the mobile host, as well as the bit error rate (BER). In this approach, the AP performs the calculations for the optimal transmission power to be used by the client. Alternatively, in a distributed computing option, the AP could provide the information for the power control algorithm to the mobile host to enable the mobile host
  2. 2. to independently determine the optimal transmission power. Their results indicated that for web-browsing applications the savings could be of around 60% and telnet applications resulted on savings of up to 80% on the power used by the card. Additionally, Simunic showed that by using Pareto distributions and assuming a self- similar network service times, a greater penalization value was observed in the range of 2-10 seconds. On the other hand, the industry has also made efforts to improve asynchronous medium access control protocols like the MAC in IEEE 802.11 [2] and make them more efficient. Although, as presented by E. Takahashi [3], the one-fits all power management policy found on the IEEE 802.11 standard still has many energy inefficiencies. Takahashi also approached the issue of power consumption and delay introduced in IEEE 802.11 networks in order to propose a new MAC protocol. Takahashi’s protocol avoids the unnecessary receiver idle times by approximation of the ideal fluid model and guarantee communication services. The combination of a modified version of the Point Coordination Function (PCF) and an explicit traffic re-shaper function was the key factor for the improvements shown in this paper. The results presented indicate that it is possible to reach savings between 50-90% within the higher and lower throughput bounds used by the mobile unit. Some other studies such as [4,5] try to predict the power consumption on the card by using stochastic methods and neural networks. C. Hwong, et. al., implemented an event- driven application which introduced two mechanisms for prediction: prediction-miss correction and pre-wakeup. Both approaches required of an exponential predictor to determine the upcoming idle period of time. Similar work has been also conducted on prediction methods involving neural networks [5]. Even though both prediction initiatives were used to determine the code-length and the Signal-to-Noise Ratio (SNR) on a DS/CDMA system, the same experiments could be used to indirectly determine the predicted power consumptions. Finally, many researchers have proposed power management algorithms as part of the solution of an optimization problem using Markov decision processes. L. Benini, et. al., [6] provided a novel approach to optimally find the policies that were the solution for a well defined stochastic problem. Their findings indicate that higher queue lengths lead to smaller power consumptions and that at higher throughput rates the power savings are minimal. The difficulties encountered in real implementation applications of a stochastic optimization are a weak supporter for this type of solution. Contrary to predictive and stochastic optimization methods, our approach determines the values of the idle time by reviewing historic information of the distribution function of the number of elements in the queue, at the access point and client levels. Assuming that there is a probability of congestion, the algorithm finds the optimal value of power while minimizing the expected congestion. This paper will, at first, introduce the wireless service in Windows XP and followed by a brief description of the most popular wireless card characteristics, in Sections 2 and 3.
  3. 3. Section 4 provides the metrics and the modeling concepts used to determine the simulation parameters. Section 5 presents the probabilistic power management algorithm . While Section 6 outlines the implementation issues required in Windows at the Network Device Interface Specification (NDIS) level. Finally we draw some conclusions and present future work items in Section 7. 2. The Wireless service in Windows The wireless service [6] provides the layer-2 functionality aimed at seamlessly connecting to infrastructure and ad hoc networks. The service provides a polling mechanism to detect new available networks every 60 seconds (Tscan). In other words, in between those scan periods communication can take place depending upon the request made by applications from the upper layers. Our main assumption is based upon the ability to reduce power cycle during those periods of time in between scan periods where the network utilization is probabilistically “low”. The wireless service is in charge of the card configuration, establishing ad hoc and infrastructure network connections and minimizes the user intervention in the process of wireless configuration, authentication, and security. 3. Power states on wireless cards As mentioned earlier, the wireless service takes care of the process of setting on and off states of the network card. In order to understand the tradeoff of setting the wireless card from “awake” state or maximum power consumption towards a “doze” state or “off” state, several statistical analysis have been made in WaveLAN cards [1] Figure 1. shows a sketch of the transition functions and how much time is invested between different state transitions. In general “doze” to “off” transitions are expected to take between 30 to 90 ms, while “off” to “doze” 10 to 50ms [1]. While, the time between state transitions from “doze” to “ON” and vice-versa is less than 10 ms and can be considered as negligible [2]. During power savings mode the card will be set from “on” to “doze” state and from “doze” to “off” state. The minimum delay introduced by switching the card into doze mode is 100 ms. While doze mode represents power savings of more than 90%, testing conducted at different service rates or network throughputs indicates that 300 kbps the network card behaves as no power management policies are being in place. In addition, when the card is in doze mode, there is a high-probability to observe packet delay is at least of a 100 ms. As a consequence many applications will nor behave properly under these conditions. [3].
  4. 4. Max current Current doze time { { ∆Τ1 ∆ Τ2 Figure 1. Doze to max power transition function for a wireless card 4. Communication model and power optimization Once we understand the behavior of the network cards and as depicted in Figure 2., the ideal case scenario, data transmissions occur exactly during the ON cycles of the card being powered. Only for the period of time where the number of packets received or transmitted by the card is very small or zero, the card could be placed into doze mode or turned off to minimize power consumption. Max current Current doze { { time Ton Tidle Figure 2. Matching service of data requests to the power cycles for a wireless card For the wireless service in Windows, the transitions from “off” to the “on” state occur less frequently and the power management algorithm should adaptively select the appropriate duty cycle times and behave somewhat similar to the duty cycle profile depicted in Figure 2. The state diagram shown in Figure 3 is a simplified version of the wireless service using the power management feature. By default, the wireless card is set to be in the “on” state and it switches into scan mode every 60 seconds. The shaded state depicts a probabilistic mechanism where the network traffic statistics determines the appropriate time to place
  5. 5. the card in “doze” or “off” states, depending on the characteristics of the network and different security and authentication issues such as IEEE 802.1X. Tidle=0 Stochastic decider Activity Tscan ON Tidle If (Tidle==up) DOZE WZC scan If (Tidle==up) No 802.1X auth OFF Figure 3. State machine for the power manager for WZC In order to study the probabilistic behavior of the card at different rates and arrivals we will assume that the arrivals or request made by the user to the card reflect an exponential or Poisson process with λ as the arrival rate. Meanwhile, prior research conducted in network traffic characterization has determined that service time is self-similar and therefore network traffic is fractal [7,8,9,10]. One of the main implications of such findings is the infinite variance for the distribution probabilitysee Eq.1 and Eq.2 F ( x) = P[ X ≤ x] = 1 − (α / x) β , α , β ≥ 0, x ≥ α (1) f ( x ) = βα β x − β −1 (2) The average power is defined by the function of RMS current and voltage, although we used the values found in [3] for power “doze” and “on” states. In fact, we can calculate theoretical power values for the different cards available in the market as shown in Table 1. Pave = I rms × Vrms (3)
  6. 6. N 1 I rms = N ∑I i =1 i 2 Vrms = Vo (4) Table 1. Current values consumed by the PCMCIA wireless card during different modes of operation. Card Mode Average Current Cisco Aironet Transmission 450 mA Reception 250 mA Power Saving 15 mA LucentWaveLAN Transmission 285 mA Reception 185 mA Power Savings 9 mA The average value for a service time following Pareto distribution as shown in Eq. 5, represents the discrete time average, whereas the continuous average is presented in Eq. 6. This value provides the expected value for the service time. Eq. 6 shows that the Pareto distribution is only applicable for values of si greater than α in other words the minimum service time used for the simulation. Since Tscan>>α we could approximate Eq. 6 to the integral to infinite and reduce the number of calculations. N N s ave = ∑ s i p ( s i ) = ∑ si βα s i β − β −1 (5) i =1 i =1 ∞ αβ s ave = ∫ βα β s − β −1ds = (6) α β −1 The algorithm optimizes the average power consumption on the card by determining the probability of the service time to equal an expected value of save , used to determine the number of average packets arriving at the access point during “off” mode and as the maximum number of packets arriving during an interval in “doze” mode. q(i ) = 1 / s aveToff |doze (7) This queue size can be set to a maximum value to buffer the data before it could be sent to the network card during the duty cycle of the card (Eq. 7). The main drawback of this approach relies on the associated delay affecting real-time applications where delay can be an inconvenient. This delay will be exactly equals to the idle value of time calculated by the power management algorithm. Now in terms of power, we would expect that: • Poff in “off” or “doze” state , if q (i ) = ε , where, ε represents a very small queue size • Poni in transmitting or receiving mode if ε < q( i ) ≤ Qmax
  7. 7. In order to determine the average power using Eq. 8 and Eq. 9, we can use different network traffic models and determine the probability of n=0 and the complement of that probability determines the time to be in the ON state. The analysis could also be done with real traffic data and by traversing the sequence of inputs by keeping counters of different bins of ni and calculating Pr(ni) in linear time. This analysis can be performed wit the the driver or the Windows Management Instrumentation (WMI). The Windows Operaing system uses the WMI and its structures to store network management information, hence the counters of ni can be implemented onto the WMI seamlessly [11] Tdoze T − Tdoze Pave = Pdoze + Pon scan (8) T scan Tscan Pave = Pdoze Pr( n = 0) + Pon Pr( n > 0) = Pdoze (1 − Pr( n > 0)) + Pon Pr( n > 0 )) (9) Using Pareto for the services and exponential distribution for the arrivals, we can determine the values for Eq. 9. Table 2. shows the models of arrival and service during the “on” and “off” states as shown in Figure 4. For a Pr(n>0), we need to consider the probability of one or more packets arriving at the access point (or base station) or the packets generated by the user at the mobile host at any time between 0 to Tscan . In addition, one needs to add the probability of packets being serviced longer than the duty cycle Ton but before Tscan. Exp Exp Arrival Arrival Power (W) Pr(n) Pr(n) Pareto : Pareto : Pr(n) Pr(n) T on Tscan Time (s) Figure 4. Pr(n) during the duty cycles The wireless channel will have a Pr[arrivals within 0 to Ton ] which is an exponential distribution. From Ton to Tscan the probability function provided by Pr[service time Ton to Toff] represents the elements queued at the access point and at the network card.
  8. 8. Table 2. Model used at each interval of time Time Model 0 < T < Ton Exponential arrival at both wireless channel and mobile unit buffer Pareto Service at both wireless channel and mobile unit buffer Ton < T ≤ Tscan No arrivals at the wireless channel But exponential arrival at the mobile unit buffer No arrivals at the wireless channel (only if doze mode is used, Tb = 100 ms). Elements serviced and buffered at the access point follow Pareto distribution. Therefore at the wireless channel with a duty cycle less than Tscan: Pr( n > 0) = Pr(0 < Tarrival < Ton ) Pr(0 < s n ≤ Ton ) (10) = (1 − e − λTON ) * (1 − (α / Ton ) β ) (11) 1 1 0.8 0.8 Pr [n=0] Pr [n=0] 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0 10 20 30 40 50 60 0 10 20 30 40 50 60 Time (s) Time (s) (a) α=0.1 sec,β=1.8, λ=0.1 p/sec (a) α=1,β=1.8, λ=1 p/sec 1 1 0.8 0.8 Pr [n=0] Pr [n=0] 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0 10 20 30 40 50 60 0 10 20 30 40 50 60 Time (s) Time (s) (a) α=1 sec,β=1.8, λ=10 p/sec (a) α=10,β=1.8, λ=1000 p/sec Figure 5. Probability of n=0 at different values of λ, TON and α The first term is exponential, while the second one is a Pareto distribution. The complement of Eq. 11 is depicted on Figure 5 to indicate the probability of the number of arrivals due to a host’s request or for a service still taking place initiated by the access point.
  9. 9. In terms of queues, we will use Qmax to represent the maximum number of packets at the systems queue. The Queue of the system as a whole will be seen as both queues represented by Q, the size of this queue will depend on the values used by the Eq. 12 and 13. −1 N mobile = k p + λTs − s aveTon (12) N ap = s −1 Ts − λTon ave (13) −1 Q = N ap + N mobile = λToff − s ave Toff + k p (14) Now in order to minimize Eq. 14 we will find the value(s) for Tidle = Ts-Ton which minimizes the power consumption under an average inter-arrival rate registered in the previous sample measured by the card. Power (W) 1.6 1.4 1.2 1 Power (W) 0.8 0.6 0.4 0.2 0 0 10 20 30 40 50 60 70 Time (Sec) Figure 6. Average power and duty cycle set by the algorithm (Eq. 8) In order to measure the performance of the algorithm and determine the validity of the assumptions made, we used a mathematical model to measure the probability of congestion as well as determine the appropriate value, depending upon the values of λ and µ. The literature indicates that the M/G/∞, closely represents the system under study. The process of arrival is modeled as Poisson, whereas the service is modeled as Pareto with a rate λ. The average service time for the Pareto distribution is βα ( β − 1) , for β =1 [8, 9]. The count process {X t }t =0,1, 2,... represents the number of elements in the queues in the system at time t. In fact, it can be proved that {Xt} has a Poisson marginal distribution with mean λβα ( β − 1) . Therefore this value can be used in Eq. 12 to determine the average number of elements in the buffers at the access point and mobile unit. Figure 7 shows the queue size of a self-similar model and the values expected if a deterministic model were used, as expected the estimation made by the D/D/1 model
  10. 10. would lead to severe congestion. 7000 7000 6000 6000 5000 5000 Queue Size Queue Size 4000 4000 3000 3000 2000 2000 1000 1000 0 0 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 Time (Sec) Time (S) (a) D/D/1 λ=100, µ=1000 (b) Self-similar λ=100, µ=1000 30000 30000 25000 25000 20000 20000 Queue Size Queue Size 15000 15000 10000 10000 5000 5000 0 0 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 Time (Sec) Time (S) (c) D/D/1 λ=400, µ=1000 (d) Self-similar λ=400, µ=1000 Figure 7. Expected queue size using deterministic and self-similar models at different rates of service and arrival vs. Ton. The associated delay for a case shown in Fig 7.c, when t=58 s is zero, although the power consumption in this scenario cannot be improved since more than 90% of the duty cycle is required to obtain a probability of congestion equals to zero. Although feasible, the range if we set a buffer size of 5000 bytes will yield an average delay of 10 seconds with the duty cycle of 75%. 5. Power management algorithm. Under the assumption that Pareto distributions are scale-invariant [9], in that the probability that the wait is at leas 2x seconds is a fixed fraction of the probability that the wait is at least x, for any value of x=α, we can extrapolate the results presented in Fig. 7 to any time-scale and bandwidth since they will reflect a very similar behavior. Now the idea, in the real implementation tone should maintain a vector of inter-arrival rates and the probability of those such that:  λ1   µ1   n1         λ2  µ   n2  λ=  µ= 2  n=  Μ Μ Μ       λ  µ  n   N  N  N
  11. 11. Both matrices are size 1xN and represent the distribution of the inter-arrival rates measured form the card as well as the number of elements in the queue. Henceforth, λi < λi+1 , µ i < µ i+1 and n i < ni+1 , for all values of i. The vector n should define nN-1 = Qmax while, nN measures the number of elements in the queue whose value is greater than Qmax. As detailed earlier, WMI will be in charge of updating this elements by executing network card queries at certain intervals of time. The vectors λ and n also provide the depended vectors for Pr(λ) , Pr(µ), and Pr(n) and compute the different parameters for the power management algorithm. Hence, the process of finding the appropriate value of Tidle can be found by using: 0. Initialize(WMI, “Exponential”, “Pareto”) 1. Determine(µave, λave, nave) 2. Toff = 1/λave 3. ε = 1/λave2 4. Ton = 1/µave 5. if Toff+Ton ≥ Tscan then 6. find Toff | Pr[n=(Toff + ε)λave) is minimum otherwise Toff = 0 7. else 8. Toff = Tscan - Ton 9. Wait_Timer(Update statistics, Tj) 10. return Toff By determining the average service times, arrival, and number of elements in the system both received and transmitted, we can estimate Toff depending upon the chosen values for service and inter-arrival times. This value will be used as a starting point to further determine the proper value Toff which provides the minimum power consumption while minimizing the congestion probability, especially when the Ton and Tpff values determined are greater than the scan period. Once this case is found, using the Pr(n) table it is easy to determine if congestion can occur if the value previously measured by the statistics vector is above a threshold. This threshold value depends upon the Qmax value and the associated average delay supported by the application. Moreover, we can add that the associated average delay supported by the application in place to the algorithm and within a range of values determine if Tpff has to be zero. One of the main assumptions in this algorithm is the ability of WMI to update the statistic counters appropriately. 6. Implementation The algorithm presented in section 5. is application dependent, and the values for Qmax and the threshold for congestion, as well as expected maximum packet delay depends upon the constraints of the upper layer sources. Some real-time applications might not be
  12. 12. suitable for a power management algorithm; in fact the buffering and delay introduced by the wireless service might disrupt and diminish user experience in those scenarios. Power management should focus on scenarios pertaining non-real time applications, such as e- mail, web-browsing, chatting, and asynchronous downloads. In addition, the proposed algorithm will require the definition of data structures to capture the different values for the required parameters during collection of network statistics phase. typedef struct _NDIS_WLAN_PowerElements { ULONG NumberOfItems; // in list below, at least 1 ULONG NQueue[i]; ULONG Arrival[i] ULONG Service[i] ULONG TimeGranularity; } NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS; The data structure presented above holds the counters corresponding to the number of packets in different bins registered by the wireless card. The structure could be accessed by the wireless service at least in a network scan basis and the wireless service must also update and monitor the structure. Many other issues are required to be studied, for instance if only IEEE 802.11 open/shared authentication method is used with IEEE 802.1X port based access control protocol, the power savings could be increased by switching off the card completely. We have to take into account that during the transition from doze to off state there is an associated delay, but this drawback might not be as important as saving battery life. Home networking scenarios might not require IEEE 802.1X authentication turning the card “on” and “off” will not add any inconveniences. Although the use of IEEE 802.1X might require the reduction in the period of time the card can be switched off by transitioning between the doze-off states as part of the “power savings” mode, depicted in Figure 3. 7. Conclusions and future work The efficient use of the duty cycle of power on wireless cards has a potential benefit of great power savings. The power savings are tightly coupled to the associated delay and probability of congestion on the network. We were able to demonstrate that by using a probabilistic model with self-similar network traffic, the queue size and associated latency can be under-estimated using simpler traffic models. Although it is feasible to provide a power management algorithm based upon the statistical information of network traffic, the feasibility of applying those policies depends greatly on the upper-layer application. Many isochronous applications could be
  13. 13. negatively affected by the process of scheduling the duty cycle of the network card, although many other applications such as email and web-browsing could efficiently provide enough statistical information to reduce the duty cycle, thereby, save power and with a properly sized buffer, also decrease the probability of congestion at the access point and the mobile host. Detecting the network traffic type, whether it follows a deterministic, exponential, or Pareto distributions is an important factor to improve the power management strategy. Further studies are required to optimize the algorithm presented in Section 5 and refine the specification and implementation details to define the structures presented in Section 6. We conclude that we can save as much power as we want by controlling the duty cycle, but this must be driven by the network traffic statistics. Fuzzy-logic controllers and neural networks could be able to provide more adaptive approaches that may have a greater potential for improvement. 8. References [1] T. Simunic, H. Vikalo, P. Glynn, and G. De Michelli, “Energy Efficient Design of Portable Wireless Systems”, ISLPED 2000. [2] B. P. Crow, I . Widjaja, J. G. Kim, And P. T. Sakai. “IEEE 802.11 Wireless Local Area Networks”, IEEE Communications Magazine, Vol. 35, No. 9, September 1997. [3] E. Takahashi “Application aware scheduling for power management in 802.11”, IPCCC 2000, pp. 247-253. [4] C. Hwang, A. Wu. “A predictive System Shutdown Method for Energy Saving of Event-Driven Computation”, Proceedings of the 1997 International Conference on Computer-Aided Design (ICCAD '97), 28-32. [5] X. Gao, X. Gao, J. Tanskanen, S. Ovaska. “Power prediction in mobile communication system using an optimal neural-network structure”, IEEE Transactions on Neural Networks, Vol. 8, No. 4, November 1997, pp. 1446-1445. [6] A. Ayyagari, et. al., “IEEE 802.11 Zero Configuration Approach”, Microsoft Internal Document, January, 2001. [7] M. Grossglausser, J. Bolot, “On the relevance of long-range dependence in network traffic”, IEEE/ACM Transactions on networking, Vol. 7, No. 5, October 1999, pp. 629-640.
  14. 14. [8] V. Paxson, S. Floyd, “Wide Area Traffic: The Failure of Poisson Modeling”, IEEE/ACM Transactions on Networking, Vol. 3, No. 3., June 1995. [9] M. Crovella, L. Lipsky. “Long-Lasting Transient Conditions in simulations with heavy-tailed workloads”, Proceedings of the 1997 Winder Simulation Conference, pp. 1005-1012. [10] A. Erramilli, P. Pruthi, W. Willinger. “Fast and physically-based operation of self-similar network traffic with application to ATM performance evaluation”, Proceedings of the 1997 Winder Simulation Conference, pp. 997-1004. [11] Microsoft Confidential, “Windows Management Instrumentation” Windows 2000 white paper, Redmond, WA, 2000.