Problem :
I see many people go crazy about 64bit libraries,
and preferring them in general to the 32bit counter parts.
I realise there is a lot of talk that gets lost in translation, and that the 64bit can be often over-valued.
The setting is libraries that are called on web application, I’m aware that a new instance of the web app is generated for each hit. Therefore I’m thinking that 64bit is not necessary as the instances in no way surpass 2Gb of RAM usage.
Help would be much appreciated! 🙂
Solution :
You’re right – in general you don’t need to worry about 64-bit libraries or executables unless you either (a) need a large address space (say > 2 GB) or (b) you have a performance-critical application (x86-64 has twice as many registers available as x86 and code typically runs around 30% faster).
x86_64 has double register number, SSE2/NX and many other newer features by default which may improve performance and reliability.
What are the performance characteristics of 64-bit versus 32-bit VMs?
Generally, the benefits of being able to address larger amounts of memory come with a small performance loss in 64-bit VMs versus running the same application on a 32-bit VM. This is due to the fact that every native pointer in the system takes up 8 bytes instead of 4. The loading of this extra data has an impact on memory usage which translates to slightly slower execution depending on how many pointers get loaded during the execution of your Java program. The good news is that with AMD64 and EM64T platforms running in 64-bit mode, the Java VM gets some additional registers which it can use to generate more efficient native instruction sequences. These extra registers increase performance to the point where there is often no performance loss at all when comparing 32 to 64-bit execution speed.
The performance difference comparing an application running on a 64-bit platform versus a 32-bit platform on SPARC is on the order of 10-20% degradation when you move to a 64-bit VM. On AMD64 and EM64T platforms this difference ranges from 0-15% depending on the amount of pointer accessing your application performs.
You can see many benchmarks here: Ubuntu 32-bit, 32-bit PAE, 64-bit Kernel Benchmarks. In general performance increase would be about 0-15%, but results may vastly varied, esp. on some apps which use register/calculation (esp. 64 bit maths) extensively