Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

(PFC307) Auto Scaling: A Machine Learning Approach | AWS re:Invent 2014

1,960 views

Published on

Auto Scaling groups used in conjunction with auto-scaling policies define when to scale out or scale in instances. These policies define actionable states based on a defined event and time frame (e.g., add instance when CPU utilization is greater than 90% for 5 consecutive minutes). In this session, Electronic Arts (EA) discusses a pro-active approach to scaling. You learn how to analyze past resource usage to help pre-emptively determine when to add or remove instances for a given launch configuration. Past data is retrieved via Amazon CloudWatch APIs, and the application of supervised machine learning models and time series smoothing is discussed.

Published in: Technology

(PFC307) Auto Scaling: A Machine Learning Approach | AWS re:Invent 2014

  1. 1. November 12, 2014, Las Vegas NV Sumit Amar, Electronic Arts
  2. 2. varclient = newAmazon.CloudWatch.AmazonCloudWatchClient(); varresponse = client.GetMetricStatistics( newGetMetricStatisticsRequest{ Dimensions = newList<Dimension> { newDimension{ Name = "InstanceId", Value = instanceId} }, StartTime= startDate, //2014-11-05EndTime= endDate.Date.AddDays(1).Date.AddMilliseconds(-1), //2014-11-06, Namespace = "AWS/EC2", Statistics = newList<string>{ "Average", "Maximum", "Minimum","Sum","SampleCount"}, MetricName= metricName, //CPUUtilization, DiskReadBytes, NetworkIn, more etc.. Period = interval, //seconds –pass 60 * 60 for an hourly range}); //### CloudWatchGetMetricsStatisticsreturns unordered data points, ergo.. response.Datapoints.Sort((a,b) => a.Timestamp.CompareTo(b.Timestamp));
  3. 3. Y = a + b X Time Actual(Y) Deviation X(from mid) XY X2 Yd 8am 83 -3 -249 9 72.22 9am 60 -2 -120 4 61.29 10am 54 -1 -54 1 50.36 11am 21 0 0 0 39.43 12p 22 1 22 1 28.50 1p 13 2 26 4 17.57 2p 23 3 69 9 6.64 N=7 Σ푌 = 276 ΣX=0 ΣXY=-306 ΣX2=28 Here: Y = a + b X a = Σ푌/푁 = 276/7 = 39.43 b = Σ푋푌 Σ푋2 = -306/28 = -10.93 Y = 39.43 – 10.93 X For X = -3 (8am): Y8am = 39.43 – (10.93 * -3) = 72.22 and so on for other times. ΣY = Na + b ΣX ΣXY = a ΣX + b ΣX2
  4. 4. ΣY = Na + b ΣX + c ΣX2 ΣXY = a ΣX + b ΣX2 + c ΣX3 ΣX2Y = a ΣX2 + b ΣX3 + c ΣX4 Yd = a + b X + c X2 ΣY = Na + c ΣX2 ΣXY = b ΣX2 ΣX2Y = a ΣX2 + c ΣX4
  5. 5. EWMA Article EWMA on Wikipediak-NN lecturek-NN on WikipediaMSESSE Machine Learning Coursesa722@nova.edu
  6. 6. http://bit.ly/awsevals

×