9

I've recently moved to a 64 bit OS on Windows Server 2008 Enterprise.

It seems that my java programs are running significantly slower than 32 bit on Windows 2003.

Would really any feedback.

Is this a known issue? Are there specific settings to improve performance?

(I'm aware that there is a small performance penalty for moving to 64bit but I'm seeing a significant performance hit).

2 Answers 2

7

With 64-bit JVM, you may see different performance however you will see much more difference using a different OS on a different machine.

If you want to see if using 64-bit references is slowing you down, you can enable -XX:+UseCompressedOops which causes the 64-bit JVM to use 32-bit references but can still access 32 Gb of memory.

Another way to test this is to use a 32-bit JVM on your system. ;)

We have a latency sensitive system and see little performance advantage in using 32-bit references on a 64-bit JVM as it shifts every addres by 3 bits. The 32-bit JVMs smaller register set hurts us more than it helps.

EDIT: For more details

http://wikis.sun.com/display/HotSpotInternals/CompressedOops

http://docs.oracle.com/javase/7/docs/technotes/guides/vm/performance-enhancements-7.html

http://blog.juma.me.uk/2008/10/14/32-bit-or-64-bit-jvm-how-about-a-hybrid/

Sign up to request clarification or add additional context in comments.

2 Comments

How does the 64-bit JVM use 32-bit references but can still access 32 Gb of memory?
Its uses a 32 bit index, knowing each object will start on a 8 byte boundary (8 byte alignment). So it can address up to 2^32 * 8 bytes or 32 GB.
3

Yes it is, take a look at the Hotspot FAQ.

8 byte pointers increase the code and data size and slow down everything. If you are looking for performance and won't need a big heap, try a 32bit Java VM.

6 Comments

+1: Interesting, I didn't know that using a 64-bit JVM meant you were always using the server VM.
Yes I know this - but I'm talking not about a small loss but a significant slow down.
Previously Sun made the Solairs/Linux JVM use -server by default and Windows use -client by default. (Perhaps a bias as to what they thought they are good for ;) With 64-bit, all their releases use -server by default.
The 32-bit JVM takes longer to perform 64-bit operation and has half the number of registers it can use. For 64-bit operations, it is slower (basically if use long alot) double always uses the FPU registers which are much the same since the days of the 8087 (which had 80-bit registers)
Try -server on your 32bit install and see if there is some difference in performance. And try a 32bit VM on your 64bit OS to see, if it is due to the OS or the Java-VM.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.