Garbage Collection Takes 20 min
843811May 31 2002 — edited Aug 24 2002Hello,
We have application server (Jrun 3.0) running on Solaris 2.6 with 8G of RAM. Jrun is allocated 2G for the heap. The major garbage collection (GC[1]) usually takes about 20 sec, but sometimes it takes up to 20 min. There is a lot of IO activity during the long running collections. It looks like as if part of the heap (probably the old generation area) is swaped out to the disk as it is only accessed during the major collections. We can also see that before the long running collection the time it takes to promote live objects to the old generation is significantly longer and goes back to normal after the major colection occurs. This can be caused by the memory fragmentation, but mark-compact algorithm used during the major collection is supposed to compact the heap. Is that possible that garbage collector changes the algorithm it's using (uses mark-sweep untill memory gets fragmented and than it does mark-compact)?
Jrun is using Java 1.2.2.05a. There is no indication that we have a shortage of physical memory.
If you experienced similar problems, please, let me know about your findings.
Thanks in advance,
Alex