Do I need to understand the difference between a 32-bit JVM and a 64-bit JVM?
If you are not creating a performance-critical application, you do not need to understand the difference. The subtle difference between a 32-bit JVM and a 64-bit JVM will not make much difference for your application. You can skip reading further
Does a 64-bit JVM work better than a 32-bit JVM?
Most of us believe that the 64-bit version is larger than the 32-bit one, so the performance of the 64-bit JVM will be better than the 32-bit performance of the JVM. Unfortunately, this is not the case. A 64-bit JVM may have a slight performance degradation than a 32-bit JVM. The following is an excerpt from the Oracle JDK documentation regarding the performance of a 64-bit JVM:
"Typically, the benefits of handling large amounts of memory are accompanied by a slight performance loss in 64-bit virtual machines compared to running the same application on a 32-bit virtual machine.
The difference in performance when comparing an application running on a 64-bit platform with a 32-bit platform in SPARC is about 10-20% when switching to a 64-bit virtual machine. On AMD64 and EM64T platforms, this difference ranges from 0 to 15% depending on the number of pointers accessing your application. "
Whether the 32-bit JVM or the 64-bit JVM matters.
What to consider when upgrading from a 32-bit JVM to a 64-bit JVM? a. GC Pause Time
The main reason for migrating from a 32-bit JVM to a 64-bit JVM is to achieve a large heap size (i.e. -Xmx). When you increase the heap size, the GC delay time automatically starts to increase, because now there is more garbage left in the memory for cleaning. Before migrating, you must correctly configure the GC, otherwise your application may take from a few seconds to several minutes. You can use tools like GCeasy to find the right GC settings for the newly enlarged heap size.
b. Native library
If your application uses its own Java interface (JNI) to access its own libraries, then you also need to update your own libraries. Because the 32-bit JVM can only use the 32-bit native library. Likewise, a 64-bit JVM can only use a 64-bit native library.