Download presentation
Presentation is loading. Please wait.
Published byCathleen Butler Modified over 9 years ago
1
Computers on Cruise Control Creating Adaptive Systems with Control Theory Ricardo Portillo The University of Texas at El Paso raportil@miners.utep.edu
2
The Ultimate Goal: Performance Performance Goals Response Time; Throughput; Execution Time; CPU Utilization How do we increase performance? Tune the application to the system Tune the system to the application I’m going to talk about this
3
Tuning the System to the Application 1. Determine the resource needs of the application 2. Determine what system parameters affect the application’s performance 3. Tune these parameters for optimal management of the application’s resources
4
The Problem: Computer Complexity ► Computers and applications are growing larger ► Systems are becoming more heterogeneous ► Workload characteristics change rapidly
5
The Solution: Automation Requirements ► Monitor if performance goals are being met ► Adapt when performance changes ► Guarantee that an adaptation will produce the desired effect at the right time
6
Analogous Scenario The cruise control in you car Requirements: Monitor desired velocity is being met Adapt accelerator when velocity changes Guarantee that changes produce the desired velocity Cruise Control is implemented with Control Theory!
7
What is Control Theory? Control Theory is: ► A branch of engineering and mathematics ► Deals with systems that change over time Main Goal: Given a desired output from a system, manipulate system inputs to constantly achieve that output. Given a desired output from a system, manipulate system inputs to constantly achieve that output. Fundamental Concept: The Feedback Loop The Feedback Loop
8
The Feedback Loop Controller Target System Disturbance Input Measured Output Desired Output Control Input Desired/Measured Output: Performance Metrics Control Input: Tuning Parameters Disturbance Input: Workload Changes
9
What’s Inside the Controller? ► A difference equation describing the next output as a function of the current input and output: y(k+1) = a*y(k) +b*u(k) y(k+1) = Desired Performance y(k) = Current Performance u(k) = Parameter value to meet desired performance ► Can be rewritten as: u(k) = [y(k+1) - a*y(k)] / b u(k) = [y(k+1) - a*y(k)] / b
10
The Controller Controller u(k) = [y(k+1) - a*y(k)] / b Desired Output y(k+1) Control Input u(k) Measured Output y(k) Receive Current performance y(k) Desired performance y(k+1) Produce Required parameter value u(k)
11
Difference Equation Flexibility ► Want to look more than one time step in the past? Use an ARX model: y(k+1) = a 1 y(k)+…+a n y(k-n+1)+b 1 u(k)+…+b m u(k-m+1) ► Want more than one performance goal satisfied? Produce a separate equation for each performance goal: CPU(k+1) = a 11 CPU(k) + a 12 MEM(k)+b 11 u 1 (k)+b 12 u 2 (k) MEM(k+1) = a 21 CPU(k) + a 22 MEM(k)+b 21 u 1 (k)+b 22 u 2 (k)
12
Getting your Difference Equation 1) Determine your system scope 2) Choose your representative workload 3) Run your experiments: ► Constantly change your parameters while workload is running ► Keep track of the current parameter and performance values and of subsequent performance values 4) Perform a scatter plot analysis on your data to estimate the coefficients of your equation 5) Evaluate your equation and repeat if necessary
13
Server Example 1) Determine your system scope: - Performance Output = CPU Utilization (range 0-1) - Control Input = Number of Users (NU) (range 0-N) - CPU(k+1) = a*CPU(k) + b*NU(k) 2) Choose your representative workload: Some server benchmark (e.g. TPC-C) Some server benchmark (e.g. TPC-C) 3) Run experiments 1) Start up server benchmark 2) Record CPU(k) 3) Change NU(k) 4) Goto step 2 until benchmark ends
14
Experimental Results After least-squares regression analysis: CPU(k+1) = -0.087*CPU(k)+0.19*NU(k) kCPU(k)NU(k)CPU(k+1) 10.6240.72 20.7250.76 30.7650.52 40.5260.91 50.9170.92 60.9280.97 70.9791.52 81.52101.42 91.42111.99 101.9912N/A
15
Controller NU(k) = [0.6 + 0.087*CPU(k)] / 0.19 Desired Output CPU(k+1) -> (e.g. CPU = 0.6) Control Input NU(k) Measured Output CPU(k) Server System Server Feedback Loop
16
Problem: Difference Equation may only work for the next timestep k+1 ► Assume coefficients a = b = 1 =>y(k+1) = y(k) + u(k) => u(k) = y(k+1) – y(k) ► Assume at k = 1; y(k) = 1 and you want goal y(k+1) = 2 u(1)= 2 – 1 = 1 u(1)= 2 – 1 = 1 -> u(1)=1 will produce y(k+1)=2 -> Performance goal met at k=2 ► What’s the value of y(k) at k=3? y(3) = y(2) + u(2) = 2 + 1 = 3 -> Goal not met at k=3! ► As k grows ? y(k+1) = y(k) + 1 Performance metric will keep increasing until u(k) is remodified
17
Example that at least converges ► Assume coefficients a = b = 0.5 =>y(k+1) = 0.5*y(k) + 0.5*u(k) => u(k) = [y(k+1) – 0.5*y(k)] / 0.5 ► Assume k = 1; y(k) = 1 and you want goal y(k+1) = 2 u(1) = [2 –.5*1]/.5 = 3 u(1) = [2 –.5*1]/.5 = 3 -> u(1) = 3 will produce y(k+1) = 2 -> Performance goal met at k=2 ► What’s the value of y(k) at k=3? y(3) =.5*y(2) +.5*u(2) =.5*2 +.5*3 = 2.5 Goal not met at k=3! ► But… as k grows ? y(k+1) = {2.75, 2.87, 2.93, 2.96, 2.98,…} Performance metric converges to 3 if left unchecked ► A system is stable if performance converges when control input changes ► A system is accurate if it converges to the right performance value
18
Criteria for a Good Controller ► Stability: Measured performance must converge to some value when control inputs are modified ► Accuracy: Measured performance must converge to the performance goal when control inputs are modified ► Short Settling: Measured performance must converge to the performance goal quickly when control inputs are modified
19
How can We Evaluate the Criteria? ► Convert your difference equation into a non- recursive function by applying a Z-transform ► Apply Control Theory theorems to your non- recursive function to assess: If your equation always converges (Stability) To what value will it converge (Accuracy) How fast will it converge (Settling Time)
20
Advanced Control Theory ► Gain Scheduling: Allows different controllers to be swapped at runtime. ► Self-Tuning Regulators: Enables the creation of difference equations at runtime using recursive least-squares analysis. ► Fuzzy Controllers: Applies heuristics written in symbolic logic when modifying control inputs. Used when system characterization is qualitative instead of quantitative.
21
Control Theory in Practice ► Data Networks: Much work in data flow control for TCP protocols ► Multimedia: Work on maintaining real-time performance constraints on data streams ► Server and DB Software: Most popular application of CT recently. DB2 contains CT based performance tuning ► Autonomic Computing Initiative: Applies holistic CT approach to large systems. Started in 2001 by IBM.
22
Future of CT in Computing ► Apply CT not only for regulatory performance control but also to performance optimization (e.g. with Fuzzy controllers) ► Automate the design of controllers (e.g. with Self-tuning regulators) ► Incorporate artificial intelligence to create and manage adaptive systems at runtime (e.g. with agent based computing)
23
In Summary ► Systems are becoming too complex to manage without automation ► Control Theory provides a systematic method of integrating adaptation into a system ► Control Theory is well established and easily maps to computing environments
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.