Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB3CA10504 for ; Sat, 7 Mar 2015 14:50:02 +0000 (UTC) Received: (qmail 20922 invoked by uid 500); 7 Mar 2015 14:50:02 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 20863 invoked by uid 500); 7 Mar 2015 14:50:02 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 20853 invoked by uid 99); 7 Mar 2015 14:50:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2015 14:50:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 07 Mar 2015 14:49:41 +0000 Received: (qmail 20701 invoked by uid 99); 7 Mar 2015 14:49:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2015 14:49:38 +0000 Date: Sat, 7 Mar 2015 14:49:38 +0000 (UTC) From: "Lahiru Sandaruwan (JIRA)" To: dev@stratos.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (STRATOS-1211) Introducing "curve fitting" for stat prediction algorithm of Autoscaler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STRATOS-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14351614#comment-14351614 ] Lahiru Sandaruwan commented on STRATOS-1211: -------------------------------------------- Hi, Great, Raj and i both will be co-mentoring the project. Get some understanding on Gsoc as this is your first project. Let us know if you need any assistance on any matter. We can schedule face2face or online meetings if you need, as we are also based in Sri Lanka. Thanks. > Introducing "curve fitting" for stat prediction algorithm of Autoscaler > ----------------------------------------------------------------------- > > Key: STRATOS-1211 > URL: https://issues.apache.org/jira/browse/STRATOS-1211 > Project: Stratos > Issue Type: Bug > Components: Autoscaler, CEP > Reporter: Lahiru Sandaruwan > Labels: gsoc2015 > Fix For: FUTURE > > > This is a summery of a mail sent to Stratos dev under "[Autoscaling] [Improvement] Introducing "curve fitting" for stat prediction algorithm of Autoscaler" subject. > Current implementation > Currently CEP calculates average, gradient, and second derivative and send those values to Autoscaler. Then Autoscaler predicts the values using S = u*t + 0.5*a*t*t. > In this method CEP calculation is not very much accurate as it does not consider all the events when calculating the gradient and second derivative. Therefore the equation we apply doesn't yield the best prediction. > Proposed Implementation > CEP's task > I think best approach is to do "curve fitting"[1] for received event sample in a particular time window. Refer "Locally weighted linear regression" section at [2] for more details. > We would need a second degree polynomial fitter for this, where we can use Apache commons math library for this. Refer the sample at [3], we can run this with any degree. e.g. 2, 3. Just increase the degree to increase the accuracy. > E.g. > So if get degree 2 polynomial fitter, we will have an equation like below where value(v) is our statistic value and time(t) is the time of event. > Equation we get from received events, > v = a*t*t + b*t + c > So the solution is, > Find memberwise curves that fits events received in specific window(say 10 minutes) at CEP > Send the parameters of fitted line(a, b, and c in above equation) with the timestamp of last event(T) in the window, to Autoscaler > Autoscaler's task > Autoscaler use v = a*t*t + b*t + c function to predict the value in any timestamp from the last timestamp > E.g. Say we need to find the value(v) after 1 minute(assuming we carried all the calculations in milliseconds), > v = a * (T+60000) * (T+60000) + b * (T+60000) + c > So we have memberwise predictions and we can find clusterwise prediction by averaging all the memberwise values. -- This message was sent by Atlassian JIRA (v6.3.4#6332)