Re: GC issues
Ted Neward <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <001501c816c7$ad6c5480$0844fd80$@net> |
(I just today glanced through my adv-java archives and saw this.) Couple of questions come to mind: (*) The fact that you're getting Full GC sweeps one right after the other clearly indicates you're maxed out. Do you have a leak somewhere? What's the memory curve look like over that hour's time? (JConsole can be your friend here.) (*) Notice how your GC reporting numbers aren’t changing one bit? It looks like the JVM is doing a full sweep, then can't find anything to free up--that's a second smell that indicates a leak in your code someplace. Use the MemoryPool MBeans (available through JConsole), take a snapshot of the heap, and have a look at it in jhat. (Or, if you prefer, substitute your favorite commercial profiler's functionality here. Either way, you need a better look inside the heap.) (*) What platform are you running on? If you're on a 32-bit operating system, then specifying -mx4096M is a terrible idea, because you're essentially giving the JVM carte blanche to try and allocate a Java heap that's 4GB in size, which can never happen in a 32-bit (4GB) process! I'm guessing you're on a 64-bit platform, since according to your GC output here the heap itself thinks it's 5GB in size, but I figured I'd ask anyway. Ted Neward Java, .NET, XML Services Consulting, Teaching, Speaking, Writing http://www.tedneward.com > -----Original Message----- > From: Discussion of advanced Java topics. [mailto:ADVANCED- > [email protected]] On Behalf Of Avinash Lakshman > Sent: Monday, October 01, 2007 8:22 PM > To: [email protected] > Subject: [ADVANCED-JAVA] GC issues > > Hi All > > We are trying to profile our software on a single server in order to > determine how many transactions per second it can handle. We were > trying to > figure out to what extent we can push it to. What we are observing is > that > things run fine on the server for like an hour and then everything goes > haywire. We tried to dump the GC details and figured that the full > times are > on an average 15 secs (snapshot shown below). I am using the following > VM > options > -Xms1024M -Xmx4096M -XX:+UseConcMarkSweepGC > -XX:CMSInitiatingOccupancyFraction=50. How do I go about tuning this? I > am > sure one of you might have more insight and point in the right > direction as > to what the next steps should be for me. Please advice > > > GC details snapshot: > > [Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9602090 secs] > 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], > 14.9604460 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9600190 secs] > 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], > 14.9602830 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9943380 secs] > 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], > 14.9946070 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0132030 secs] > 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], > 15.0135150 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0087010 secs] > 5044415K->5044415K(5044416K), [Perm : 14286K->14286K(21248K)], > 15.0089700 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0059100 secs] > 5044415K->5044282K(5044416K), [Perm : 14286K->14286K(21248K)], > 15.0062270 secs] > > Exception in thread "ROW-MUTATION:7" java.lang.OutOfMemoryError: Java > heap space > > [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0145700 secs] > 5044415K->5044308K(5044416K), [Perm : 14286K->14286K(21248K)], > 15.0148770 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0113510 secs] > 5044415K->5044330K(5044416K), [Perm : 14286K->14286K(21248K)], > 15.0116270 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 15.0235560 secs] > 5044415K->5044354K(5044416K), [Perm : 14286K->14286K(21248K)], > 15.0238610 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 18.5820490 secs] > 5044415K->5044372K(5044416K), [Perm : 14286K->14286K(21248K)], > 18.5823870 secs] > [Full GC [Tenured: 3478911K->3478911K(3478912K), 14.9996820 secs] > 5044415K->5044393K(5044416K), [Perm : 14286K->14286K(21248K)], > 14.9999700 secs] > > Thanks > A > > =================================== > This list is hosted by DevelopMentor® http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.488 / Virus Database: 269.14.0/1049 - Release Date: > 10/4/2007 8:59 AM > No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.15.3/1082 - Release Date: 10/20/2007 2:59 PM =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com