当前位置: 首页 > java > 正文

use Volano对jvm的性能进行测试

使用Volano对jvm性能测试

网络测试报告:
http://www.volano.com/report/index.html

一、以下是2hei的测试情况:
原理:
启动volano server 会根据jdk的版本来设定默认的jvm值,然后启动简化版的Tomcat,并部署VolanoChat聊天系统;
启动客户端对VolanoChat进行连接,客户端模拟聊天者并发发送大量的消息,来测试jvm的性能。

使用JDK1.6

设定1.6的环境变量
export JAVA_HOME=/home/jdk1.6.0_06
export PATH=$JAVA_HOME/bin:$PATH

启动server:

./loopserver.sh sun16
java version “1.6.0_06”
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)

/home/jdk1.6.0_06/bin/java -server -Xmx64m -Dinstall.root=. -Dcatalina.home=. -cp .:lib/bootstrap.jar:lib/catalina.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/servlets-common.jar:lib/servlets-default.jar:lib/volanochat-server.jar:lib/xerces.jar COM.volano.Main

VolanoChat(TM) Server Version 2.5.0.9
Copyright (C) 1996-2002 Volano LLC.  All rights reserved.
Loading server properties from “/home/www.2hei.net/soft/voooo/conf/properties.txt”.
www.2hei.net:8000  VolanoChatPro – unlimited connections.
Apache Tomcat/4.0.3

启动client,对server进行压力测试
./loopclient.sh sun16

ulimit -Sn = 1024

java version “1.6.0_06”
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)

/home/jdk1.6.0_06/bin/java -server -Xmx64m -Dinstall.root=. -Dcatalina.home=. -cp .:lib/bootstrap.jar:lib/catalina.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/servlets-common.jar:lib/servlets-default.jar:lib/volanochat-server.jar:lib/xerces.jar COM.volano.Mark -run

执行结果:
java.vendor        = Sun Microsystems Inc.
java.vendor.url    = http://java.sun.com/
java.version       = 1.6.0_06
java.class.version = 50.0
java.compiler      = null
os.name            = Linux
os.version         = 2.6.9-67.0.15.ELsmp
os.arch            = i386

VolanoMark version = 2.5.0.9
Messages sent      = 20000
Messages received  = 380000
Total messages     = 400000
Elapsed time       = 12.862 seconds
Average throughput = 31099 messages per second

使用JDK1.4:

设定1.4的环境变量
export JAVA_HOME=/home/j2sdk1.4.2_17
export PATH=$JAVA_HOME/bin:$PATH

./loopserver.sh sun14
ulimit -Sn = 1024

java version “1.4.2_17”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_17-b06)
Java HotSpot(TM) Server VM (build 1.4.2_17-b06, mixed mode)

/home/j2sdk1.4.2_17/bin/java -server -Xmx64m -Dinstall.root=. -Dcatalina.home=. -cp .:lib/bootstrap.jar:lib/catalina.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/servlets-common.jar:lib/servlets-default.jar:lib/volanochat-server.jar:lib/xerces.jar COM.volano.Main

VolanoChat(TM) Server Version 2.5.0.9
Copyright (C) 1996-2002 Volano LLC.  All rights reserved.
Loading server properties from “/home/www.2hei.net/soft/voooo/conf/properties.txt”.
www.2hei.net:8000  VolanoChatPro – unlimited connections.
Apache Tomcat/4.0.3

./loopclient.sh sun14
ulimit -Sn = 1024

java version “1.4.2_17”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_17-b06)
Java HotSpot(TM) Server VM (build 1.4.2_17-b06, mixed mode)

/home/j2sdk1.4.2_17/bin/java -server -Xmx64m -Dinstall.root=. -Dcatalina.home=. -cp .:lib/bootstrap.jar:lib/catalina.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/servlets-common.jar:lib/servlets-default.jar:lib/volanochat-server.jar:lib/xerces.jar COM.volano.Mark -run

执行结果:
java.vendor        = Sun Microsystems Inc.
java.vendor.url    = http://java.sun.com/
java.version       = 1.4.2_17
java.class.version = 48.0
java.compiler      = null
os.name            = Linux
os.version         = 2.6.9-67.0.15.ELsmp
os.arch            = i386

VolanoMark version = 2.5.0.9
Messages sent      = 20000
Messages received  = 380000
Total messages     = 400000
Elapsed time       = 15.739 seconds
Average throughput = 25415 messages per second

二、测试结论:

在同等的硬件配置及操作系统下,测试每次都发送400000条数据,从执行时间和吞吐量上看jdk1.6的性能要比jdk1.4的高一些,
如吞吐量分别是每秒31099,25415。

 

网上其他的关于jdk性能的比较

下面是sun对与J2SE 1.4.2 和J2SE 5.0的性能比较

http://java.sun.com/performance/reference/whitepapers/5.0_performance.html

sun五个升级到jdk1.5的原因。  比如性能优化,稳定性优化,还有64位的支持等等

http://java.sun.com/developer/technicalArticles/J2SE/5reasons.html

本文固定链接: https://www.2hei.net/2008/07/13/use_volano_test_jvm/ | 2hei.net

该日志由 u2 于2008年07月13日发表在 java 分类下,
原创文章转载请注明: use Volano对jvm的性能进行测试 | 2hei.net
关键字: ,

报歉!评论已关闭.