[JAVA學習筆記-94]JVM的client與server模式

    client模式在 64-bit JDK上已經被忽略了,直接使用Java Hotspot Server VM.
出處:https://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html

-client
Selects the Java HotSpot Client VM. A 64-bit capable JDK currently ignores this option and instead uses the Java Hotspot Server VM.
For default Java VM selection, see the Server-Class Machine Detection page at
http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html


-server
Selects the Java HotSpot Server VM. On a 64-bit capable JDK, only the Java Hotspot Server VM is supported so the -server option is implicit.


For default a Java VM selection, see the Server-Class Machine Detection page at
http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html

兩種模式的確有一些差別:
client模式:
優化了內存佔用,啓動速度,應用執行速度,例如對GUI的響應更迅速。
server模式:
在運行性能、穩定性上做了更多優化,例如可能針對高併發場景,對鎖,內存的使用進行了優化。更適用於長時間穩定高強度的應用。

根據官方文檔來看,64位平臺上兩者的差異已經很小,模式使用server模式。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章