Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use 32-bit or 64-bit JDK?

Tags:

java

Years ago, I tried 64-bit JDK but it was really buggy.

How stable would you say it is now? Would you recommend it? Should I install 64-bit JDK + eclipse or stick to 32-bit? Also, are there any advantages of 64-bit over 32-bit other than bypassing the 4 GB memory limit?

like image 256
user2348638 Avatar asked May 03 '13 23:05

user2348638


1 Answers

Only begin to bother with that if you want to build an application that will use a lot of memory (namely, a heap larger than 2GB).

Allow me to quote Red Hat:

The real advantage of the 64-bit JVM is that heap sizes much larger than 2GB can be used. Large page memory with the 64-bit JVM give further optimizations. The following graph shows the results running from 4GB heap sizes, in two gigabyte increments, up to 20GB heap.

That, in a pretty graph:

32 bit vs 64 bit JVMs in performance

See, no big difference.

See more (more graphs, yay!) in: Java Virtual Machine Tuning

like image 111
acdcjunior Avatar answered Sep 23 '22 04:09

acdcjunior