Java Garbage Collection

Discussion in 'Java' started by Tim.Docis@gmacrfc.co.uk, Mar 31, 2008.

  1. Guest

    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
     
    , Mar 31, 2008
    #1
    1. Advertising

  2. Arne Vajhøj Guest

    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
     
    Arne Vajhøj, Mar 31, 2008
    #2
    1. Advertising

  3. Roedy Green Guest

    On Mon, 31 Mar 2008 08:30:07 -0700 (PDT),
    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
     
    Roedy Green, Mar 31, 2008
    #3
  4. Mark Space Guest

    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>
     
    Mark Space, Mar 31, 2008
    #4
  5. Lew Guest

    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
     
    Lew, Apr 1, 2008
    #5
  6. Rishi Guest

    On Mar 31, 8:30 am, 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.
     
    Rishi, May 6, 2008
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laser Lu

    Garbage Collection and Manage Code?

    Laser Lu, Jan 26, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    745
    Gaurav Khanna [C# MVP]
    Jan 27, 2004
  2. Cheung, Jeffrey Jing-Yen
    Replies:
    3
    Views:
    1,587
    Cheung, Jeffrey Jing-Yen
    Jul 10, 2003
  3. Pradeep
    Replies:
    2
    Views:
    695
    Patricia Shanahan
    Jan 24, 2007
  4. Replies:
    1
    Views:
    468
    mrstephengross
    Jul 25, 2005
  5. Øyvind Isaksen
    Replies:
    1
    Views:
    1,023
    Øyvind Isaksen
    May 18, 2007
Loading...

Share This Page