You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Benjamin Chu <be...@tamu.edu> on 2006/05/30 05:24:48 UTC

When does the "MarkSweepCompact" Garbage Collector perform GC?

 Hello! Now I am using the jconsole to monitor the heap memory usage of
the tomcat 5.5. I've constructed a testbed to test the performance of
the applications running on the tomcat. However, the jconsole shows that
the "MarkSweepCompact" Garbage Collector never does its job. The only
two ways to make this garbage collector to perform GC are:

<1> I push the button "perform GC" shown on the "Memory tab" of the jconsole
<2> I insert the code "System.gc()" into the servlets.

I think both of these two ways are not good, and this garbage collector
should perform GC automatically (in my opinion). I just wonder when or
under which conditions the "MarkSweepCompact" Garbage Collector would
perform GC. Or actually there is something wrong with my configuration
so it doesn't perform GC?
Thank you very much!



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: When does the "MarkSweepCompact" Garbage Collector perform GC?

Posted by Sameer Acharya <ac...@yahoo.com>.
Check out this link might answer few of your queries.

http://java.sun.com/docs/hotspot/gc1.4.2/faq.html

-Sameer

Benjamin Chu <be...@tamu.edu> wrote:  Hello! Now I am using the jconsole to monitor the heap memory usage of
the tomcat 5.5. I've constructed a testbed to test the performance of
the applications running on the tomcat. However, the jconsole shows that
the "MarkSweepCompact" Garbage Collector never does its job. The only
two ways to make this garbage collector to perform GC are:

<1> I push the button "perform GC" shown on the "Memory tab" of the jconsole
<2> I insert the code "System.gc()" into the servlets.

I think both of these two ways are not good, and this garbage collector
should perform GC automatically (in my opinion). I just wonder when or
under which conditions the "MarkSweepCompact" Garbage Collector would
perform GC. Or actually there is something wrong with my configuration
so it doesn't perform GC?
Thank you very much!



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



		
---------------------------------
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone.  Get Yahoo! Messenger with Voice

Re: When does the "MarkSweepCompact" Garbage Collector perform GC?

Posted by Benjamin Chu <be...@tamu.edu>.
Thanks for the reply! Does this kind of the GC only run when the memory 
usage almost reaches the limit which we allocate (for example, by default, 
it is 64 MB)? Sorry that I am not familiar with the GC.
I just know that the JVM would do it for us by itself. Thank you very much!

----- Original Message ----- 
From: "Richard Mixon" <rn...@qwest.net>
To: "'Tomcat Users List'" <us...@tomcat.apache.org>
Sent: Tuesday, May 30, 2006 1:03 AM
Subject: RE: When does the "MarkSweepCompact" Garbage Collector perform GC?


> What makes you think the GC should run? Are you out of memory? The GC will
> not run in many situations unless it has a need to.
>
> HTH - Richard
>
> -----Original Message-----
> From: Benjamin Chu [mailto:benchu@tamu.edu]
> Sent: Monday, May 29, 2006 8:25 PM
> To: Tomcat Users List
> Subject: When does the "MarkSweepCompact" Garbage Collector perform GC?
>
> Hello! Now I am using the jconsole to monitor the heap memory usage of the
> tomcat 5.5. I've constructed a testbed to test the performance of the
> applications running on the tomcat. However, the jconsole shows that the
> "MarkSweepCompact" Garbage Collector never does its job. The only two ways
> to make this garbage collector to perform GC are:
>
> <1> I push the button "perform GC" shown on the "Memory tab" of the 
> jconsole
> <2> I insert the code "System.gc()" into the servlets.
>
> I think both of these two ways are not good, and this garbage collector
> should perform GC automatically (in my opinion). I just wonder when or 
> under
> which conditions the "MarkSweepCompact" Garbage Collector would perform 
> GC.
> Or actually there is something wrong with my configuration so it doesn't
> perform GC?
> Thank you very much!
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: When does the "MarkSweepCompact" Garbage Collector perform GC?

Posted by Richard Mixon <rn...@qwest.net>.
What makes you think the GC should run? Are you out of memory? The GC will
not run in many situations unless it has a need to.

HTH - Richard

-----Original Message-----
From: Benjamin Chu [mailto:benchu@tamu.edu] 
Sent: Monday, May 29, 2006 8:25 PM
To: Tomcat Users List
Subject: When does the "MarkSweepCompact" Garbage Collector perform GC?

 Hello! Now I am using the jconsole to monitor the heap memory usage of the
tomcat 5.5. I've constructed a testbed to test the performance of the
applications running on the tomcat. However, the jconsole shows that the
"MarkSweepCompact" Garbage Collector never does its job. The only two ways
to make this garbage collector to perform GC are:

<1> I push the button "perform GC" shown on the "Memory tab" of the jconsole
<2> I insert the code "System.gc()" into the servlets.

I think both of these two ways are not good, and this garbage collector
should perform GC automatically (in my opinion). I just wonder when or under
which conditions the "MarkSweepCompact" Garbage Collector would perform GC.
Or actually there is something wrong with my configuration so it doesn't
perform GC?
Thank you very much!



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org