Monday, November 27, 2006

JRockit and Tomcat

I decided to try out BEA's JRockit JVM a try as my server JVM. It bills itself as being a much faster JVM on x86 machines. So far it doesn't seem that much faster, except when running the JVM in debug mode. For that, it seems to launch much faster than HotSpot did. Actually there seems to be little difference in its startup time in debug mode vs. "normal" non-debug mode.

The only weird thing was that when I attached Eclipse to it, Eclipse complained about some line numbers not being reported by the code. This had no effect on any of the breakpoints I had set. Those worked flawlessly. It seemed to be around CGLIB enhanced byte-code, but there were obviously no breakpoints set in such code. I set a breakpoint in code that I knew would be CGLIB enhanced, but that still worked fine.

Just for kicks, I decided to also use JDK 1.6. I had a colleague tell me that "Mustang" was a lot faster than JDK 1.5. I was in for quite a surprise. My application threw an NPE while starting up. Why would changing JVMs cause an NPE? The startup was indeed much faster, but that was because the NPE caused less things to load. The NPE happened while Spring was "gluing" together several beans. I investigated a little, but found nothing obvious. Maybe I will dig deeper later.

Update: Not sure what caused the above problem, but since the official release of Mustang, I've switched over to using very successfully. There are definitely some big performance improvements, both in the client and server modes. I'm looking forward to making use of its scripting language features.

No comments: