Java Garbage Collection

T

Tim.Docis

Hi

Need to be able to find out how to set the type of Garbage Collection
we are using on our win 2003 server. JDK1.5 installed. Running Apache
Tomcat5. JConsole shows we have PS MarkSweep and PS Scavenge as GC's.
Does anyone know how to change this? (Duplicate other servers are
using "Copy" and "MarkSweepCompact" as Garbage Collectors...dont know
how there is a difference...
Also, does anyone know how to switch the JIT compiler between HotSpot
Client and HotSpot Server compiler?

Thank You
 
A

Arne Vajhøj

Need to be able to find out how to set the type of Garbage Collection
we are using on our win 2003 server. JDK1.5 installed. Running Apache
Tomcat5. JConsole shows we have PS MarkSweep and PS Scavenge as GC's.
Does anyone know how to change this? (Duplicate other servers are
using "Copy" and "MarkSweepCompact" as Garbage Collectors...dont know
how there is a difference...
Also, does anyone know how to switch the JIT compiler between HotSpot
Client and HotSpot Server compiler?

It is controlled via parameters to the Java command. So check the
startup command.

Arne
 
M

Mark Space

Hi

Need to be able to find out how to set the type of Garbage Collection
we are using on our win 2003 server. JDK1.5 installed. Running Apache
Tomcat5. JConsole shows we have PS MarkSweep and PS Scavenge as GC's.
Does anyone know how to change this? (Duplicate other servers are
using "Copy" and "MarkSweepCompact" as Garbage Collectors...dont know
how there is a difference...
Also, does anyone know how to switch the JIT compiler between HotSpot
Client and HotSpot Server compiler?

Thank You

Here's an interesting white paper which touches on various performance
issues in Java, including garbage collection.

<http://java.sun.com/performance/reference/whitepapers/6_performance.html>

More thoughts along those lines:

<http://www.ibm.com/developerworks/java/library/j-java6perfmon/>

<http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/clopts.html>

<http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html>

That last one has a FAQ with some command line options at the end. Is
"PS" the parallel threads GC? Wouldn't that be better on a multi-core
machine?

Here's how to set the command line for 1.4:

<http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html>

I still can't find the exact commands for GCs. This looks like a good
starting point:

<http://docs.sun.com/source/819-0084-10/pt_tuningjava.html>
 
L

Lew

It is controlled via parameters to the Java command. So check the
startup command.

<http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html>
<http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html>

For tuning GCs:
<http://java.sun.com/performance/reference/whitepapers/tuning.html>

The information there is a little old. Snoop around the Java 6 docs for new
options.

GC options, and command-line options generally, vary with the JVM, not only
between vendors but between releases from the same vendor.
 
R

Rishi

Hi

Need to be able to find out how to set the type of Garbage Collection
we are using on our win 2003 server. JDK1.5 installed. Running Apache
Tomcat5. JConsole shows we have PS MarkSweep and PS Scavenge as GC's.
Does anyone know how to change this? (Duplicate other servers are
using "Copy" and "MarkSweepCompact" as Garbage Collectors...dont know
how there is a difference...
Also, does anyone know how to switch the JIT compiler between HotSpot
Client and HotSpot Server compiler?

Thank You

Hi,
check you Start Mode, usually if set to production it uses prallel
garbage collection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top