You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by maha <ma...@umail.ucsb.edu> on 2011/02/24 03:31:49 UTC
Current available Memory
Hello Everyone,
I'm using " Runtime.getRuntime().freeMemory()" to see current memory available before and after creation of an object, but this doesn't seem to work well with Hadoop?
Why? and is there another alternative?
Thank you,
Maha
Re: Current available Memory
Posted by Yang Xiaoliang <ya...@gmail.com>.
Thanks a lot!
Yang Xiaoliang
2011/2/25 maha <ma...@umail.ucsb.edu>
> Hi Yang,
>
> The problem could be solved using the following link:
> http://www.roseindia.net/java/java-get-example/get-memory-usage.shtml
> You need to use other memory managers like the Garbage collector and its
> finalize method to measure memory accurately.
>
> Good Luck,
> Maha
>
> On Feb 23, 2011, at 10:11 PM, Yang Xiaoliang wrote:
>
> > I had also encuntered the smae problem a few days ago.
> >
> > any one has another method?
> >
> > 2011/2/24 maha <ma...@umail.ucsb.edu>
> >
> >> Based on the Java function documentation, it gives approximately the
> >> available memory, so I need to tweak it with other functions.
> >> So it's a Java issue not Hadoop.
> >>
> >> Thanks anyways,
> >> Maha
> >>
> >> On Feb 23, 2011, at 6:31 PM, maha wrote:
> >>
> >>> Hello Everyone,
> >>>
> >>> I'm using " Runtime.getRuntime().freeMemory()" to see current memory
> >> available before and after creation of an object, but this doesn't seem
> to
> >> work well with Hadoop?
> >>>
> >>> Why? and is there another alternative?
> >>>
> >>> Thank you,
> >>>
> >>> Maha
> >>>
> >>
> >>
>
>
Re: Current available Memory
Posted by maha <ma...@umail.ucsb.edu>.
Hi Yang,
The problem could be solved using the following link: http://www.roseindia.net/java/java-get-example/get-memory-usage.shtml
You need to use other memory managers like the Garbage collector and its finalize method to measure memory accurately.
Good Luck,
Maha
On Feb 23, 2011, at 10:11 PM, Yang Xiaoliang wrote:
> I had also encuntered the smae problem a few days ago.
>
> any one has another method?
>
> 2011/2/24 maha <ma...@umail.ucsb.edu>
>
>> Based on the Java function documentation, it gives approximately the
>> available memory, so I need to tweak it with other functions.
>> So it's a Java issue not Hadoop.
>>
>> Thanks anyways,
>> Maha
>>
>> On Feb 23, 2011, at 6:31 PM, maha wrote:
>>
>>> Hello Everyone,
>>>
>>> I'm using " Runtime.getRuntime().freeMemory()" to see current memory
>> available before and after creation of an object, but this doesn't seem to
>> work well with Hadoop?
>>>
>>> Why? and is there another alternative?
>>>
>>> Thank you,
>>>
>>> Maha
>>>
>>
>>
Re: Current available Memory
Posted by Yang Xiaoliang <ya...@gmail.com>.
I had also encuntered the smae problem a few days ago.
any one has another method?
2011/2/24 maha <ma...@umail.ucsb.edu>
> Based on the Java function documentation, it gives approximately the
> available memory, so I need to tweak it with other functions.
> So it's a Java issue not Hadoop.
>
> Thanks anyways,
> Maha
>
> On Feb 23, 2011, at 6:31 PM, maha wrote:
>
> > Hello Everyone,
> >
> > I'm using " Runtime.getRuntime().freeMemory()" to see current memory
> available before and after creation of an object, but this doesn't seem to
> work well with Hadoop?
> >
> > Why? and is there another alternative?
> >
> > Thank you,
> >
> > Maha
> >
>
>
Re: Current available Memory
Posted by maha <ma...@umail.ucsb.edu>.
Based on the Java function documentation, it gives approximately the available memory, so I need to tweak it with other functions.
So it's a Java issue not Hadoop.
Thanks anyways,
Maha
On Feb 23, 2011, at 6:31 PM, maha wrote:
> Hello Everyone,
>
> I'm using " Runtime.getRuntime().freeMemory()" to see current memory available before and after creation of an object, but this doesn't seem to work well with Hadoop?
>
> Why? and is there another alternative?
>
> Thank you,
>
> Maha
>