



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




This paper describes experiments that model the per- formance of an on-line learning algorithm at predicting when to spin-down a disk in order to save energy. The learning algorithm uses the weighted opinion of a set of experts to decide how long to wait before spinning-down an idle disk. We examined different share and loss func- tions, and tuned the algorithm using a trace of hard-disk idle times. We found that our final algorithm performed as well the best fixed-timeout extracted from the traces.
The experiments in this paper emulate the study on adap- tive spin-down for mobile computers [1]. Please refer to this study for more background; in this report we include minimal background and instead focus on the findings of our experiments.
The goal of our learning algorithm is to save energy consumed by a hard disk. The disk is either active, idle, or spun-down. We do not consider periods when the disk is active because the disk must expend this energy to do its job; we are interested in saving energy when the disk is idle. Energy is measured in units of seconds: when idle, the energy spent equals the duration of the idle pe- riod. When spun-down no energy is expended, however there is a cost for spinning down (and the subsequent spin- up) called spin-down cost , and measured in seconds. For example, if the spin-down cost is 10 seconds, then dur- ing a spin-down/spin-up cycle the disk consumes the same amount of energy as if it remained idle for 10 seconds. An optimal spin-down algorithm knows all future idle periods, and instantly spins-down during each idle period that exceeds the spin-down cost. Obviously, the future is unknown to on-line algorithms, so we would like to come as close to optimal as possible. The optimal algorithm is the basis for our comparisons. A commonly used practice is to spin-down after the disk remains idle for a fixed time- out length. Figure 1 shows the energy spent in seconds for the whole trace using the optimal algorithm, compared to some fixed timeout periods.
The hard-drive trace data used in our experiments was gathered from a system at HP Labs. The data contains the duration of 199724 periods in which the disk was inactive. The total idle time of the trace sums to approximately 5. days. During this period, 20 idle periods lasted more than an hour (with the longest timeout lasting 13 hours). From the trace data we determined the best fixed time- out as a function of spin-down cost. The best fixed time- out with a spin-down cost of 10 seconds is approximately 6 seconds. Interestingly, only 303 idle periods last longer than 6 seconds (
0.2% of the samples), however these periods account for more than 99% of the cumulative idle time. Even a naive strategy of spinning down the disk with a fixed timeout of an hour saves over 70% energy (compared to never spinning down), and a timeout of 10 minutes saves 90%. This is a tricky data set to work with. With a spin- down cost of 10, the optimal algorithm saves 98.7% en- ergy (compared to never spinning down). A fixed-timeout of 1 minute saves 97.4%, and a fixed-timeout of 10 sec- onds saves 98.2%. Using this data set, there isnât a large margin of improvement for smarter algorithms to make. Figure 1 shows the energy used by the optimal algo- rithm and a couple of fixed-timeouts, as a function of spin-down cost. The energy, in seconds, is the total en- ergy consumed over the entire trace. Figure 2 shows a few more representative fixed-timeouts. In this plot, the energy consumed by the fixed-timeout is divided by the optimal energy consumption. We see that different time- outs have minimums at different spin-down cost, however none of the fixed timeouts do much better than about 1. times optimal for any spin-down cost.
The best-fixed timeout is the timeout that provides the most energy conservation when applied to the trace, and can be computed from the trace data. In the original re- port, the length of traces (63 days) made it impractical to compute the best-fixed timeout, so it was approximated. With the shorter trace used in this study, the best-fixed
(^20000 2 4 6 8 10 12 14 16 18 )
4000
6000
8000
10000
12000
14000 Energy Consumed, cello
Spinâdown cost (seconds)
Energy (seconds)
optimum algorithm 60 sec tmo30 sec tmo
Figure 1: The energy consumed by the optimal algorithm compared to several fixed timeouts, as a function of spin- down cost.
(^10 2 4 6 8 10 12 14 16 18 )
2
3
4 Normalized Energy Consumed of Some FixedâTimeouts
Spinâdown cost (seconds)
Ratio of Energy Consumed / Optimum
30 sec tmo10 sec tmo 5 sec tmo1 sec tmo
Figure 2: A normalized energy use of several values of fixed timeouts as a function of spin-down cost.
(^20000 2 4 6 8 10 12 14 16 18 )
3000
4000
5000
6000
7000
8000
9000
10000
11000 Energy Consumed of bestâfixed algorithms
Spinâdown cost (seconds)
Energy (seconds)
optimum best fixedsliding bestâfixed
Figure 3: The energy used by the best-fixed algorithm, and a best-fixed algorithm that periodically changes time- outs (in this figure, it changes timeout 4 times).
timeout is computable. We found the best-fixed timeout by finding the minimum in a range of timeout values, and iteratively reducing the size of the range until the mini- mum was contained within a 0.001 second range. We also determined what we call the sliding best-fixed , by break- ing the trace into four sets and computing the energy per set with each setâs respective best-fixed timeout. As ex- pected, it performs better than a single best-fixed timeout. By increasing the number of sets in the sliding best-fixed algorithm, it approaches optimum (if each set contains 1 sample, it is the optimum algorithm). Figure 3 shows the energy used by these algorithms. The best-fixed algorithm so makes a good target to beat using an on-line learning algorithm.
4 The On-line Learning Algorithm
The on-line algorithm uses the weighted opinion of sev- eral âexpertsâ to decide when to shut-down. Each ex- pert is a fixed-timeout, and so the overall opinion is the weighted average of timeouts. The algorithm is based on the share algorithms that track the best expert, described by Herbster and Warmuth [2]. We used all three variations of the algorithm described in that paper: static-expert, fixed-share, and variable-share. This section discusses our observations.
In order to choose the set of experts for our algorithm, we tried several combinations of linearly and exponentially
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10^5
0
5
10
15
20
25
30
sample number
Highest Weighted Expert vs. Time
Timeâout of expert with highest weight (sec)
Figure 7: The time-out of the leading expert over time. The leading expert is the one with greatest weight using the variable-share algorithm.
Helmbold reports using the variable-share algorithm with
in our model, we did not experience the same improve- ment over best-fixed timeouts that they observed, so we
Figure 6 shows the results of this experiment, with the en-
static experts when the spin-down cost exceeds 12 sec- onds, but performs worse otherwise. To show that different experts gain more influence dur- ing the trace playback, Figure 7 shows the fixed-timeout of the expert with the highest weight as a function of trace
are two periods in which the 30 second timeout domi- nates, but much of time the best expert hovers just below 5 seconds, with many short periods between 15 and 20 seconds.
The Herbster paper describes a fixed-share update for the learning algorithm. We implemented the fixed-share up- date to see how it performed. Figure 8 shows the re- sults of this experiment, with the energy normalized by
as variable-share, however for spin-down costs above 12, the fixed-share algorithm is more sensitive to choice of α, with lower α values performing better. Figure 9 shows the performance of the static-expert,
0.9 2 4 6 8 10 12 14 16 18 20
1
1.5^ Normalized Energy as Function of Alpha (FixedâShare)
Spinâdown cost (seconds)
Energy / Energy of alpha=
alpha=0alpha=0. alpha=0.4alpha=0. alpha=0.
Figure 8: The effect of altering α when using fixed-share.
(^40002 4 6 8 10 12 14 16 18 )
5000
6000
7000
8000
9000
10000
11000 Energy of Several Algorithms
Spinâdown cost (seconds)
Energy (seconds)
bestâfixedstaticâexpert, eta= fixedâshare, eta=10 alpha=.1,variableâshare, etaâ10 alpha=0.
Figure 9: Several of the algorithms described Section 4 compared to optimum and best-fixed.
(^20000 2 4 6 8 10 12 14 16 18 )
3000
4000
5000
6000
7000
8000
9000
10000
11000 Linear Loss Function with FixedâShare
Spinâdown cost (seconds)
Energy/Energy of alpha=
bestâfixed alpha=0alpha=0.
Figure 10: Performance of using a linear-loss function compared to the best-fixed timeout.
variable-share, and fixed-share algorithms using the best tuning parameters. The static-expert performs similar to best-fixed, but slightly worse. However, the share algo- rithms outperform best-fixed when the spin-down cost is greater than 11 seconds.
We looked at two other variations on the algorithms dis- cussed above: different sets of experts, and a different loss function. This section briefly discusses these experiments.
Often in systems problems, past behavior is a good indi- cator of future behavior. We tried using a set of experts that predict the next idle period using the previous idle, or averages of several previous idles. This avenue proved un- fruitful, performing orders of magnitude worse than a sin- gle fixed-timeout (the plots are omitted from this report). Future work may determine if these experts are really that bad, or if there was a bug in the implementation.
Out of curiosity, we changed the loss function to use a linear loss function. Using the notation of the Helmbold
the performance of this algorithm with no share, fixed-
(^20000 2 4 6 8 10 12 14 16 18 )
3000
4000
5000
6000
7000
8000
9000
10000
11000 Energy of Final Algorithm
Spinâdown cost (seconds)
Energy Consumed
final algorithm bestâfixed
Figure 11: The final performance of the final algorithm chosen from our experiments compared the best-fixed timeout.
it does not perform better than best-fixed except at high spin-down cost, therefore we did not pursue using this loss function any further.
Unlike the Helmbold study, we did not find parameters for a weighted-expert algorithm that outperformed a best- fixed timeout for all spin-down costs. By choosing a fixed-share algorithm for spin-down costs less than 12
for spin-down costs 12 and greater, we closely track the performance of the best-fix algorithm (Figure 11). We believe that we can improve performance by using a dif- ferent sets of experts for each spin-down cost instead of using the same set for all trials.
[1] David P. Helmbold, Darrell D. E. Long, Tracey L. Sconyers, and Bruce Sherrod. Adaptive disk spin- down for mobile computers. Mobile Networks and Applications (MONET) Journal , To appear.
[2] Mark Herbster and Manfred K. Warmuth. Tracking the best expert. In Proceedings of the Twelfth Inter- national Conference on Machine Learning , 1995.