Hi, >I am facing is that my application sometimes kind of pauses and one has to >wait like few seconds before it moves ahead, BUT if u see that things are
Try to enable verbose garbage collection, but adding -verbose:gc to your JAVA_OPTS. Then you'll know when GC runs, and for how long, by looking at catalina.out. >The reasons can be , but I aint sure >* I am using a lot of System.out.print for debugging purposes. This is not the best, nor the most elegant, but it's not likely to slow you down. Make sure you have enough room on the filesystem for catalina.out to grow large. Consider moving a real logging system, e.g. log4j. >* I guess since my applicaion is big too there is a lot of object How big? >generation > and so garbage collection. It takes a *ton* (where a ton depends on your JVM, OS, threading model, etc.) of object creation and a huge JVM for GC to generate long pauses. Verbose GC can help debug this. Try to avoid unnecessary object creation, but you don't need to go nuts for this. It's not likely to be the cause. >* I am trying to use a lot of cache, I store whole rows of table lets >say(100) Once again, how much caching? What's in your rows of table sets? How big is each set? > to know does it hurt to use cache as best as i can.I am trying to be very > performance conscious and so cache things and avoid DB calls. That's a good practice in general. As long as you know when you need to refresh the cache, e.g. if the DB contents change. >I will appreciate any insight into this problem. For comparison sake, we have several large applications using servlets and JSPs. They run on tomcat, and use a lot of caching to avoid repetitive DB calls and enhance performance. Our apps use > 1GB heap, caches with millions of objects (both millions of keys and millions of values), and are very multithreaded. We used to have GC pause problems and spent a lot of time tuning GC parameters (-XX:NewSize, etc.). Now we don't have GC pauses anymore. We use JDK 1.4.1 on Solaris 8. And of course, there's always the option that GC has nothing to do with your pauses. Could it be something behavioral in your JSPs or servlets, or the way you invoke / chain them? Yoav Shapira Millennium ChemInformatics
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
