国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發(fā)設(shè)計 > 正文

Linux 平臺的 JVM 性能評測

2019-11-18 12:14:03
字體:
供稿:網(wǎng)友

  在linux平臺上,Sun的Hotspot性能很一般,不如同樣環(huán)境下Windows下的Hotspot表現(xiàn)好;
  
  IBM的JVM無論在Linux還是Windows平臺性能很卓越,不過IBM主要還是把精力放在Linux/Unix平臺上,它的Windows平臺的JVM到1.3.1性能口碑很好,但是以后就沒有再單獨發(fā)布新版本,因此從IBM網(wǎng)站也只能下載到Windows下1.3.1版本JVM,至于Linux平臺下的1.4.1版本的JVM性能表現(xiàn)尚待檢驗;
  
  而BEA的JRockit針對Intel 的CPU進行了指令優(yōu)化,作為服務(wù)器的JVM來說在業(yè)界似乎一向評價頗好,但是我還不清楚JRockit在Linux上表現(xiàn)如何。這次我是要在SuSE Linux上跑jroller,因此主要關(guān)注3個JVM在我的SuSE 9上面的性能表現(xiàn)。
  
  因為要作為網(wǎng)站服務(wù)器來使用,因此我還比較關(guān)注JRockit和IBM JVM的License問題,分別查了一下BEA和IBM的協(xié)議,看到這兩個JVM都是可以免費使用,不管是開發(fā)目的,還是產(chǎn)品目的,假如是購買了其公司其他產(chǎn)品,那么可以得到免費的JVM方面的support,假如只是從網(wǎng)站下載使用其JVM,那么就沒有免費的support,但是有商業(yè)付費的support。
  
  在TSS上面有一個關(guān)于JRockit的Thread:
  
  http://www.theserverside.com/news/thread.tss?thread_id=22895
  
  Cameron Purdy對于3個JVM的評價如下:
  
  引用:
  Every application is different, so there is no single "best JVM." These JVMs only compete on the x86 platform anyway, and they perform differently on Windows and Linux. The IBM JVM has been mUCh faster at math (all number PRocessing it seems) compared to the Sun JVM. The jRockit JVM has been much better at handling large numbers of threads and sockets. The Sun JVM has been the fastest at general business logic running in server mode, but there used to be stability issues with the hotspot server mode that prevented its use for many server applications.
  
  To be honest, with the above exception noted, we've seen the most stability and least weird behavior with the Sun JVMs. I haven't had a chance to look at the latest BEA release, though, and it's probably the one that's been improving the fastest. 
  
  IBM JVM處理數(shù)學運算速度最快,BEA JVM處理大量線程和網(wǎng)絡(luò)socket性能最好,而Sun JVM處理通常的商業(yè)邏輯性能最好。不過Hotspot的Server mode被報告有穩(wěn)定性的問題。而他尚未有機會嘗試一下最新的JRockit。
  
  架設(shè)Blog系統(tǒng)我最關(guān)心的其實還是JVM的多線程處理能力和網(wǎng)絡(luò)socket處理能力,因此使用聞名的VolanoMark Benchmark進行了這方面的測試
  
  VolanoMark Benchmark是一個JVM性能測試程序,任何人都可以自己下載來測試:
  
  http://www.volano.com/benchmarks.Html
  
  這是2003年5月的測試報告
  http://www.volano.com/report/
  
  我下載了VolanoMark Benchmark,在Server上面分別安裝了Linux版本的JRockit1.4.2,Sun JDK1.4.2,和IBM JDK1.4.1。修改了一下VolanoMark的測試腳本(有些小問題)。VolanoMark測試主要是運行Volano自己開發(fā)的一個chat的web application,然后從客戶端進行壓力測試,統(tǒng)計web application單位時間內(nèi)處理并發(fā)請求的能力。測試主要有兩項:
  
  1、Loopback測試
  
  不進行網(wǎng)絡(luò)傳輸測試,因此可以測試出來JVM的performance
  
  2、 Network測試
  
  通過網(wǎng)絡(luò)進行測試,模擬真實環(huán)境的JVM處理能力。
  
  服務(wù)器軟硬件環(huán)境:
  
  服務(wù)器CPU:超線程1.8Gz Xeon CPU × 2
  操作系統(tǒng):SuSE Linux9.0 Professional
  Linux Kernel版本:2.4.21-202-smp4G
  Glibc版本:glibc-2.3.2-88
  
  Volano使用的是Tomcat4.0.3來做App Server。這也符合我的選擇,我正預備使用Tomcat來做App Server。每個測試分別執(zhí)行三次,測試結(jié)果如下:
  
  1、性能測試(Loopback)
  
 Linux 平臺的 JVM 性能評測(圖一)

  Performance
  
  VolanoMark version = 2.5.0.9
  Messages sent = 20000
  Messages received = 380000
  Total messages = 400000
  
  代碼:
  Sun JDK1.4.2
  
  Average throughput = 8848 messages per second
  Average throughput = 8060 messages per second
  Average throughput = 8046 messages per second
  
  代碼:
  IBM JDK1.4.1
  
  Average throughput = 15620 messages per second
  Average throughput = 17665 messages per second
  Average throughput = 15666 messages per second
  
  代碼:
  BEA JRockit1.4.2
  
  Average throughput = 16549 messages per second
  Average throughput = 15564 messages per second
  Average throughput = 15736 messages per second
  
  2、網(wǎng)絡(luò)服務(wù)處理能力測試
  
  VolanoMark version = 2.5.0.9
  Messages sent = 10000
  Messages received = 190000
  Total messages = 200000
  
Linux 平臺的 JVM 性能評測(圖二)

  代碼:
  BEA JRockit1.4.2
  
  Average throughput = 3938 messages per second
  Average throughput = 3290 messages per second
  Average throughput = 3648 messages per second
  Average throughput = 3328 messages per second
  
  代碼:
  Sun JDK1.4.2
  
  Average throughput = 2225 messages per second
  Average throughput = 2163 messages per second
  Average throughput = 2080 messages per second
  
  代碼:
  IBM JDK無法執(zhí)行測試
  
  測試總結(jié):
  在第一項性能測試中,3個JVM都完成測試,但是正如上面Purdy提到的一樣,Sun的Hotspot JVM在server mode情況下會出錯,必須使用cliet mode。在性能測試結(jié)果來看,IBM的JVM和BEA的JVM旗鼓相當,分值都相當高,而Sun的JVM性能差了幾乎一倍。
  
  在第二項網(wǎng)絡(luò)服務(wù)測試中,IBM的JVM無法完成測試,會出現(xiàn)段地址錯誤,JDK版本和glibc版本不兼容造成的。Sun的JVM也需要修改一下JVM參數(shù)才可以順利執(zhí)行,從測試結(jié)果來看,BEA的JRockit仍然遙遙領(lǐng)先于Sun的Hotspot。
  
  經(jīng)過本次測試,已經(jīng)決出了優(yōu)勝者,就是BEA的JRockit1.4.2。當然JRockit也有一些不足,例如在內(nèi)存消耗和CPU負載方面要明顯高于另外兩個JVM。
  
  JRockit除了性能上的優(yōu)勢,也有著豐富的性能調(diào)整選項和一個圖形監(jiān)控工具,和一個性能報告分析工具,這對于JVM的調(diào)優(yōu)有著非常大的幫助,鑒于性能方面的優(yōu)勢,以及可治理性方面的豐富功能,我決定選擇JRockit作為Tomcat的JVM來使用。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 鹰潭市| 清水河县| 穆棱市| 绵竹市| 巨鹿县| 平邑县| 泸水县| 成安县| 伊春市| 南漳县| 嘉黎县| 德阳市| 通山县| 中江县| 奉化市| 康保县| 密云县| 宜川县| 平顶山市| 新乡县| 连山| 辽源市| 云南省| 崇礼县| 新巴尔虎左旗| 和林格尔县| 陕西省| 新竹县| 杂多县| 武平县| 土默特左旗| 阿拉善左旗| 舞阳县| 婺源县| 临猗县| 宜章县| 汉阴县| 加查县| 咸阳市| 梅州市| 合山市|