This discussion is archived
0 Replies Latest reply: Aug 13, 2009 11:56 PM by 843804 RSS

Java 6/64 bit runs very slow on Solaris SPARC

843804 Newbie
Currently Being Moderated
Hi all,
I've recently upgraded our network management aplication from 1.5 to 1.6, and this worked seamlessly, with some little improvements in terms of overall response time. But, when I tried to use the 64 bit JRE, using the same Java libraries, I've found that the whole application was runinng very slow.

After analysing many thread dumps, I realized that that execution had, in each thread dump, many threads in BLOCKED state and, in most cases, the block was due to the access of a Java Class by name, using one of the synchronized methods ClassLoader.loadClass() or Class.forName(), from different threads. The same didn't happen with either the Java 5 or 6 version of the 32-bit runtime.

Some other useful notes:
1- I didn't see any special extra activity from the Garbage Collector, which I monitored using the jconsole and jstat tools
2- I've run the same test on the Java 5 (1.5.0_17) release of our application, using the 64 bit version of the JRE, and that one worked as fast as I expected
3- I've dumped some stack traces of the 32-bit execution of the Java 6 version, and I didn't see all those BLOCKED threads, even though the code is exactly the same
4- Finally, I've run some of the free benchmarks from the SPECjvm2008 suite, and I realized that the 64 bit runtime is about 15-20% slower than the 32 bit

Does anyone have some pointers to speed up the 64 bit runtime? My company had great expectations from the 64 bit runtime, but, given these results, we're thinking at going back to the Java 5/64 bit even if the Sun's support will end in October 2009.

Many Thanks,
Daniele

Java 6/64 bit runtime parameters:
java -d64 -server -Xmx10g
-XX:MaxPermSize=512m
-XX:PermSize=512m
-XX:+UseParallelGC
-XX:+UseParallelOldGC
-XX:+DisableExplicitGC
-XX:+UseCompressedOops
...
Hardware reference (+uname -a+):
Generic_127127-11 sun4v sparc SUNW,T5140
Java version (+java -version+):
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)
Final Note: someone might comment that the ClassLoader.loadClass() method is not synchronized, as it seems from the Sun's JavaDoc, but if you look at the Sun's code you'll see that it is.
protected synchronized Class loadClass(String name, boolean resolve)
Edited by: daniemar on Aug 13, 2009 11:55 PM