Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jacob R. Lorch Microsoft Research

Similar presentations


Presentation on theme: "Jacob R. Lorch Microsoft Research"— Presentation transcript:

1 Jacob R. Lorch Microsoft Research
Using User Interface Event Information in Dynamic Voltage Scaling Algorithms Jacob R. Lorch Microsoft Research Alan Jay Smith University of California, Berkeley 11th International Symposium on Modeling, Analysis, and Simulation of Computer and Telecommunication Systems October 13, 2003

2 Outline Background and motivation
What is dynamic voltage scaling? Why are user interface events important in deciding what speed and voltage to run the CPU? Questions about user interface events What do we want to know about user interface events that can help design voltage scaling algorithms? Methodology Trace-driven analysis Analysis results What have we learned about the design of DVS algorithms? Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

3 Dynamic voltage scaling
The ability to quickly and efficiently change CPU supply voltage without rebooting Appearing on commercial CPU’s (Transmeta, AMD, Intel) Reducing voltage reduces energy consumption – E α V2 Lowering voltage necessitates lowering speed When is lower energy worth the lower speed? When we can meet deadlines at less than maximum speed Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

4 User interface tasks How can we detect tasks?
Real-time environment (uncommon) Application instrumentation (impractical and unlikely) Automatic inference Inference from user interface events Response time must be ms, giving deadline estimate Goal: make sure all work the system does to satisfy a user interface event completes by the deadline Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

5 Estimating task CPU need
Speed to use depends on expected CPU need Classic approach Run at CPU requirement divided by deadline PACE approach Speed up as task progresses so that if task is short we use low speed and voltage throughout Optimal speed schedule depends on probability distribution of CPU need Task Kc Task Kc Probability Speed Task Kc Cycles Time Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

6 Questions How much of the CPU’s time is spent on user interface events? Is there an efficient heuristic to find when user interface tasks end? How often does handling user interface events require waiting for I/O? How quickly should we run the CPU to achieve good response time goals for user interface tasks? Which DVS algorithms work best for user interface tasks? Is there significant enough difference between different user interface events that a DVS algorithm should handle them differently? Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

7 Methodology Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

8 Trace-driven analysis
Typically, voltage scaling algorithms are evaluated on short benchmarks Reflect artificial workload We use traces to answer questions about the “real world.” What applications get used and how often How much CPU time real applications use VTrace runs in background on Windows machines collecting info on threads, user interface events, etc. Over 1,800 hours of activity on eight users’ machines Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

9 Identifying tasks Event Thing that can cause a thread to do something new Response Time thread runs between events Dependent event Event triggered during response to other event Trigger event Event not dependent on another Task All responses transitively dependent on trigger event A C A D A C B C D D Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

10 Analysis Results Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

11 How much of the CPU’s time is spent on user interface events?
Conclusion: User interface tasks are only part of the answer to task inference. Timer messages may provide additional opportunities to detect tasks and deadlines. Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

12 Can we detect task completion efficiently?
Inferring task boundaries online is high-overhead Must track what responses caused what events Requires much interposition Simpler approach: consider UI task complete when… idle thread is running and no I/O is ongoing, or next UI event arrives Conclusion: This approach works well, except it may produce wrong results for certain applications. Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

13 How often do UI tasks wait for I/O?
DVS algorithms must treat I/O time specially I/O power, time do not scale with CPU speed Mouse clicks require I/O frequently, but other UI types do not Conclusion: Anticipating I/O time is important for mouse click tasks, but less so for other UI tasks. Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

14 How fast should we run UI tasks?
CDF of task CPU needs reveals suggests speed needed before deadline e.g., 99.5% of mouse moves would finish in 50 ms at 266 MHz Conclusion: Mouse moves require minimal speed. Keystrokes need faster speeds, and mouse clicks require the most; no single speed works for all users, so dynamic evaluation is important. Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

15 Which DVS algorithm is best for UI tasks?
Keystroke tasks Mouse click tasks Comparison of Flat (constant speed); Past/Peg (use min, then max); Stepped (constant acceleration); PACE (optimal) PACE always best, Stepped generally 2nd; PACE vs. Stepped: 7.3% less energy for keystrokes, 2.8% less for mouse clicks Conclusion: Use PACE. If too much complexity or overhead, consider Stepped, especially for mouse clicks. Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

16 How best to estimate task CPU needs?
When a task starts, we estimate its CPU needs based on recent past tasks’ CPU needs: 8.2 Kc 3.1 Kc 4.0 Kc 2.1 Kc 5.3 Kc 6.3 Kc 4.2 Kc 5.1 Kc ??? past future Task Kc Task Kc Probability Speed Task Kc Task Kc Time Cycles PACE formula Distribution estimation Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

17 Separating tasks into groups
Tasks fall into different groups (e.g., enter keypresses in Excel vs. left mouse clicks in Word): 8.2 Kc 3.1 Kc 4.0 Kc 2.1 Kc 5.3 Kc 6.3 Kc 4.2 Kc 5.1 Kc ??? past future Only basing prediction on similar tasks can improve prediction. Task Kc Task Kc Probability Speed Task Kc Task Kc Time Cycles PACE formula Distribution estimation Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

18 Overdoing task separation
If you make the distinctions too fine, there may be few tasks in the same group to match: 8.2 Kc 3.1 Kc 4.0 Kc 2.1 Kc 5.3 Kc 6.3 Kc 4.2 Kc 5.1 Kc ??? past future Too many groups means you make your prediction based on little (or old) information. Task Kc Probability Speed Time Cycles PACE formula Distribution estimation Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

19 Does task grouping help or hurt prediction?
Tested four means of task grouping N (None): Every task in same group A (Application): Tasks in same app are in same group C (Category): Tasks of same category (e.g., all “enter” keypresses) are in same group CA (Category/Application): Separate group for each category and application combination Measured average error in predicting CPU need, i.e., just the mean of the distribution N worst, CA best – differences significant Keystroke tasks Conclusion: Fine task grouping helps prediction. Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

20 Does task grouping save energy?
Keystroke tasks Mouse click tasks To evaluate prediction of entire distribution, we simulated PACE Results the same as for predicting mean: N worst, CA best Conclusion: Fine task grouping helps prediction, which leads to energy savings. But, savings are minute, so fine grouping is only worthwhile if it adds virtually no complexity or overhead. Using User Interface Event Information in Dynamic Voltage Scaling Algorithms

21 Conclusions User interface tasks are a useful source of task information for DVS algorithms, but only account for 20.3% of CPU time Our simple heuristic for task completion detection works well for most applications Mouse click tasks wait for I/O frequently Mouse movements require only minimal speed PACE is the best DVS algorithm, but Stepped saves nearly as much energy and is simpler Task grouping improves task CPU use prediction, but energy savings from such grouping are small Using User Interface Event Information in Dynamic Voltage Scaling Algorithms


Download ppt "Jacob R. Lorch Microsoft Research"

Similar presentations


Ads by Google