• 沒有找到結果。

The flowchart and pseudo codes of the proposed algorithm

Chapter 3 Proposed AH-DPM Algorithm

3.2 The flowchart and pseudo codes of the proposed algorithm

Fig. 3-1 and Fig. 3-3 show the flowchart and the pseudo codes of the proposed AH-DPM algorithm, respectively. If a request arrives and the SP is in the ON period, Ton_avg and Ttimeout_last are updated accordingly, as shown in line 7 to line 8 of Fig. 3-3. On the other hand, if a request arrives and the SP is in the OFF period, two circumstances must be considered.

First, if Tidle is larger than or equal to TBE, the algorithm has made a correct prediction that the SP is actually in the OFF period. This circumstance is called a prediction hit and Toff_avg will be updated accordingly, as shown in line 14 of Fig. 3-3. Second, if Tidle is smaller than TBE, this is called a prediction miss since in the OFF period Tidle must be larger than TBE. In this case, Ton_avg and Ttimeout_last are updated instead of Toff_avg, and Pexpect is set to ON_period, as shown in line 18 to line 19 of Fig. 3-3. Once a request is served and the SQ is empty, the SP becomes idle. Then, the SP will be switched to an inactive state SSP_next with timeout value Ttimeout. SSP_next will be assigned using algorithm InactiveState, as shown in Fig. 3-2. Algorithm InactiveState is used to determine which inactive state the SP will enter. It calculates TBE of

each inactive state, and save it into BE_List. BE_List is an array that stores TBE of each inactive state. BE_List is then sorted in the descending order. Toff_avg will be compared with each TBE. If Toff_avg is greater than or equal to a certain TBE, the inactive state corresponding to the previous TBE in BE_List will be returned to algorithm AH-DPM, as shown from line 6 to line 14 in Fig. 3-2. If Ttimeout expires, the SP will be switched to state SSP_next and Pexpect will be set to OFF_period. In the meantime, the timeout iteration mechanism mentioned in section 3.1 starts. A new inactive state and TBE will be set to SSP_next and Ttimeout accordingly, as shown from lines 34 to 35 in Fig. 3-3.

Fig. 3-1. The flowchart of the proposed AH-DPM algorithm.

01 algorithm InactiveState(SSP_current, Toff_avg) 02 {

03 calculate each TBE which relates to each inactive state and SSP_current, and save them into BE_List 04 sort BE_List in descending order

05 Sret = SSP_current

06 for(index = 0; index < the size of BE_List; index++) 07 {

08 if(Toff_avg >= BE_List[index])

09 {

10 Sret = the inactive state corresponding to BE_LIST[index]

11 break;

12 }

13 } 14 return Sret

15 }

Fig. 3-2. Inactive state decision algorithm.

01 algorithm AH-DPM(SSP_current, Tidle)

26 else if(SP has finished serving a request and SQ is empty) 27 {

28 SSP_next = InactiveState(SSP_current, Toff_avg) 29 Ttimeout = Ttimeout_last

37 Return SSP_next and Ttimeout

38 }

Fig. 3-3. The proposed AH-DPM algorithm.

Chapter 4

Experimental Results and Discussion

4.1 Experimental setup

We compare our algorithm (AH-DPM) with the oracle algorithm (Oracle), the static timeout algorithm (STO) with timeout value of 30 seconds [2], the adaptive timeout algorithm (ATO) of Douglis et al. [7] with parameters (αm, βm, ρ) = (0.5, 1.5, 0.1) [2] and initial timeout value of 30 seconds [2], the predictive algorithm (Predictive) of Huang et al. [11] with parameters α = 0.3 and c = 2 [2], the stochastic (Stochastic) algorithm of Benini et al [14], and the machine learning (ML) algorithm of Dhiman et al [21]. Remind that the oracle algorithm is a theoretically optimal algorithm because it knows the arrival time of all requests; therefore, the algorithm can determine exactly when and to which state the SP should be switched for power saving. The Stochastic algorithm does not need to set any initial value, but the optimal decision policies must be calculated in advance. The ML algorithm uses STO, ATO, Predictive, and Stochastic algorithms as its experts. The parameters of each expert used in the ML algorithm are same as those listed above. Since the oracle algorithm is aware of all the requests issued from the beginning to the end, it can come out with the most power efficient results. The AlwaysOn algorithm is defined as “always keeping the SP in the active state,” and represents the worst case of average power consumption and the best case of average response

time (average packet transmission delay) in hard disk (WLAN NIC) experiments.

In the hard disk experiments, we used a typical hard disk specification of Hitachi Travelstar 5K100 as an example SP specification, as shown in Table 4-1 and Table 4-2 [26].

The state transition diagram of Hitachi Travelstar 5K100 is shown in Fig. 4-1. Note that state transitions between Performance Idle, Active Idle, and Low Power Idle are hardware controlled; thus cannot be controlled by the user or operating system. We use dotted lines to represent the hardware-controlled state transitions. The hard disk request traces were collected for a week by monitoring the ATA commands sent and received by libATA drivers under Fedora 12 [27], kernel version 2.6.32.11 [28]. The trace characteristics of hard disk requests for each day of the week are listed in Table 4-3. We compare the average power consumption and average response time for the hard disk among these DPM algorithms. The average power consumption is measured in Watt, and it is defined as total energy consumed divided by total elapsed time. The average response time is measured in millisecond and it is defined as the average elapsed time between a request arrived and the request having been served, which includes the queuing delay and service time of a request.

As to the WLAN NIC experiments, we used the specification of the Intel PRO/Wireless 3945ABG (802.11g) card, which is shown in Table 4-4 [29]. However, the state transition time and state transition power of the Intel PRO/Wireless 3945ABG card are not available.

We used the state transition time listed in [30]. The state transition power from sleep to idle is set to twice of the power consumption in idle state, and the state transition power from idle to

sleep is set to the power consumption in sleep state [31]. The state transition characteristics of the WLAN NIC are listed in Table 4-5, and the associated state transition diagram is illustrated in Fig. 4-2. In addition, the real traces of the WLAN NIC were captured using Wireshark [32], version 1.2.6, under Fedora 12 [27]. The trace characteristics of WLAN NIC packets for each day of the week are listed in Table 4-6. The average power consumption and average packet transmission delay are metrics of the WLAN NIC for performance evaluation

among these DPM algorithms. The definition of the average power consumption is identical to that for the hard disk and the average packet transmission delay is measured in millisecond, and it is defined as the queuing delay plus the packet transmission time.

Finally, we also evaluate the prediction miss rate and the inactivation ratio, which will be defined later. The prediction miss rate can reflect the average power consumption and the inactivation ratio can reflect the average response time in the hard disk and the average transmission delay in the WLAN NIC. There are two cases of prediction miss: false positive prediction and false negative prediction. A positive prediction is that the PM decides to

inactivate the SP, and a negative prediction is that the PM decides NOT to inactivate the SP.

Therefore, the false positive prediction occurs in a situation that the PM inactivates the SP (i.e., switching the SP to a lower power consumption state), but the length of the inactive period is shorter than the break-even time. That is, the SP should not be inactivated, but it is inactivated. The false negative prediction occurs in a situation that the PM keeps the SP in active state, but the length of the idle period is longer than the break-even time. That is, the SP should be inactivated, but it is not inactivated. Both cases will result in extra power

consumption penalty. According to the definitions of false positive prediction and false negative prediction, the definition of the prediction miss rate Rprediction_miss is as follows:

𝑅

𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑛_𝑚𝑝𝑚𝑚

=

𝑁𝑓𝑓_𝑚𝑚𝑚𝑚𝑁 +𝑁𝑓𝑓_𝑚𝑚𝑚𝑚

𝑓𝑝𝑝𝑝𝑚𝑝𝑝𝑚𝑝𝑓 (2)

where Nfp_miss is the number of false positive prediction, Nfn_miss is the number of false negative prediction, and Nprediction is the total number of predictions made by the PM. The definition of the inactivation ratio Rinactivate is defined as follows:

𝑅

𝑝𝑛𝑖𝑝𝑝𝑝𝑖𝑖𝑝𝑝

=

𝑁𝑁𝑚𝑓𝑖𝑝𝑝𝑚𝑖𝑖𝑝𝑝

𝑓𝑝𝑝𝑝𝑚𝑝𝑝𝑚𝑝𝑓 (3) where Ninactivate is the number of switching the SP from the active state to an inactive state (a lower power consumption state). When the SP is in an inactive state and a request arrives, the SP must switch to the active state in order to serve the request. Since existing DPM algorithms, except the oracle algorithm, did not actually implement the pre-wakeup mechanism, an incoming request will be queued in the SQ waiting for the SP to be switched from an inactive state to the active state. Therefore, it results in queuing delay. Since each SP’s inactivation will lengthen the queuing delay of the next incoming request, the higher the inactivation ratio is, the longer the average response time of the hard disk and the average packet transmission delay of the WLAN NIC are.

Table 4-1. State transition time and power consumption specifications of Hitachi Travelstar 5K100 hard disk [26].

From To Time Active Idle Performance Idle 0.02 2.0

Performance Idle Standby 0.35 2.0

Performance Idle Sleep 0.35 2.0

Table 4-2. Power consumption specification of Hitachi Travelstar 5K100 hard disk [26].

State Power consumption

Fig. 4-1. The state transition diagram of Hitachi Travelstar 5K100 hard disk.

Table 4-3. Trace characteristics of hard disk requests.

Day of Week Number

Requests of

𝑇

𝑅𝑅

𝜎

𝑇𝑅𝑅

Sunday 148175 0.5826582132 28.066745610 Monday 273503 0.3158121481 7.576979263 Tuesday 90081 0.9588597164 13.238787090 Wednesday 190393 0.4537697663 7.577420349 Thursday 532259 0.1623176762 3.813604001 Friday 128420 0.6725806881 10.876428390 Saturday 46820 1.8449750100 18.263384880 A week 1409651 0.4289868597 11.847667333

𝑇𝑅𝑅: Average request inter-arrival time (sec)

𝜎𝑇𝑅𝑅: Standard deviation of the request inter-arrival time

Table 4-4. Power consumption specification of Intel PRO/Wireless 3945ABG WLAN NIC [29].

State Power consumption

Table 4-5. State transition time and power consumption of the WLAN NIC [29][30].

From To Time

(μsec) Power consumption (Watt)

Sleep Idle 250 0.3

Idle Sleep 80 0.03

Fig. 4-2. The state transition diagram of the WLAN NIC.

4.2 Experimental results

Fig. 4-3 shows the experimental results of the average power consumption of the hard disk for each DPM algorithm on each day of a week. In Fig. 4-3, we found that the proposed AH-DPM algorithm is always better than the other algorithms except the oracle algorithm under the request trace of each day in a week. By observing Table 4-3 and Fig. 4-3, we found that average power consumption is proportional to number of requests, except the case on Tuesday. The average power consumption on Tuesday is still higher in spite of a lower number of requests. This is because of a higher inactivation ratio on Tuesday, as shown in Fig.

4-5. Since a higher inactivation ratio implies a higher number of state transitions, the power consumption increases due to frequent state transitions. As to the average response time, Fig.

4-4 shows that the proposed AH-DPM algorithm is larger than the ATO, AlwaysOn, ML, Oracle, and STO algorithms, and is shorter than the Predictive algorithm. By observing Fig.

4-4 and Fig. 4-5, we found that average response time is proportional to inactivation ratio.

This is because that if the SP is in an inactivated state and there is an incoming request, the SP

Table 4-6. Trace characteristics of WLAN NIC traffic.

Day of Week Number

Requests of

𝑇

𝑃𝑅

𝜎

𝑇𝑃𝑅

Sunday 68812 1.2524797900 13.271983260 Monday 24697 3.0321168550 43.423190660 Tuesday 48308 1.6348761390 218.246429500 Wednesday 115253 0.7495722815 10.870117770 Thursday 183500 0.4701362994 8.127996827 Friday 13013 6.5880108190 73.593723700 Saturday 8164 10.4842361800 93.448664130 A week 461747 1.2648289645 73.980365017

𝑇𝑃𝑅: Average packet inter-arrival time (sec)

𝜎𝑇𝑃𝑅: Standard deviation of the packet inter-arrival time

must be switched to the active state to serve the request. Since no existing DPM algorithms have the ability to switch the SP to the active state in advance, the request must be queued in the SQ to wait for the SP to switch from an inactive state to the active state. Therefore, a larger inactivation ratio will result in longer response time.

Fig. 4-3. Comparison of the average power consumption of the hard disk

Fig. 4-4. Comparisons of the average response time of the hard disk.

Fig. 4-5. Comparisons of the inactivation ratio of the hard disk.

Fig. 4-6 and Fig. 4-7 are the comparison of average power consumption and average response time in a week for the hard disk, respectively. In Fig. 4-6, we observed that the average power consumption of the proposed AH-DPM is 30.41% worse than that of the oracle algorithm, and is better than that of the ATO, ML, Predictive, STO, and Stochastic algorithms by 78.34%, 99.28%, 124.97%, 93.45%, and 294.63%, respectively. That is, the proposed AH-DPM algorithm performed the best except the oracle algorithm in terms of average power consumption. Remind that the oracle algorithm is theoretically optimal. Since the prediction miss will cause extra power consumption, we derive the prediction miss rate of each algorithm. In Fig. 4-8, we found that the prediction miss rate of the proposed AH-DPM algorithm is the lowest compared to that of the other DPM algorithms except the oracle algorithm. The results are in accordance with those illustrated in Fig. 4-6. Although the average response time of the proposed AH-DPM algorithm in Fig. 4-7 is not the best, it is still lower than that of the Predictive algorithm by 33.04% and it is also lower than the average disk access time specified in a hard disk specification [26]. According to this specification [26], the average response time for read/write one byte from/to the hard disk is about 20.5 ms (command overhead + average seek time + average latency + average disk-buffer data transfer rate). Therefore, the average response time of the proposed AH-DPM algorithm, which is 19.375 ms as shown in Fig. 4-7, is lower than 20.5 ms, and it meets the hard disk specification.

Fig. 4-6. Comparison of the average power consumption of the hard disk in a week.

Fig. 4-7. The comparison of average response time of the hard disk in a week.

We also evaluate the average power consumption and average packet transmission delay on each day of a week for each DPM algorithm. In Fig. 4-9, we found that the average power consumption of the proposed AH-DPM is comparable to that of the ATO, Oracle, and Predictive algorithms, and is better than that of the ML, STO, and Stochastic algorithms.

However, in terms of average packet transmission delay, the proposed AH-DPM algorithm is better than the ATO and Predictive algorithms, as shown in Fig. 4-10. Fig. 4-11 illustrates the inactivation ratio of the WLAN NIC. Through Fig. 4-10 and Fig. 4-11, we can confirm that the average transmission delay is also proportional to the inactivation ratio except the Saturday case. This is because the average packet arrival rate is low on that Saturday, which can be observed from Table 4-6. Lower average packet arrival rate implies less bursty of the packet arrival pattern, which leads to the decrease of the queuing delay caused by bursty

Fig. 4-8. The prediction miss rate of the hard disk in a week.

Fig. 4-9. Comparisons of average power consumption of the WLAN NIC.

Fig. 4-10. Comparisons of average packet transmission delay of the WLAN NIC.

Fig. 4-12 and Fig. 4-13 illustrate the average power consumption and average packet transmission delay of the WLAN NIC in a week for different DPM algorithms, respectively.

In Fig. 4-12, we observed that the average power consumption of the AH-DPM algorithm is comparable to (0.7% more than) that of the ATO, Oracle, and Predictive algorithms, and is better than that of the ML, STO, and Stochastic algorithms by 169.99%, 89.14%, and 369.01%, respectively. Note that although the prediction miss rate of the proposed AH-DPM algorithm is the best, as shown in Fig. 4-14, compared with the other algorithms except the oracle algorithm, the average power consumption of the AH-DPM algorithm is still slightly larger than that of the ATO and Predictive algorithm. This is because that the average timeout value of the AH-DPM algorithm is larger than that of the ATO and Predictive algorithms, as

Fig. 4-11. Comparison of inactivation ratio of the WLAN NIC.

illustrated in Fig. 4-15. That is, the proposed AH-DPM has a higher prediction hit rate that can reduce more power consumption (see Fig. 4-12) and decrease more packet transmission delay (see Fig. 4-13); however, the minor penalty is a longer timeout value that causes slightly larger power consumption.

As to the average packet transmission delay, Fig. 4-13 shows that the proposed AH-DPM algorithm is better than the ATO and Predictive algorithms by 23.22% and 25.18%, and is worse than the ML, STO, and Stochastic algorithms by 41.36%, 41.05%, and 38.22%, respectively.

Fig. 4-12. Average power consumption of the WLAN NIC in a week.

Fig. 4-13. Average packet transmission delay of the WLAN NIC in a week.

Fig. 4-14. Prediction miss rate of the WLAN NIC in a week.

In summary, considering the tradeoff between average power consumption and average response time (average packet transmission delay), the proposed AH-DPM algorithm performs the best among the DPM algorithms, except the oracle algorithm, for the hard disk and the WLAN NIC. Since our work derives the average idle time in the ON period and OFF period separately and uses the average idle time in the ON period to determine the timeout value, we can set the timeout value long enough to decrease the false positive prediction miss rate and keep the timeout value short enough to decrease the false negative prediction miss rate. By decreasing these two types of prediction miss rates, the proposed algorithm can reduce unnecessary power consumption of the SP. In addition, the proposed algorithm also adapts to the SP that has multiple inactive states by using the average idle time in the OFF period to decide which inactive state the SP should be switched to. Such adaptation can

Fig. 4-15. The average timeout value of the WLAN NIC in a week.

further decrease the power consumption of the SP because we can choose a better inactive state according to the average idle time in the OFF period. The longer idle time of the SP in the OFF period, the deeper inactive state the SP can be switched to.

4.3 Discussion

In Fig. 4-4, we observed that the average response time on Tuesday and Saturday are higher than that in the other days. This is because that the average request inter-arrival time on Tuesday and Saturday are longer than those on the other days, as shown in Table 4-3. A longer average request inter-arrival time implies a higher probability to inactivate a component.

Because of lacking the pre-wakeup mechanism for each DPM algorithm, except the Oracle algorithm, the SP will only be waked up when a request arrived. Therefore, the average response time will increase due to the state transition time penalty while waking up the SP.

The performance of the ATO algorithm [7] is highly correlated with the SP’s state transition time from an inactive state to the active state, called wakeup state transition time, and the request arrival pattern. The ATO algorithm will increase the timeout value if the wakeup state transition time of the SP is larger than the latest idle time of the SP, and will decrease the timeout value otherwise. If the wakeup state transition time is smaller (larger) than the idle time in a period with bursty request arrivals, the ATO algorithm will decrease (increase) the timeout value rapidly. For the hard disk, since the wakeup state transition time, which are 3.5 seconds from Sleep to Performance Idle and 2.5 seconds from Standby to Performance Idle (see Table 4-1), is larger than the idle time of the SP during a bursty request

arrivals period, it will cause the timeout value to be increased rapidly. A larger timeout value means a lower probability to inactivate the SP, which results in higher power consumption of the ATO algorithm. As to the WLAN NIC, the wakeup state transition time of the ATO

arrivals period, it will cause the timeout value to be increased rapidly. A larger timeout value means a lower probability to inactivate the SP, which results in higher power consumption of the ATO algorithm. As to the WLAN NIC, the wakeup state transition time of the ATO

相關文件