Specifying default GC at JVM startup

Hi there, I'm monitoring my company's intranet with JConsole running on jdk 1.5. The intranet has about 3000 users who log on about every day, so it has a lot of traffic.

Sometimes, during performance peek, the memory reaches about 370 megs ( My maximum heap size as well as my startup heap size is set to 370 megs ). When the memory reaches the maximum size, the memory drops while I'm getting tomcat messages that the pool is exhausted with 100 threads. I tried changing the maximum value of threads to 200 instead of 100 but it does help; the intranet still freezes but at least I'm not getting those tomcat messages... So it doesn't help a lot.

I noticed, in JConsole, that the default GC that is run automatically is PS Scavenge. From the console, I can run the GC manually and it executes the PS MarkSweep algorithm. I noticed that MarkSweep is much more efficient than Scavenge. Is it possible to specify to the JVM to use MarkSweep by default? Therefore the memory would not reach the maximum size or at least it would reach it less often ( Actually my intranet freezes about 3 to 4 times a day, during peek activity ) Would that be a good idea? Is it even possible to do it?

I'm open to all your suggestions,

Thanks a lot

Alexandre Folgueras

afolgueras@capitale.qc.ca

[1332 byte] By [Capitale_Alex] at [2007-9-30 21:46:23]
# 1

Hello

Here are some references that should help inform you about the different collectors

and the tuning choices you can consider:

Performance Documentation for the Java HotSpot VM

http://java.sun.com/docs/hotspot/index.html

Ergonomics in the 5.0 Java Virtual Machine

http://java.sun.com/docs/hotspot/gc5.0/ergo5.html

Tuning Garbage Collection with the 5.0 Java Virtual Machine

http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

"Troubleshooting Guide for J2SE 5.0",

http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

debugging_team at 2007-7-7 3:15:28 > top of Java-index,Java HotSpot Virtual Machine,Specifications...