Apache Tomcat Jboss 靜態頁面訪問軟件測試性能比較
操作系統:
Windows:
Windows Server 2003, Enterprise Edition (5.2, Build 3790) Service Pack 2 (3790.srv03_sp2_gdr.070304-2240) _32bits
Linux:
CentOS release 5.2 (Final) /Linux 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
硬件配置:
兩臺服務器配置相同,CPU:Xeon2.0×4 MEM:4G,其它配置略。
應用程序:
apache:
http://httpd.apache.org/download.cgi
apache_2.2.11
apache-tomcat:
http://tomcat.apache.org/download-60.cgi
apache-tomcat-6.0.18
jboss:
http://www.jboss.org/jbossas/downloads/
JBoss-4.2.3.GA
訪問靜態HTML頁面:
<html>
<head>
<title>html page</title>
</head>
<body>
<h1>Hello World !</h1>
</body>
</html>
測試腳本:
TestMain(){
web_reg_find("Fail=NotFound","Search=Body","Text=Hello World",LAST);
lr_start_transaction("default_htm");
web_url("default.htm",
"URL=http://testserver:8080/default.htm",
"Resource=0","RecContentType=text/html",
"Referer=","Mode=HTML", LAST);
lr_end_transaction("default_htm", LR_AUTO);
}
應用程序使用默認配置。
測試Windows使用10臺機器40個虛擬用戶,由于使用相同場景測試Linux系統點擊率達不到最大值,測試時使用11臺機55個虛擬用戶。
最高點擊率(hps) Apache Tomcat Jboss IIS Windows 6093 8304 8038 12660↑ Linux 11680 ↑ 12051↑ 11997 ↑
(“↑”表示點擊率還有上升空間)
本想測試一下動態頁面,但必須修改配置。用JSP頁面小壓了一下,內存溢出:
Tomcat:
Exception in thread "RMI TCP Connection(idle)" Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap spacejava.lang.OutOfMemoryError: Java heap space
Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Javaheap spaceException in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Javaheap space
Jboss:
ERROR [[/]] Session event listener threw exception
java.lang.OutOfMemoryError: Java heap space
測試配置又是一個大工程,專門作個話題。
原文轉自:http://www.anti-gravitydesign.com