March 2008


The Java JVM has the -Xnoclassgc argument to inhibit class garbage collection. That is so 2006. If you have a long-running server JVM, this is most likely going to leak memory.

Specifically, if your process

  • Uses serialization
  • Uses reflection
  • Can have a remote debugger or JConsole attached
  • Uses any dynamically generated classes
  • Uses any 3rd party jars that do any of the above

then you have a slow, psssssssssssssssssssss sound coming from your JVM.

Do you seriously think that in 2008 you know that none of the jars on your classpath use reflection or serialization?

We live in a world now where JRuby comes along and may generate holder and wrapper classes during runtime and do all sorts of stuff to the internals trying to get things to byte-compile down. Only geniuses can truly understand this stuff.

Instead of trying to save a few millis over the course of a month of server JVM run time by turning off the class GC, make it ConcurrentMarkSweep enabled instead:


java -server -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

and let’s relegate -Xnoclassgc to the scrap-heap. It probably doesn’t do what you think it does.

The idea for this chart came from The Visual Display of Quantitative Information by Edward R. Tufte. On page 35, Mr. Tufte shows a chart of some of the royal genealogy England from 1660 to 1860. The chart shown is by E.J. Marey, La Methode Graphique, Paris, 1885. The wonderful time series enhanced with lineage and different shadings for the different reigning periods got me to thinking about whether the kings of Israel and Judah could be depicted this way.

This chart has some deficiencies in the graphics, and in the fact that there are too many kings listed to put them in top to bottom, left to right order and still keep it on a page. The up and down of the names seems like it means something, but it doesn’t. A future revision of the chart should remove this.

Kings of Israel and Judah Thumbnail

Click on the thumbnail to view the entire chart. It is in PNG format so you should be able to zoom in on it to see more detail.

One of the interesting things that the chart shows, is some light on Isaiah 6:1. – “In the year that King Uzziah died…”. Uzziah was the sixth king in a row to die an unnatural death. Due to the length of time that kings reigned (some of them anyway), this seems more significant than if six of our American presidents in a row died an unnatural death, terminating their time in office. That has never happened, and while I was alive when JFK was assassinated, I’m too young to remember anything about it. But the stories one hears make it seem as if a paplable fear gripped much of the populace. Six kings of Israel in a row died unnatural deaths. Not all violently, but still it would have been something that became part of the national psyche.

There are other interesting things in the chart (to me anyway), and improvements to make in due time.