280 likes | 835 Views
Auto Scaling. 2012/04/30. Introduction. Auto-scaling is a technique that dynamically adjust the resource utilization for an application based on actual workload demand. Resource utilization: the amount of resource that can be used (by an application) in an fixed time interval.
E N D
Auto Scaling 2012/04/30
Introduction • Auto-scaling is a technique that dynamically adjust the resource utilization for an application based on actual workload demand. • Resource utilization: the amount of resource that can be used (by an application) in an fixed time interval.
Why We Need Auto-scaling? • Workloads of an application can be fluctuating and unpredictable. • Neither over-provision nor under-provision is a good solution. • Over-provision: costly and make resource under-utilization. • Under-provision: performance suffering.
Advantages of Auto-scaling • From user perspective: • Only pay for the virtual machines in need. • Money-saving. • From cloud provider perspective: • Only deploy those virtual machines in need to physical servers. • Power-saving and money-saving.
Scaling Algorithms • Majority vote • For general applications • Workload-based • For web applications • Trend prediction • For applications with periodic workload
Majority Vote • Majority Vote selects the choice with the most props among all choices. • Each virtual machine makes choice according to the chosen standard metrics. • A final scaling decision is made by majority vote. • Add/remove one VM at a time. • Improvement: scale multiple VMs at a time.
Workload-based • Workload-based determines the number of VMs needed based on the current workload, which is request per second. • Decision maker makes scaling decisions according to the difference between the number of VMs needed and the number of current running VMs. • Add/remove multiple VMs at a time.
Trend Prediction • Trend prediction acts as a helper for scaling algorithms. • Trend is the direction of workload change. • Instead of accurately predict the workload value, we focus on the trend only. • If a scale-in decision contradict with the trend, it will be canceled.
Performance Prediction • Predict the performance according to the current status of running VMs. • If current performance is going to violate SLA, scale out. • “Parameter selection” • Select metrics that can significantly affect the performance of an application.
Our Approach Workloads Application Performance VM Status (Standard metrics) Dimension Reduction
Our Approach(Cont.) • We apply different amount of workloads to N VMs and collect corresponding VM status and performance. • Workload: requests/sec. • N: 1~10 • Apply PCA to exploit the relation between metrics.
Principle Component Analysis[1] • A mathematical procedure that uses an orthogonal transformation to convert a set of observations of possibly correlated variables into a set of values of uncorrelated variables called principal components. [1] http://en.wikipedia.org/wiki/Principal_component_analysis
Dimension Reduction CPU, Load_one, Load_five, Load_fifteen PCA CPU’ pkg_in, pkg_out, byte_in, byte_out PCA Network’ Memory Memory’
Our Approach(Cont.) • Having the three new dimensions(CPU’, Memory’, Network’), apply regression analysis. • Use SPSS to do regression analysis. • y =a1*CPU’ + a2*Memory’ + a3*Network’ + a4 • y is the predict performance of an application.
Issues • 目前有提供Auto-scaling機制的cloud providers(Amazon)或software(Scalr, Rightscale)都需要使用者提供scaling threshold。如何能夠自動決定,或者根本不使用threshold來做auto-scaling。 • Performance prediction. • Cloud provider本身提供的服務可以知道workload類型,但是使用者上傳 applications的workload較難掌握。是否有除了請使用者提供workload資訊外的解決方法。 • Can affect workload-based algorithm and performance prediction.
Issues(Cont.) • Auto scaling在遇到大流量的時候如何分辨是否為DDoS攻擊。 • Block DDoSinstead of scaling.