在another SO question中,我问为什么我的java程序在AMD上比在英特尔机器上运行得更快。但似乎我是唯一一个观察过这一点的人。
现在,我想邀请您与SO社区分享您当地Java性能的数量。我在不同硬件上观看JBoss的启动时观察到了很大的性能差异,因此我将此程序设置为此比较的基础。
如需参与,请下载JBoss 5.1.0.GA并运行:
jboss-5.1.0.GA/bin/run.sh (or run.bat)
这将启动JBoss的标准配置,而无需任何额外的应用程序。然后查找启动过程的最后一行,如下所示:
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build:
SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 25s:264ms
请重复此过程,直到打印时间稍微稳定,并将此行与您的硬件上的一些注释一起发布(我使用cpu-z获取信息)和操作系统如下:
java version: 1.6.0_13
OS: Windows XP
Board: ASUS M4A78T-E
Processor: AMD Phenom II X3 720, 2.8 GHz
RAM: 2*2 GB DDR3 (labeled 1333 MHz)
GPU: NVIDIA GeForce 9400 GT
disc: Seagate 1.5 TB (ST31500341AS)
使用您的投票将最快的配置带到最顶层。
我对结果非常好奇。
编辑:
到目前为止,只有少数成员分享了他们的结果。我真的对其他一些架构获得的结果很感兴趣。如果某人使用 MAC(桌面)或运行 Intel i7 且频率低于3 GHz,请启动JBoss并分享您的搜索结果。它只需要几分钟。
答案 0 :(得分:9)
比较Java程序的性能非常困难。我在Java中编写了一个计算密集型程序(光线跟踪器),令我惊讶的是,它在我的MacBook Pro上的运行速度比在台式机上快30%,而两者都有非常相似的Core 2 Duo处理器。然后我改变了一些参数,突然反过来了。有时在同一台机器上,具有相同输入的程序会突然花费5%-10%的时间来运行......
查看并发大师Brian Goetz撰写的这些优秀文章,了解Java性能的测量结果是多么棘手:
(同一网站上的更多文章)。
Java程序的性能在很大程度上取决于您是使用服务器还是客户端VM,哪个版本的操作系统以及您正在使用的Java版本。你的问题主要是关于启动时间。使用服务器VM时,启动时间通常会更长,但Java程序将在服务器VM上运行得更快。启动时间不是衡量一般性能的好方法。
答案 1 :(得分:4)
22:29:38,959 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 17s:210ms
java version: 1.7.0-ea
OS: Ubuntu 9.10, 64bit
Board: ASUS P6T
Processor: Intel i7 920 @ 3.4Ghz
RAM: 12GB DDR3
GPU: Dunno
无聊的老太阳-java 1.6.0_15-b03:
22:32:12,360 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 18s:532m
我很高兴能在码头开展日常工作,大约4秒钟开始。
答案 2 :(得分:1)
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 22s:848ms java version: 1.6.0_13 OS: Windows XP (32 Bit) Board: ASUS M4A78T-E Processor: AMD Phenom II X3 720, 2.8 GHz RAM: 2*2 GB DDR3 (labeled 1333 MHz) GPU: NVIDIA GeForce 9400 GT disc: Seagate 1.5 TB (ST31500341AS)
答案 3 :(得分:1)
21:51:00,281 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build:
SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 46s:456ms
java version: 1.6.0_15,Apple Inc.
OS: Mac OSX 10.6.1
Board: MacBookPro3,1
Processor: Intel Core 2 Duo 2.4Ghz 4mb L2
RAM: 4GB DDR2
GPU: GeForce 8600M GT 256mb
disc: FUJITSU 160GB (MHW2160BHPL)
不到一分钟......我很高兴我没有必要使用[beep]那片开发。
答案 4 :(得分:1)
23:12:07,437 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
JBoss_5_1_0_GA date=200905221634)] Started in 29s:1ms
Java version: 1.6.0_16
OS: Windows XP SP3
Board: ASUS P35KR
Processor: Intel C2Q Q8300 2.5Ghz
RAM: 2*2 GB PC2-6400
GPU: NVIDIA GeForce 8600GTS
disc: Seagate 300GB (ST3320620AS)
我也禁用了-server模式几次重复测试,但时间上的差异可能只是噪音(<1s)。
答案 5 :(得分:1)
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build:
SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 25s:573ms
java version: 1.6.0_16 64-Bit
OS: Windows Vista Ultimate 64-Bit SP1
Board: (Lenovo Thinkstation, don't know what motherboard)
Processor: Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz
RAM: 8GB 2*2 GB DDR3
GPU: NVIDIA GeForce 285
disc: Intel SSD X25-E 32GB (used for the tests)
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
无法使用-client进行测试,Java强制-server模式可能是由于8GB RAM。 我觉得有趣的是磁盘速度似乎没有太大影响(随机访问中的SSD磁盘应该非常快)
+1码头:)
答案 6 :(得分:1)
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 26s:412ms
java version: 1.6.0_15 - 64-Bit Server VM (mixed mode) OS: Mac OSX 10.6.1 Board: MacPro1,1 Processor: 2x Dual-Core Intel Xeon 2.66 GHz (Total of 4 Cores) RAM: 4 GB GPU: NVIDIA GeForce 7300 GT disc: Seagates 500GB ST3500410AS
答案 7 :(得分:1)
Java Version: 1.6.0_17
OS: Mac OSX 10.6.1
Board: iMac 11,1
Processor: Intel Core i7 2.8Ghz
RAM: 4GB DDR3
GPU: ATI Radeon HD 4850
disc: Seagate 1TB (ST31000528ASQ)
首先运行:
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA
date=200905221053)] Started in 20s:236ms
在5之后:
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA
date=200905221053)] Started in 18s:934ms
答案 8 :(得分:1)
从2007年底开始的iMac(除了SSD):
23:49:21,095 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 27s:136ms
Java Version: 1.6.0_22,Apple Inc. (32-bit client VM)
OS: Mac OSX 10.6.5
Board: iMac 7,1
Processor: Intel Core 2 Duo, 2.4 GHz
RAM: 3 GB DDR2
GPU: ATI Radeon HD 2600
disc: SSD (OCZ Vertex 2 240GB)
在旧的Linux PC上,2003-2004的CPU:
00:11:56,405 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 2m:5s:150ms
Java Version: 1.6.0_22 (32-bit, server VM)
OS: Ubuntu 10.04 "Lucid Lynx" (Linux 2.6.32)
Board: MSI MS-6590
Processor: Athlon XP 2600+ (1.92 GHz single core)
RAM: 1280 MB DDR
GPU: nVidia GeForce FX 5200
disc: 2x (RAID1) 500GB SAMSUNG HD501LJ
答案 9 :(得分:1)
11:14:20,433 INFO [ServerInfo] Java version: 1.6.0_29,Apple Inc.
11:14:20,433 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
11:14:20,433 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM
20.4-b02-402,Apple Inc.
11:14:20,433 INFO [ServerInfo] OS-System: Mac OS X 10.6.8,x86_64
11:14:34,657 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build:
SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 15s:605ms
Model Name: MacBook Pro
Model Identifier: MacBookPro8,3
Processor Name: Intel Core i7 Processor
Speed: 2.3 GHz
Number Of Processors: 1
Total Number Of Cores: 4
L2 Cache (per core): 256 KB
L3 Cache: 8 MB
Memory: 8 GB
SATA drive
Capacity: 256.06 GB (256,060,514,304 bytes)
Model: M4-CT256M4SSD2
Revision: 0009
答案 10 :(得分:1)
14:18:59,559 INFO [ServerImpl] JBoss(Microcontainer)[5.1.0.GA(build:SVNTag = JBoss_5_1_0_GA date = 200905221053)] 19年代开始:166ms
java version: 1.6.0_31 x64
OS: Windows 7 x64
Board: lenovo 4524R78
Processor: iNTEL CORE I5 2400
RAM: 4*4 GB DDR3 (labeled 1333 MHz)
GPU: NVIDIA GeForce GTX 560TI
disc: Seagate 500G (ST95005620AS)
答案 11 :(得分:1)
19:16:13,844 INFO [ServerImpl] JBoss(Microcontainer)[5.1.0.GA(build:SVNTag = JBoss_5_1_0_GA date = 200905221053)] 47s开始:758ms
java version: 1.5.0_22 OS: Windows 7 64bit Board: ??? Processor: Inter Core 2 Duo P8600 2.4 GHz RAM: 2*4 GB DDR2 GPU: ??? disc: Kingston SSD
答案 12 :(得分:0)
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 59s:578ms java version: 1.6.0_01 OS: Windows XP (32 Bit) Board: Toshiba Notebook Sattelite A210-19Z Processor: AMD Athlon 64 X2 TK-57, 1.9 GHz RAM: 2 * 1GB DDR2 630 MHz GPU: ATI Radeon X1200 disc: Hitachi HTS542520K9SA00
答案 13 :(得分:0)
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 27s:47ms java version: 1.6.0_16 OS: Windows XP Board: M2N32-SLI DELUXE Processor: AMD Phenom II X4 940, 3 GHz RAM: 2 * 2 GB DDR2 (800 MHz) GPU: Matrox Millennium G550 PCIe disc: WDC WD1500ADFD-00NLR1
答案 14 :(得分:0)
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build:
SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 24s:945ms
java version: 1.6.0_17
OS: Windows 7 Home Premium (32 Bit)
Board: ASUS M4A78T-E
Processor: AMD Phenom II X3 720, 2.8 GHz
RAM: 2*2 GB DDR3 (labeled 1333 MHz)
GPU: NVIDIA GeForce 9400 GT
disc: Intel Solid State Disk (SSDSA2SH032G1GC 2,5")
答案 15 :(得分:0)
21:57:04,585 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA
(build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in **27s:890ms**
Java Version: 1.6.0_18 (64-bit)
OS: Ubuntu 10.10 (Linux 2.6.32.29)
Processor: **Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz**
RAM: 4096 MB DDR2
disc: 500GB SAMSUNG HD501LJ