We're using JRuby in an app server, and the app server needs to keep
track of the sizes of running applications within it while running for
monitoring, to detect leaks, and to limit resources if necessary. What
I'm looking for is a way to write a method in Java that returns the
approximate size of an org.jruby.Ruby instance (and, if possible the
total size of all the Ruby objects in ObjectSpace).

It sounds like there's nothing like that available within JRuby itself
(nor do I see anything like it in my brief poking around in the source
code).

Jim

On Fri, Dec 19, 2008 at 12:22 AM, Charles Oliver Nutter
<[email protected]> wrote:
> And there's certainly a wide variety of tools for monitoring JVM memory use;
> at least one of them ought to be able to give you a total from
> org.jruby.Ruby on down.
>
> avishek.dasgupta wrote:
>>
>> I assume you meant 'JRuby'
>> Since JRuby uses the JVM, you can get the memory data using jconsole. If
>> you
>> are just interested in the Total memory being used by the JVM you can use
>> something like the task manager in Windows.
>>
>> Jim Menard wrote:
>>>
>>> Does anybody know how I could calculate the amount of memory taken up
>>> by an instance of Ruby while running? Even a method for calculating a
>>> rough estimate would be helpful.
>>>
>>> Jim
>>> --
>>> Jim Menard, [email protected], [email protected]
>>> http://www.io.com/~jimm/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>



-- 
Jim Menard, [email protected], [email protected]
http://www.io.com/~jimm/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to