Moazam Rajas Sun hosted weblog garbage collection II

Tuesday Jun 08, 2004

Alexandre Rafalovitch, a BEA Backline Support Engineer emailed me about reading thread dumps and his proposal for formatting dump data. I've read through Alexandres article, and while I'm not a big fan of using XML for everything, he definitely presents an excellent view on making thread dumps easier to read and diagnose. The really cool part is that Alexandre has written an application which takes standard thread dump data, converts it into XML, then uses XSLT to convert the data into the format of your choice.

I'm actually a bit surprised that there isn't a JSR in progress to address this issue. I think one of the reasons for this is that most developers and users are not interested in the nuances of thread dump readability. Of course, as backline engineers, this topic is near and dear to myself and Alexandre. Alexandre will be presenting this in a session at JavaONE 2004, session TS-1646. I'll be sure to attend.

"What would be a perfect solution here is to be able to convert these thread-dumps into some sort of intermediate structure/language that has flexible structure, can tolerate missing fields, and can be processed by third-party tools in various ways. And, of course, if it can somehow involve a currently popular technology, so much the better.

Do we have such an intermediate language? Indeed we do — it is XML. It is somewhat human readable, has many tools written for it, and already has not one but several transformation and reporting technologies built on top of it, such as XSLT, XQuery, and XDB."
[full article]
Want to look at the code of the JVM or build a test version of your own? Use the source.

And look, detailed build instructions are available too!
This is a quick cheat sheet for SysAdmins or developers who are new to Solaris. I'll update it with more stuff soon.
This has to be one of the most useful outlines of GC tuning information I have ever seen. Thanks to Pete Freitag for creating this from the original document. The original was nowhere as easy to read.
1.4.2 GC Tuning Outline by Pete Freitag
Many people are running on very old minor releases of J2SE. I've seen companies running 1.2.2_04 while 1.2.2_17 is out! Here is some info on how the J2SE update cycle works, and why you should upgrade to the newest update releases.
J2SE Update Release Cycles
Many people have asked if the MaxPermSize value is a part of the overall -Xmx heap setting or additional to it. There is a GC document on the Sun website which is causing some confusion due to a somewhat vague explanation and an errant diagram. The more I look at this document, the more I think the original author has made a subtle mistake in describing -Xmx as it relates to the PermSize and MaxPermSize.
Read more..
This little list helps to make sense of those J2SE BugIDs which reference J2SE code names.
Here, or here.
Once in a while Java users and developers run into problems where their Java application simply seems to hang. No core file is generated, no IO is detected, the process just sits there waiting...for something. Usually these problems can be traced to OS and JVM level threading.
Debugging thread related hangs in the JVM
There are times when reading through megabytes of GC logs is overkill, especially when all you need is a general overview on how the JVMs GC algorithms are behaving with your application. The 'jvmstat' package helps developers and users visualize GC instead.
Visualizing Garbage Collection with jvmstat
About Me

My name is Moazam Raja and currently I'm a backline Java/JDK engineer at Sun Microsystems. This means that I support the Java Virtual Machine and whatever is bundled with the JDK. Most of my day is spent looking through core dumps, garbage collector logs, pstacks, and Java stack traces. While it may sound gory, it's actually alot of fun.

I maintain my personal weblog on my own site which talks mainly about Java and Java Virtual Machine internals. I will probably use this Sun hosted weblog to talk more about my experiments with Solaris 10/Express and Zones.

My interests:

Unix OS Internals
JVM Internals
Porsche 911
Cannondales...

My writings and recommendations are my own and are not necessarily those of Sun Microsystems.