File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes garbage collection too frequently or too long Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "garbage collection too frequently or too long" Watch "garbage collection too frequently or too long" New topic

garbage collection too frequently or too long

Sam Sun
Ranch Hand

Joined: Feb 01, 2005
Posts: 60
Lets say that the garbage collection of the application is running too frequently or is running for too long.

What would be some typical first steps in identifying the problem and what are some typical solutions for this situation?

[ April 10, 2006: Message edited by: Yefeng Sun ]
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30057

You would find out that the garbage collection is a problem by running a profiler.

There are many command line options you can use to tune gc. For example, you can set the maximum heap size and the gc algorithm (in Java 1.4).

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
I agree. Here's the link:
subject: garbage collection too frequently or too long
Similar Threads
Garbage collection
Help on improving Performance
Garbage Collection suggestions
Using Soft references for cache