简体   繁体   English

64位Java适用于小型独立应用程序

[英]64 Bit Java for small stand alone applications

Is it really a worth migrating small stand alone java applications (Max : 100-200MB heap) on 64 bit Java. 是否值得在64位Java上迁移小型独立Java应用程序(最大:100-200MB堆)。 Are there any specific advantages; 有什么特别的优点; My observation is , it just increases memory footprint of the application. 我的观察是,它只是增加了应用程序的内存占用。

Please post your experiences / opinions. 请发表您的经验/意见。

From the official FAQ : 官方常见问题解答

What are the performance characteristics of 64-bit versus 32-bit VMs? 64位与32位VM的性能特征是什么?

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. 通常,与在32位VM上运行相同的应用程序相比,能够处理更大量内存的好处与64位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. 这是因为系统中的每个本机指针占用8个字节而不是4个。这个额外数据的加载会对内存使用产生影响,这会导致执行速度稍慢,具体取决于执行期间加载的指针数量。你的Java程序。 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. 好消息是,在64位模式下运行AMD64和EM64T平台时,Java VM会获得一些额外的寄存器,可用于生成更高效的本机指令序列。 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. 这些额外的寄存器将性能提高到在比较32位到64位执行速度时通常没有性能损失的程度。
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. 当您迁移到64位VM时,将64位平台上运行的应用程序与SPARC上的32位平台相比,性能差异大约为10-20%。 On AMD64 and EM64T platforms this difference ranges from 0-15% depending on the amount of pointer accessing your application performs. 在AMD64和EM64T平台上,这种差异范围为0-15%,具体取决于访问应用程序的指针数量。

I'd say, if it isn't broken, don't fix it. 我会说,如果没有破坏,请不要修理它。

If you switch to 64-bit on x64 you can take advantage of the 64-bit registers and additional registers. 如果在x64上切换到64位,则可以利用64位寄存器和其他寄存器。 This might improve performance by 5%. 这可能会使性能提高5%。

You can use -XX:+UseCompressedOops to use the same memory footprint (it uses 35-bit address space, up to 32 GB in 32-bit values) but I have found it ends up costing about 5% of performance. 您可以使用-XX:+UseCompressedOops来使用相同的内存占用(它使用35位地址空间,32位值最多32 GB)但我发现它最终耗费约5%的性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM