You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Udara Liyanage <ud...@wso2.com> on 2014/05/04 06:12:48 UTC
How loadAverage is calculated
Hi,
Doc[1] says the formula to calculate loadAverage is as below.
(loadAvg/cores)*100
Is loadAvg same as CPU usage we get when "top" command is executed?
[1]
https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
--
Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
Re: How loadAverage is calculated
Posted by Imesh Gunaratne <im...@apache.org>.
"The system load average is the sum of the number of runnable entities
queued to the available processors and the number of runnable entities
running on the available processors averaged over a period of time. The way
in which the load average is calculated is operating system specific but is
typically a damped time-dependent average."
http://docs.oracle.com/javase/6/docs/api/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()
On Sun, May 4, 2014 at 9:42 AM, Udara Liyanage <ud...@wso2.com> wrote:
> Hi,
>
> Doc[1] says the formula to calculate loadAverage is as below.
>
> (loadAvg/cores)*100
>
> Is loadAvg same as CPU usage we get when "top" command is executed?
>
> [1]
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PPMC Member, Apache Stratos
Re: How loadAverage is calculated
Posted by Lakmal Warusawithana <la...@wso2.com>.
Please see [1]
[1]http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
On Sun, May 4, 2014 at 8:54 PM, Isuru Perera <is...@wso2.com> wrote:
> On Sun, May 4, 2014 at 7:48 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>>
>> Hi Isuru,
>>
>> I had a looked at the code. Load average is already calculated as a
>> percentage. (Loadaverage/noOfCores)100
>>
> I know about the code. I'm just asking is there any *reference* to say
> that this is the correct way to get the load average as a percentage?
>
>>
>>
>> Touched, not typed. Erroneous words are a feature, not a typo.
>>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>
--
Lakmal Warusawithana
Director - Cloud Architecture; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/
Re: How loadAverage is calculated
Posted by Isuru Perera <is...@wso2.com>.
On Sun, May 4, 2014 at 7:48 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
> Hi Isuru,
>
> I had a looked at the code. Load average is already calculated as a
> percentage. (Loadaverage/noOfCores)100
>
I know about the code. I'm just asking is there any *reference* to say that
this is the correct way to get the load average as a percentage?
>
>
> Touched, not typed. Erroneous words are a feature, not a typo.
>
--
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware
about.me/chrishantha
Re: How loadAverage is calculated
Posted by Udara Liyanage <ud...@wso2.com>.
Hi Isuru,
I had a looked at the code. Load average is already calculated as a
percentage. (Loadaverage/noOfCores)100
Touched, not typed. Erroneous words are a feature, not a typo.
Re: How loadAverage is calculated
Posted by Isuru Perera <is...@wso2.com>.
Load Average from top command is not a percentage, but is there any
reference how we can convert that value as a percentage?
On Sat, May 3, 2014 at 11:26 PM, Udara Liyanage <ud...@wso2.com> wrote:
> Hi Nirmal,
>
> Thanks for the clarification.
>
>
> On Sun, May 4, 2014 at 6:12 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>> load average: 0.48, 0.34, 0.27
>>
>>
>> On Sun, May 4, 2014 at 11:41 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>> Hi Udara,
>>>
>>> Load average outputted from top command is not a percentage:
>>>
>>>
>>>
>>> On Sun, May 4, 2014 at 11:31 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi Nirmal,
>>>>
>>>> top command output load as a percentage, I want to know why it is again
>>>> multiplied by 100.
>>>>
>>>>
>>>> On Sun, May 4, 2014 at 5:42 AM, Nirmal Fernando <nirmal070125@gmail.com
>>>> > wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, May 4, 2014 at 9:42 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Doc[1] says the formula to calculate loadAverage is as below.
>>>>>>
>>>>>> (loadAvg/cores)*100
>>>>>>
>>>>>> Is loadAvg same as CPU usage we get when "top" command is executed?
>>>>>>
>>>>>
>>>>> No, but you can find load averages too from top command.
>>>>>
>>>>>>
>>>>>> [1]
>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
>>>>>> --
>>>>>>
>>>>>> Udara Liyanage
>>>>>> Software Engineer
>>>>>> WSO2, Inc.: http://wso2.com
>>>>>> lean. enterprise. middleware
>>>>>>
>>>>>> web: http://udaraliyanage.wordpress.com
>>>>>> phone: +94 71 443 6897
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>
--
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware
about.me/chrishantha
Re: How loadAverage is calculated
Posted by Udara Liyanage <ud...@wso2.com>.
Hi Nirmal,
Thanks for the clarification.
On Sun, May 4, 2014 at 6:12 AM, Nirmal Fernando <ni...@gmail.com>wrote:
> load average: 0.48, 0.34, 0.27
>
>
> On Sun, May 4, 2014 at 11:41 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>> Hi Udara,
>>
>> Load average outputted from top command is not a percentage:
>>
>>
>>
>> On Sun, May 4, 2014 at 11:31 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi Nirmal,
>>>
>>> top command output load as a percentage, I want to know why it is again
>>> multiplied by 100.
>>>
>>>
>>> On Sun, May 4, 2014 at 5:42 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>>>
>>>>
>>>>
>>>>
>>>> On Sun, May 4, 2014 at 9:42 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Doc[1] says the formula to calculate loadAverage is as below.
>>>>>
>>>>> (loadAvg/cores)*100
>>>>>
>>>>> Is loadAvg same as CPU usage we get when "top" command is executed?
>>>>>
>>>>
>>>> No, but you can find load averages too from top command.
>>>>
>>>>>
>>>>> [1]
>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
>>>>> --
>>>>>
>>>>> Udara Liyanage
>>>>> Software Engineer
>>>>> WSO2, Inc.: http://wso2.com
>>>>> lean. enterprise. middleware
>>>>>
>>>>> web: http://udaraliyanage.wordpress.com
>>>>> phone: +94 71 443 6897
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>
--
Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
Re: How loadAverage is calculated
Posted by Nirmal Fernando <ni...@gmail.com>.
load average: 0.48, 0.34, 0.27
On Sun, May 4, 2014 at 11:41 AM, Nirmal Fernando <ni...@gmail.com>wrote:
> Hi Udara,
>
> Load average outputted from top command is not a percentage:
>
>
>
> On Sun, May 4, 2014 at 11:31 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi Nirmal,
>>
>> top command output load as a percentage, I want to know why it is again
>> multiplied by 100.
>>
>>
>> On Sun, May 4, 2014 at 5:42 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>>
>>>
>>>
>>> On Sun, May 4, 2014 at 9:42 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Doc[1] says the formula to calculate loadAverage is as below.
>>>>
>>>> (loadAvg/cores)*100
>>>>
>>>> Is loadAvg same as CPU usage we get when "top" command is executed?
>>>>
>>>
>>> No, but you can find load averages too from top command.
>>>
>>>>
>>>> [1]
>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>
--
Best Regards,
Nirmal
Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.
Blog: http://nirmalfdo.blogspot.com/
Re: How loadAverage is calculated
Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Udara,
Load average outputted from top command is not a percentage:
On Sun, May 4, 2014 at 11:31 AM, Udara Liyanage <ud...@wso2.com> wrote:
> Hi Nirmal,
>
> top command output load as a percentage, I want to know why it is again
> multiplied by 100.
>
>
> On Sun, May 4, 2014 at 5:42 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>>
>>
>>
>> On Sun, May 4, 2014 at 9:42 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Doc[1] says the formula to calculate loadAverage is as below.
>>>
>>> (loadAvg/cores)*100
>>>
>>> Is loadAvg same as CPU usage we get when "top" command is executed?
>>>
>>
>> No, but you can find load averages too from top command.
>>
>>>
>>> [1]
>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>
--
Best Regards,
Nirmal
Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.
Blog: http://nirmalfdo.blogspot.com/
Re: How loadAverage is calculated
Posted by Udara Liyanage <ud...@wso2.com>.
Hi Nirmal,
top command output load as a percentage, I want to know why it is again
multiplied by 100.
On Sun, May 4, 2014 at 5:42 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>
>
> On Sun, May 4, 2014 at 9:42 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> Doc[1] says the formula to calculate loadAverage is as below.
>>
>> (loadAvg/cores)*100
>>
>> Is loadAvg same as CPU usage we get when "top" command is executed?
>>
>
> No, but you can find load averages too from top command.
>
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>
--
Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
Re: How loadAverage is calculated
Posted by Nirmal Fernando <ni...@gmail.com>.
On Sun, May 4, 2014 at 9:42 AM, Udara Liyanage <ud...@wso2.com> wrote:
> Hi,
>
> Doc[1] says the formula to calculate loadAverage is as below.
>
> (loadAvg/cores)*100
>
> Is loadAvg same as CPU usage we get when "top" command is executed?
>
No, but you can find load averages too from top command.
>
> [1]
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Sample+Auto-scaling+Policy+Definition
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>
--
Best Regards,
Nirmal
Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.
Blog: http://nirmalfdo.blogspot.com/