Hi Shapira, >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. ************ thanks i will try to use this ************ >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. ************ Actually I am using the logging in jdk1.4 but the console messages by the logger is hard to understand i mean it includes lot of extra info so i am also using System.out shall remove them later ************ >* I guess since my applicaion is big too there is a lot of object How big? ************ about 400 files including the jsp pages *********** >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 avoid unnecessary objects but still there could be a 1000 *********** >* 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? ********* Each row can be say 50 cols of (longs) and (strings <30 chars) can be as many as 1500 rows normally there should be 200 rows ********* > 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. ************* yes i am trying to take care of that ************ >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? ****************** I am using Windows 2000 for now, might port to red hat linux 7.2 later yes i have 1-2 level of chaining as i am using MVC Can you please tell me how to debug such an application(specially) from the point of view my problem of pausing.. as i am using just system.out and it is very time consuming to debug that way There can be several possible hitches in the application as big as this but thing intriguing is why does the application keep continuing as soon as i hit any key (possibly an interrupt). Could you guess what can be a possible cause here. a case of pausing can be lets say i login i make a session object for the user then i leave it opened eat a sandwitch and try doing something often in such cases i am paused (i invalidate session on logouts ) so when i logout after some time it will just pause. and i have to hit the the key. So far i am not doing any multi threading ****************** Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
