Need help with need to Force Garbage Collect

J

John

I have a situation where a 3rd party application (war file) is
bounding high on heap. I have to intervene by using the application
server to force a full garbage collect. The start up string is a
follows :

javaMemoryOptions=-verbose:gc -XX:+PrintGCTimeStamps
-Xloggc:/u1/logs/bea/domain
s/starsweb1/EUS_gc.log -Xmx256m -Xms256m

Are there any hints on what I may need to change, such as newsize? Any
hints are appreciated.
 
J

John C. Bollinger

John said:
I have a situation where a 3rd party application (war file) is
bounding high on heap. I have to intervene by using the application
server to force a full garbage collect.

Then you're probably out of luck. There is no way to _force_ any GC,
much less a "full" GC, assuming your JVM is even using a GC strategy
wherein that makes any sense. On the other hand, it is unlikely that
you actually do need to force GC: the JVM will perform GC when and how
it needs to do, without your help.
The start up string is a
follows :

javaMemoryOptions=-verbose:gc -XX:+PrintGCTimeStamps
-Xloggc:/u1/logs/bea/domain
s/starsweb1/EUS_gc.log -Xmx256m -Xms256m

Are there any hints on what I may need to change, such as newsize? Any
hints are appreciated.

You may assign more heap space to the server by increasing the number in
the -Xmx parameter. If you _know_ the server will need more than 256MB
of RAM then it may be slightly to your advantage to increase the
parameter to -Xms as well. If the 3rd-party WAR is inappropriately
packratting objects (thus causing its memory consumption to increase
without bound) then your options are (1) get the app supplier to fix the
app and (2) periodically unload and reload it. (The latter _probably_
works in an app server scenario, but that depends on the details of the
app server, and possibly on the details of the app.)


John Bollinger
(e-mail address removed)
 

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,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top