-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 塗,
On 5/28/2010 3:11 AM, sesfei wrote: >> Are you using a 64-bit or 32-bit JVM? > yes, that is 64-bit JVM. With such a modest heap (1GiB), you might consider running a 32-bit JVM: you might even get better heap performance with smaller pointers. > [root]# jstat -gc {tomcat pid} 3000 [snip] > PC Current permanent space capacity (KB). Ok. >> Can you clarify this last statement? When did the first full GC take >> place? When did the second? When did the third? > > According to the following csv data, we can see full-gc occurred at a > time like this. > > The 1st full-gc tomcat takes place at tomcat is starting. > The 2th full-gc tomcat takes place at 11:48AM > The 3th full-gc tomcat takes place at 1:23 PM > The 4th full-gc tomcat takes place at 2:49 PM > The 5th full-gc tomcat takes place at 4:24 PM > The 6th full-gc tomcat takes place at 4:33 PM > After 7th full-gc , basically 1 full-gc at 1 minutes will be occurred. > is it normal? > Is it because the programm of webapp not well, leading to memory leak? Full GCs happen either when memory is tight or just whenever the GC feels like running. Typically, you'll have a lot of small GCs over a long (relatively speaking) period of time, and then a full GC once and a while. Check may (will?) correct me on this, but I believe a full GC might be necessary to clear-out certain resources such as completed Threads or other things that have concrete OS-level counterparts. If you are using a lot of (non-pooled) threads or socket connections, the JVM may be performing full GCs to clean up those resources. Frequent full GCs might just mean that you are using a lot of your memory. As long as you don't get any OutOfMemoryErrors, it appears that your heap is adequate for the load you're experiencing. Frequent full GCs could be seen as a symptom of having a heap that is just a little too small for your needs: everything you're doing fits in the heap, but in order to stay running, full GC are needed frequently. Try increasing your heap size by 20% and see if the full GCs happen less frequently. Again, as long as you're not running out of memory, you webapp is probably doing just fine. More breathing room in the heap certainly couldn't hurt. Good luck, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv/y/cACgkQ9CaO5/Lv0PCQuwCgkcA4H1maoUrHucWRKO3PG6aC PYsAn0Az7dMicym9vDEg6uTJC1gMLILz =mWk9 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org