Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Java Garbage Collection (http://www.velocityreviews.com/forums/t603205-java-garbage-collection.html)

Tim.Docis@gmacrfc.co.uk 03-31-2008 03:30 PM

Java Garbage Collection
 
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

Arne Vajh°j 03-31-2008 03:56 PM

Re: Java Garbage Collection
 
Tim.Docis@gmacrfc.co.uk wrote:
> 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

Roedy Green 03-31-2008 04:14 PM

Re: Java Garbage Collection
 
On Mon, 31 Mar 2008 08:30:07 -0700 (PDT), Tim.Docis@gmacrfc.co.uk
wrote, quoted or indirectly quoted someone who said :

>Also, does anyone know how to switch the JIT compiler between HotSpot
>Client and HotSpot Server compiler?


see http://mindprod.com/jgloss/javaexe.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Mark Space 03-31-2008 04:33 PM

Re: Java Garbage Collection
 
Tim.Docis@gmacrfc.co.uk wrote:
> 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>

Lew 04-01-2008 03:04 AM

Re: Java Garbage Collection
 
Tim.Docis@gmacrfc.co.uk wrote:
>> 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?


Arne Vajh├Şj wrote:
> 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.

--
Lew

Rishi 05-06-2008 06:02 PM

Re: Java Garbage Collection
 
On Mar 31, 8:30*am, Tim.Do...@gmacrfc.co.uk wrote:
> 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.



All times are GMT. The time now is 12:04 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.