|
|
|
Back to newsletter 074 contents
This month we are doing a Java 6 special. We're looking at all the most useful Java 6 specific performance related information around - and there is a surprisingly large amount given that the product is only a couple of months old. All the XX options are categorized, the new performance related changes and features are itemized, and we have the links to all the troubleshooting guides. Trust me, this is the special you want to bookmark for the next five years.
One thing that hasn't been highlighted by us so far is the dynamic attach capability. Using this, you can load in arbitrary monitoring and analysis support ON THE FLY. Hmm, that simple sentence doesn't quite emphasize the possibilities. So take this scenario: your server starts behaving oddly. You need to determine the problem without taking the server down. You generate the usual stack dumps, do some analysis, see that a couple of the stacks are doing stuff that look unusual. If only you could inspect the current data structures that are driving those threads. But now you can - you write a simple agent that uses your knowledge of the application coupled with reflection to dump that data, and you use the new dynamic attach capability to load your agent and dump the data. Does that sound good to you? Because it sounds like a dream come true for me! It may be called "dynamic attach" capability, but a more accurate way to describe it would be "dynamic do pretty much anything" capability.
Amongst the the other enhancements, two notable items are the escape analysis (the compiler automatically determines that objects can be allocated on the stack instead of the heap) and array reallocations (Arrays.copyOf and Arrays.copyOfRange). In both cases, I don't expect much performance improvements immediately - indeed that latter is just a common code fragment put into a method - but the prospect for compiler enhancements from these in the future could produce some impressive speedups for many common types of code patterns. Also worth noting is that java.lang.instrument now supports wrapping native methods - thus enabling I/O profiling at the lowest layer of the JVM, one thing that has been missing for years.
Finally, an XX option that caught my eye was -XX:+WizardMode. Sadly though,-XX:+WizardMode does not get the JVM doing magic tricks, nor does it make the JVM suddenly faster. It just prints reams of debugging information.
Read on for all those links and extracted tips in our Java 6 special. And first off, in keeping with the Java 6 special, we have an update to our netbeans profiler tool report which includes the latest features and upcoming ones too - see NetBeans Profiler tool report. (all our tool reports are available from here) In addition, we have our usual Javva the Hutt update and of course we have our Java 6 special links and articles, and the extracted performance related information from those java 6 links.
Java 6 special: performance related articles (see the the extracted performance related information page)
Back to newsletter 074 contents