From: "Kathy Wargo" <[EMAIL PROTECTED]>
> we are developing a java application using servlet but after a few runs
the application slows down. We noticed that this happens once the JVM's heap
size reaches 16M. I would assume the garbage collection would be invoked and
clear up the heap but this does not seem to be happening. We have tried to
use finalize() methods and system.gc() also in the objects that are being
created so that the garbage collector can free up the memory but nothing
seems to be bringing the heap size down. Even leaving the computer idle for
some time does not seem to be freeing up the resources. Any clues?
You should analyze the app with some memory monitoring tool (NuMega's, etc.)
Garbage collection cannot dispose objects if you have contention bugs (i.e.,
failing to eliminate all references to objects you don't need anymore). And
maybe there's no problem at all; you should expect memory usage to increase
and reach a higher plateau after a few runs, because the servlet engine will
load servlet classes, set up thread and connection pools, maybe cache static
content, and god knows what else. Server-side architectures are optimized
for speed rather than memory usage; 16Mb is a rather small tiny heap, and
unless you're running on extremely tight hardware or using a very old JVM,
a heap that small shouldn't have any impact on performance.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets