一、JVM的运行模式java
vm通常有两种运行模式,client和server(JDK 7 后有第三种 Tiered server,后续会涉及到)。linux
二、JVM 32仍是64位的选择服务器
原则是由应用程序的内存占用来决定,有以下原则能够参考:优化
OS | java堆大小 | 32位仍是64位JVM |
win | <1300M | 32位JVM |
win | 1300M<x<32G | 使用-d64 -XX:+UseCompressedOops 启用64位JVM |
win | >32G | 使用-d64 启用64位JVM |
linux | <2G | 32位JVM |
linux | 2G<x<32G | 64位 |
linux | >32G | 64位 |
solaris | <3G | 32位 |
solaris | 3G<x<32G | 64位 |
solaris | >32G | 64位 |