You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Lahiru Sandaruwan <la...@wso2.com> on 2014/11/08 15:27:32 UTC

[Autoscaling]Instance count rounding algorithm

Hi all,

I'm working on $subject. When we predict the instance count from statistics
and dependency based ratio in application, we will get numbers with
fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance count
for creating instances in IaaS.


I have thought of three types to choose from.


   1. Floor
   2. Ceiling
   3. Custom percentage

#3 means, user can give a limit of fraction to decide whether to round to
floor or ceiling.

e.g. User fives fraction as 0.2,

Instance count 3.1 Rounded value 3
Instance count 3.21: Rounded value 4
Instance count 1.19: Rounded value 1

Feel free to give feedback.

Thanks.




-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: [Autoscaling]Instance count rounding algorithm

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
On Sat, Nov 8, 2014 at 8:24 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

>
>
> On Sat, Nov 8, 2014 at 8:14 PM, Rajkumar Rajaratnam <ra...@wso2.com>
> wrote:
>
>> Oh, I think I am confused here. Ignore the previous mail.
>>
>> But #3 can cover all the scenario :)
>>
>
> Yes. User can input 0 for #1 and 1 for #2. May be we can just have one
> option to the users then.
>

Yes. #3 is enough.

Thanks.


>
>> Thanks.
>>
>> On Sat, Nov 8, 2014 at 8:07 PM, Rajkumar Rajaratnam <ra...@wso2.com>
>> wrote:
>>
>>> Hi Lahiru,
>>>
>>> #3 includes #1 and #2.
>>>
>>> If user input < 0.5 implies #1
>>> If user input >= 0.5 implies #2
>>>
>>> IMO, we can go with only #3.
>>>
>>> wdyt?
>>>
>>> Thanks.
>>>
>>> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm working on $subject. When we predict the instance count from
>>>> statistics and dependency based ratio in application, we will get numbers
>>>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>>>> count for creating instances in IaaS.
>>>>
>>>>
>>>> I have thought of three types to choose from.
>>>>
>>>>
>>>>    1. Floor
>>>>    2. Ceiling
>>>>    3. Custom percentage
>>>>
>>>> #3 means, user can give a limit of fraction to decide whether to round
>>>> to floor or ceiling.
>>>>
>>>> e.g. User fives fraction as 0.2,
>>>>
>>>> Instance count 3.1 Rounded value 3
>>>> Instance count 3.21: Rounded value 4
>>>> Instance count 1.19: Rounded value 1
>>>>
>>>> Feel free to give feedback.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> Raj
>>>
>>
>>
>>
>> --
>> Raj
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Raj

Re: [Autoscaling]Instance count rounding algorithm

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Sat, Nov 8, 2014 at 8:14 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

> Oh, I think I am confused here. Ignore the previous mail.
>
> But #3 can cover all the scenario :)
>

Yes. User can input 0 for #1 and 1 for #2. May be we can just have one
option to the users then.

>
> Thanks.
>
> On Sat, Nov 8, 2014 at 8:07 PM, Rajkumar Rajaratnam <ra...@wso2.com>
> wrote:
>
>> Hi Lahiru,
>>
>> #3 includes #1 and #2.
>>
>> If user input < 0.5 implies #1
>> If user input >= 0.5 implies #2
>>
>> IMO, we can go with only #3.
>>
>> wdyt?
>>
>> Thanks.
>>
>> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> I'm working on $subject. When we predict the instance count from
>>> statistics and dependency based ratio in application, we will get numbers
>>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>>> count for creating instances in IaaS.
>>>
>>>
>>> I have thought of three types to choose from.
>>>
>>>
>>>    1. Floor
>>>    2. Ceiling
>>>    3. Custom percentage
>>>
>>> #3 means, user can give a limit of fraction to decide whether to round
>>> to floor or ceiling.
>>>
>>> e.g. User fives fraction as 0.2,
>>>
>>> Instance count 3.1 Rounded value 3
>>> Instance count 3.21: Rounded value 4
>>> Instance count 1.19: Rounded value 1
>>>
>>> Feel free to give feedback.
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> Raj
>>
>
>
>
> --
> Raj
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: [Autoscaling]Instance count rounding algorithm

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Oh, I think I am confused here. Ignore the previous mail.

But #3 can cover all the scenario :)

Thanks.

On Sat, Nov 8, 2014 at 8:07 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

> Hi Lahiru,
>
> #3 includes #1 and #2.
>
> If user input < 0.5 implies #1
> If user input >= 0.5 implies #2
>
> IMO, we can go with only #3.
>
> wdyt?
>
> Thanks.
>
> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi all,
>>
>> I'm working on $subject. When we predict the instance count from
>> statistics and dependency based ratio in application, we will get numbers
>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>> count for creating instances in IaaS.
>>
>>
>> I have thought of three types to choose from.
>>
>>
>>    1. Floor
>>    2. Ceiling
>>    3. Custom percentage
>>
>> #3 means, user can give a limit of fraction to decide whether to round to
>> floor or ceiling.
>>
>> e.g. User fives fraction as 0.2,
>>
>> Instance count 3.1 Rounded value 3
>> Instance count 3.21: Rounded value 4
>> Instance count 1.19: Rounded value 1
>>
>> Feel free to give feedback.
>>
>> Thanks.
>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Raj
>



-- 
Raj

Re: [Autoscaling]Instance count rounding algorithm

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi Lahiru,

#3 includes #1 and #2.

If user input < 0.5 implies #1
If user input >= 0.5 implies #2

IMO, we can go with only #3.

wdyt?

Thanks.

On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi all,
>
> I'm working on $subject. When we predict the instance count from
> statistics and dependency based ratio in application, we will get numbers
> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
> count for creating instances in IaaS.
>
>
> I have thought of three types to choose from.
>
>
>    1. Floor
>    2. Ceiling
>    3. Custom percentage
>
> #3 means, user can give a limit of fraction to decide whether to round to
> floor or ceiling.
>
> e.g. User fives fraction as 0.2,
>
> Instance count 3.1 Rounded value 3
> Instance count 3.21: Rounded value 4
> Instance count 1.19: Rounded value 1
>
> Feel free to give feedback.
>
> Thanks.
>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Raj

Re: [Autoscaling]Instance count rounding algorithm

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Sat, Nov 8, 2014 at 9:06 PM, Reka Thirunavukkarasu <re...@wso2.com> wrote:

> Hi
>
> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi all,
>>
>> I'm working on $subject. When we predict the instance count from
>> statistics and dependency based ratio in application, we will get numbers
>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>> count for creating instances in IaaS.
>>
>>
>> I have thought of three types to choose from.
>>
>>
>>    1. Floor
>>    2. Ceiling
>>    3. Custom percentage
>>
>> #3 means, user can give a limit of fraction to decide whether to round to
>> floor or ceiling.
>>
>> e.g. User fives fraction as 0.2,
>>
>> Instance count 3.1 Rounded value 3
>> Instance count 3.21: Rounded value 4
>> Instance count 1.19: Rounded value 1
>>
>> Feel free to give feedback.
>>
>
> +1 to use #3 as it covers all the scenarios. But how are we going to
> handle the ratio between dependent cartridges? For e.g.:
>
>  If C1:C2 = 2:3 where C1 and C2 are dependent clusters, then we got the
> instance count to be scaled up for C1 as 1.19 by the statistics of C1 which
> will scale C1 by 1. Then the relative instance count to be scaled for C2
> can be either decided by (1/2)*3 or against with the existing count of C1
> and C2. Are we going to use the same fraction to keep the ratio as well,
> since even the ratio calculation won't be round figures all the time?
>
>
I think we should keep same fraction for dependency ratio as well. We can
keep value we get as required instance count as a fraction itself per
cluster.
If we get a higher value from stats or dependency ratio, we will replace
this value always.

wdyt?

Thanks.

Thanks,
Reka

>
> Thanks.
>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007





-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: [Autoscaling]Instance count rounding algorithm

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi

On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi all,
>
> I'm working on $subject. When we predict the instance count from
> statistics and dependency based ratio in application, we will get numbers
> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
> count for creating instances in IaaS.
>
>
> I have thought of three types to choose from.
>
>
>    1. Floor
>    2. Ceiling
>    3. Custom percentage
>
> #3 means, user can give a limit of fraction to decide whether to round to
> floor or ceiling.
>
> e.g. User fives fraction as 0.2,
>
> Instance count 3.1 Rounded value 3
> Instance count 3.21: Rounded value 4
> Instance count 1.19: Rounded value 1
>
> Feel free to give feedback.
>

+1 to use #3 as it covers all the scenarios. But how are we going to handle
the ratio between dependent cartridges? For e.g.:

 If C1:C2 = 2:3 where C1 and C2 are dependent clusters, then we got the
instance count to be scaled up for C1 as 1.19 by the statistics of C1 which
will scale C1 by 1. Then the relative instance count to be scaled for C2
can be either decided by (1/2)*3 or against with the existing count of C1
and C2. Are we going to use the same fraction to keep the ratio as well,
since even the ratio calculation won't be round figures all the time?

Thanks,
Reka

>
> Thanks.
>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: [Autoscaling]Instance count rounding algorithm

Posted by Lahiru Sandaruwan <la...@wso2.com>.
I have done the changes so that we can specify this value in Autoscaling
policy.

Thanks.

On Sat, Nov 8, 2014 at 8:35 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

>
>
> On Sat, Nov 8, 2014 at 8:32 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>>
>>
>> On Sat, Nov 8, 2014 at 8:26 PM, Rajkumar Rajaratnam <ra...@wso2.com>
>> wrote:
>>
>>> Hi Lahiru,
>>>
>>> Are you going to make all three configurable via autoscaler xml? or How
>>> you are going to do?
>>>
>>>
>> IMO it should be a part of Autoscaling policy.
>>
>
> Yes. This is also a good idea. Since we are allowing a user to update the
> autoscale policies at run time, he can change this value later if he wants.
> +1 include this in autoscale policy.
>
> Thanks.
>
>
>> Thanks.
>>>
>>> On Sat, Nov 8, 2014 at 8:22 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Sat, Nov 8, 2014 at 8:06 PM, Nirmal Fernando <nirmal070125@gmail.com
>>>> > wrote:
>>>>
>>>>> Why not simply round the value to nearest integer?
>>>>> http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#round(float)
>>>>>
>>>>
>>>> It is not the industry practice. AWS guys use a more complex
>>>> algorithms. But we can start with suggested options.
>>>>
>>>> Because some users might have the luxury of going for ceiling(may be an
>>>> on premise IaaS) where others do not(Public IaaS).
>>>>
>>>>
>>>>
>>>>> On Sat, Nov 8, 2014 at 3:28 PM, Lahiru Sandaruwan <la...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> /s/fives/gives
>>>>>>
>>>>>> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I'm working on $subject. When we predict the instance count from
>>>>>>> statistics and dependency based ratio in application, we will get numbers
>>>>>>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>>>>>>> count for creating instances in IaaS.
>>>>>>>
>>>>>>>
>>>>>>> I have thought of three types to choose from.
>>>>>>>
>>>>>>>
>>>>>>>    1. Floor
>>>>>>>    2. Ceiling
>>>>>>>    3. Custom percentage
>>>>>>>
>>>>>>> #3 means, user can give a limit of fraction to decide whether to
>>>>>>> round to floor or ceiling.
>>>>>>>
>>>>>>> e.g. User fives fraction as 0.2,
>>>>>>>
>>>>>>> Instance count 3.1 Rounded value 3
>>>>>>> Instance count 3.21: Rounded value 4
>>>>>>> Instance count 1.19: Rounded value 1
>>>>>>>
>>>>>>> Feel free to give feedback.
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> --
>>>>>>> Lahiru Sandaruwan
>>>>>>> Committer and PMC member, Apache Stratos,
>>>>>>> Senior Software Engineer,
>>>>>>> WSO2 Inc., http://wso2.com
>>>>>>> lean.enterprise.middleware
>>>>>>>
>>>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> Lahiru Sandaruwan
>>>>>> Committer and PMC member, Apache Stratos,
>>>>>> Senior Software Engineer,
>>>>>> WSO2 Inc., http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> Raj
>>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Raj
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: [Autoscaling]Instance count rounding algorithm

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
On Sat, Nov 8, 2014 at 8:32 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

>
>
> On Sat, Nov 8, 2014 at 8:26 PM, Rajkumar Rajaratnam <ra...@wso2.com>
> wrote:
>
>> Hi Lahiru,
>>
>> Are you going to make all three configurable via autoscaler xml? or How
>> you are going to do?
>>
>>
> IMO it should be a part of Autoscaling policy.
>

Yes. This is also a good idea. Since we are allowing a user to update the
autoscale policies at run time, he can change this value later if he wants.
+1 include this in autoscale policy.

Thanks.


> Thanks.
>>
>> On Sat, Nov 8, 2014 at 8:22 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> On Sat, Nov 8, 2014 at 8:06 PM, Nirmal Fernando <ni...@gmail.com>
>>> wrote:
>>>
>>>> Why not simply round the value to nearest integer?
>>>> http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#round(float)
>>>>
>>>
>>> It is not the industry practice. AWS guys use a more complex algorithms.
>>> But we can start with suggested options.
>>>
>>> Because some users might have the luxury of going for ceiling(may be an
>>> on premise IaaS) where others do not(Public IaaS).
>>>
>>>
>>>
>>>> On Sat, Nov 8, 2014 at 3:28 PM, Lahiru Sandaruwan <la...@wso2.com>
>>>> wrote:
>>>>
>>>>> /s/fives/gives
>>>>>
>>>>> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I'm working on $subject. When we predict the instance count from
>>>>>> statistics and dependency based ratio in application, we will get numbers
>>>>>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>>>>>> count for creating instances in IaaS.
>>>>>>
>>>>>>
>>>>>> I have thought of three types to choose from.
>>>>>>
>>>>>>
>>>>>>    1. Floor
>>>>>>    2. Ceiling
>>>>>>    3. Custom percentage
>>>>>>
>>>>>> #3 means, user can give a limit of fraction to decide whether to
>>>>>> round to floor or ceiling.
>>>>>>
>>>>>> e.g. User fives fraction as 0.2,
>>>>>>
>>>>>> Instance count 3.1 Rounded value 3
>>>>>> Instance count 3.21: Rounded value 4
>>>>>> Instance count 1.19: Rounded value 1
>>>>>>
>>>>>> Feel free to give feedback.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> Lahiru Sandaruwan
>>>>>> Committer and PMC member, Apache Stratos,
>>>>>> Senior Software Engineer,
>>>>>> WSO2 Inc., http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Lahiru Sandaruwan
>>>>> Committer and PMC member, Apache Stratos,
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc., http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> Raj
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Raj

Re: [Autoscaling]Instance count rounding algorithm

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Sat, Nov 8, 2014 at 8:26 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

> Hi Lahiru,
>
> Are you going to make all three configurable via autoscaler xml? or How
> you are going to do?
>
>
IMO it should be a part of Autoscaling policy.

> Thanks.
>
> On Sat, Nov 8, 2014 at 8:22 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>>
>>
>> On Sat, Nov 8, 2014 at 8:06 PM, Nirmal Fernando <ni...@gmail.com>
>> wrote:
>>
>>> Why not simply round the value to nearest integer?
>>> http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#round(float)
>>>
>>
>> It is not the industry practice. AWS guys use a more complex algorithms.
>> But we can start with suggested options.
>>
>> Because some users might have the luxury of going for ceiling(may be an
>> on premise IaaS) where others do not(Public IaaS).
>>
>>
>>
>>> On Sat, Nov 8, 2014 at 3:28 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>> /s/fives/gives
>>>>
>>>> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm working on $subject. When we predict the instance count from
>>>>> statistics and dependency based ratio in application, we will get numbers
>>>>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>>>>> count for creating instances in IaaS.
>>>>>
>>>>>
>>>>> I have thought of three types to choose from.
>>>>>
>>>>>
>>>>>    1. Floor
>>>>>    2. Ceiling
>>>>>    3. Custom percentage
>>>>>
>>>>> #3 means, user can give a limit of fraction to decide whether to round
>>>>> to floor or ceiling.
>>>>>
>>>>> e.g. User fives fraction as 0.2,
>>>>>
>>>>> Instance count 3.1 Rounded value 3
>>>>> Instance count 3.21: Rounded value 4
>>>>> Instance count 1.19: Rounded value 1
>>>>>
>>>>> Feel free to give feedback.
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Lahiru Sandaruwan
>>>>> Committer and PMC member, Apache Stratos,
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc., http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Raj
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: [Autoscaling]Instance count rounding algorithm

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi Lahiru,

Are you going to make all three configurable via autoscaler xml? or How you
are going to do?

Thanks.

On Sat, Nov 8, 2014 at 8:22 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

>
>
> On Sat, Nov 8, 2014 at 8:06 PM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>
>> Why not simply round the value to nearest integer?
>> http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#round(float)
>>
>
> It is not the industry practice. AWS guys use a more complex algorithms.
> But we can start with suggested options.
>
> Because some users might have the luxury of going for ceiling(may be an on
> premise IaaS) where others do not(Public IaaS).
>
>
>
>> On Sat, Nov 8, 2014 at 3:28 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>> /s/fives/gives
>>>
>>> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm working on $subject. When we predict the instance count from
>>>> statistics and dependency based ratio in application, we will get numbers
>>>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>>>> count for creating instances in IaaS.
>>>>
>>>>
>>>> I have thought of three types to choose from.
>>>>
>>>>
>>>>    1. Floor
>>>>    2. Ceiling
>>>>    3. Custom percentage
>>>>
>>>> #3 means, user can give a limit of fraction to decide whether to round
>>>> to floor or ceiling.
>>>>
>>>> e.g. User fives fraction as 0.2,
>>>>
>>>> Instance count 3.1 Rounded value 3
>>>> Instance count 3.21: Rounded value 4
>>>> Instance count 1.19: Rounded value 1
>>>>
>>>> Feel free to give feedback.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> Lahiru Sandaruwan
>>>> Committer and PMC member, Apache Stratos,
>>>> Senior Software Engineer,
>>>> WSO2 Inc., http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Raj

Re: [Autoscaling]Instance count rounding algorithm

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Sat, Nov 8, 2014 at 8:06 PM, Nirmal Fernando <ni...@gmail.com>
wrote:

> Why not simply round the value to nearest integer?
> http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#round(float)
>

It is not the industry practice. AWS guys use a more complex algorithms.
But we can start with suggested options.

Because some users might have the luxury of going for ceiling(may be an on
premise IaaS) where others do not(Public IaaS).



> On Sat, Nov 8, 2014 at 3:28 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> /s/fives/gives
>>
>> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> I'm working on $subject. When we predict the instance count from
>>> statistics and dependency based ratio in application, we will get numbers
>>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>>> count for creating instances in IaaS.
>>>
>>>
>>> I have thought of three types to choose from.
>>>
>>>
>>>    1. Floor
>>>    2. Ceiling
>>>    3. Custom percentage
>>>
>>> #3 means, user can give a limit of fraction to decide whether to round
>>> to floor or ceiling.
>>>
>>> e.g. User fives fraction as 0.2,
>>>
>>> Instance count 3.1 Rounded value 3
>>> Instance count 3.21: Rounded value 4
>>> Instance count 1.19: Rounded value 1
>>>
>>> Feel free to give feedback.
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: [Autoscaling]Instance count rounding algorithm

Posted by Nirmal Fernando <ni...@gmail.com>.
Why not simply round the value to nearest integer?
http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#round(float)

On Sat, Nov 8, 2014 at 3:28 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> /s/fives/gives
>
> On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi all,
>>
>> I'm working on $subject. When we predict the instance count from
>> statistics and dependency based ratio in application, we will get numbers
>> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
>> count for creating instances in IaaS.
>>
>>
>> I have thought of three types to choose from.
>>
>>
>>    1. Floor
>>    2. Ceiling
>>    3. Custom percentage
>>
>> #3 means, user can give a limit of fraction to decide whether to round to
>> floor or ceiling.
>>
>> e.g. User fives fraction as 0.2,
>>
>> Instance count 3.1 Rounded value 3
>> Instance count 3.21: Rounded value 4
>> Instance count 1.19: Rounded value 1
>>
>> Feel free to give feedback.
>>
>> Thanks.
>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: [Autoscaling]Instance count rounding algorithm

Posted by Lahiru Sandaruwan <la...@wso2.com>.
/s/fives/gives

On Sat, Nov 8, 2014 at 7:57 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi all,
>
> I'm working on $subject. When we predict the instance count from
> statistics and dependency based ratio in application, we will get numbers
> with fraction. E.g. 1.2, 3.9, 4.5. Therefore we have to round the instance
> count for creating instances in IaaS.
>
>
> I have thought of three types to choose from.
>
>
>    1. Floor
>    2. Ceiling
>    3. Custom percentage
>
> #3 means, user can give a limit of fraction to decide whether to round to
> floor or ceiling.
>
> e.g. User fives fraction as 0.2,
>
> Instance count 3.1 Rounded value 3
> Instance count 3.21: Rounded value 4
> Instance count 1.19: Rounded value 1
>
> Feel free to give feedback.
>
> Thanks.
>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146