You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Changdeok Kang <ch...@samsung.com> on 2009/02/02 00:50:49 UTC

Re: Question about memory usage of deployed service

I was just observing OS process memory usage by "top".

Actually the next-day, the memory usage scores initial value.

I think that the garbage collection is not executed at once. Am I right?

Additionally, how can I check the java heap memory status on linux?


Thank you for answering.

- Changdeok Kang




Kevan Miller wrote:
> 
> 
> On Jan 29, 2009, at 2:52 AM, Changdeok Kang wrote:
> 
>>
>> If I deploy a service in the geronimo, how they consume the memory?
>>
>> For many clients, do they make a copy of the service?
>>
>> If then, when does the garbage collection happen?
>>
>> The reason for asking is that it seems geronimo only gets memory and  
>> never
>> looses.
> 
> How are you monitoring memory usage? Are you hitting  
> OutOfMemoryError's? Or just observing java memory usage (verbosegc) or  
> observing OS process memory usage?
> 
> By "service", I assume you mean an application (e.g. a .war or .ear)?  
> When you deploy an application, it will consume java heap and permgen  
> memory (assuming a sun vm). If you undeploy the application, this  
> memory should be garbage collected and returned the the java heap. It  
> is possible for applications (or the libraries they utilize) to cause  
> memory leaks which will prevent the memory from being garbage  
> collected after an undeploy. In these cases, you'd see java heap/ 
> permgen utilization grow with each deploy/undeploy cycle.
> 
> Clients would not cause a "copy" of a service to be generated. Clients  
> or client requests may cause additional heap memory to be consumed.  
> This is going to be application dependent.
> 
> --kevan 
>   
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-about-memory-usage-of-deployed-service-tp21722279s134p21782101.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Question about memory usage of deployed service

Posted by Kevan Miller <ke...@gmail.com>.
On Feb 1, 2009, at 6:50 PM, Changdeok Kang wrote:

>
> I was just observing OS process memory usage by "top".
>
> Actually the next-day, the memory usage scores initial value.
>
> I think that the garbage collection is not executed at once. Am I  
> right?

Garbage collection is an asynchronous process and it's behavior is  
configurable and implementation dependent. However, in general,  
unreferenced objects will be garbage collected pretty quickly (seconds  
to minutes).

>
> Additionally, how can I check the java heap memory status on linux?

There a number of options. I usually just turn on verbosegc (e.g.  
export JAVA_OPTS="-verbose:gc -XX:+PrintGCDetails"), you can also  
monitor using JMX or the Geronimo admin console.

--kevan