[PJUG Javamail] Java Memory Management
Douglas Bullard
dbullard at nurflugel.com
Wed Jan 2 02:39:22 UTC 2008
In our instance, the CPU was cranking at 100%, but no usable work was
being done - 95% of the CPU's effort was doing GC.
JConsole is a godsend for figuring out what's going on when this
happens - if you haven't used it, it's a very, very helpful tool.
One of the things which helped us out of our spot was changing the GC
parameters - tuning the GC is a bit of an art, and a bit of black
magic. Twiddle until it works. I hear vague rumors that a self-
tuning GC is in the works...
Doug
On Jan 1, 2008, at 14:03, Bill Kayser wrote:
> Blow up as in OutOfMemoryError thrown? The JVM crashes?
>
> From: Chris Kessel/Lou Doherty [mailto:chriskessel at verizon.net]
> Sent: Tuesday, January 01, 2008 1:57 PM
> To: 'Bill Kayser'; 'Douglas Bullard'; 'Carlus Henry'
> Cc: 'Javamail'
> Subject: Re: [PJUG Javamail] Java Memory Management
>
> I was going to say, "Yea, it's easy", but that was a couple JVM
> iterations ago.
>
> Basically, a main with a for loop that allocates an array of 1000
> elements over and over and over. It'll blow up as the GC can't keep
> up with it.
>
> From: javamail-bounces at pjug.org [mailto:javamail-bounces at pjug.org]
> On Behalf Of Bill Kayser
> Sent: Tuesday, January 01, 2008 1:37 PM
> To: 'Douglas Bullard'; 'Carlus Henry'
> Cc: 'Javamail'
> Subject: Re: [PJUG Javamail] Java Memory Management
>
> That's a neat trick. I'd love to hear the details on that. Do you
> mean that you ran out of memory before the GC could clean everything
> up? I'm pretty sure I could write a program that did nothing but
> allocate memory (non rooted) and I can't imagine the JVM would fall
> over.
> You can swamp the garbage collector by creating too many objects,
> generating them faster than it can collect them - we've run into
> that with Hibernate at work.
>
> _______________________________________________
> Web Site - http://www.pjug.org/
> Javamail mailing list
> Javamail at pjug.org
> http://www.pjug.org/mailman/listinfo/javamail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://javac.com/pipermail/javamail/attachments/20080101/4d82afeb/attachment-0002.html>
More information about the Javamail
mailing list