google搜索 51Testing站内搜索                    软件测试门户 | 软件测试培 训 | 文章资料精选 | 软件测试论坛 | 软件测试博客 | 测试招聘求职 
打印

jboss tomcat weblogic websphere 性能对比测试 -转贴,比较经典的冬冬

jboss tomcat weblogic websphere 性能对比测试 -转贴,比较经典的冬冬






jboss tomcat weblogic websphere 性能对比测试 (1)
小弟最近为几个项目选择服务器及软件,这几个项目还都不小,投入的资金各不相同但都很可观。本人一向认为性能由硬件决定,软件稳定性比性能更重要。不过,虽然小弟手里面掌控的资金绝对够用,但不能任由所谓的技术专家和销售人员摆布我的决定,所以小弟自行要对服务器硬件、软件进行测试,本文仅仅是一个开端,等以后有时间会给出一些更科学的测试结果。


测试系统环境: PC机, windows xp sp2
CPU:AMD Athlon(tm) 64 Processer 3000+ 1.80GHz
内存:1.00GB
硬盘:7200转
数据库:Mysql 5.0.17
数据库引擎:InnoDB, max connection:2000
测试工具:microsoft web application stress tool 1.1
测试模拟环境:200 users, 20 stress multiper(sockets per thread), 60 seconds

测试代码说明:

因小弟用pc测试,程序和数据库都较为简单,

mysql的表结构:
CREATE TABLE tt (
id text;
);

用来测试的jsp程序:
<%

  String  url="jdbc:mysql://localhost/test?user=root&password=mysql";
  Class.forName("com.mysql.jdbc.Driver").newInstance();
  Connection connection=DriverManager.getConnection(url);
  Statement statement = connection.createStatement();
  String sql="SELECT * FROM tt";
  int dd = statement.executeUpdate("insert into tt values('you are my angel')");
  
  out.println("insert::::" + dd + "<br>");  
  ResultSet rs = statement.executeQuery(sql);
  ResultSetMetaData rmeta = rs.getMetaData();
  int numColumns=rmeta.getColumnCount();
  rs.next();
  
  out.print("result:: " + rs.getString(1)+" ");
  out.print("<br>");

  rs.close();   
  statement.close();   
  connection.close();   
%>   

服务器:weblogic 9.1
测试结果:平均每秒钟响应14.71个请求,总共响应882个请求
内存占用约:335MB
tool reports:

================================================================================
================================================================================
Report name:                  12/30/2005 11:15:36 AM weblogic 250-u 20-thread
Run on:                       12/30/2005 11:15:36 AM
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               882
Requests per Second:          14.71

Socket Statistics
--------------------------------------------------------------------------------
Socket Connects:              902
Total Bytes Sent (in KB):     240.83
Bytes Sent Rate (in KB/s):    4.02
Total Bytes Recv (in KB):     209.48
Bytes Recv Rate (in KB/s):    3.49

Socket Errors
--------------------------------------------------------------------------------
Connect:                      0
Send:                         0
Recv:                         0
Timeouts:                     0

RDS Results
--------------------------------------------------------------------------------
Successful Queries:           0


Script Settings
================================================================================
Server:                       localhost
Number of threads:            20

Test length:                  00:01:00
Warmup:                       00:00:00
Cooldown:                     00:00:00

Use Random Delay:             No

Follow Redirects:             Yes
Max Redirect Depth:           15


Clients used in test
================================================================================
localhost

Clients not used in test
================================================================================
Result Codes
Code      Description                   Count     
================================================================================
200       OK                            882      


Page Summary
Page                            Hits      TTFB Avg  TTLB Avg  Auth      Query     
================================================================================
GET /ttg/dbtest.jsp             882       1320.73   1321.09   No        No        


服务器:JBossAS-4.0.3 SP1
测试结果:平均每秒钟响应22.88个请求,总共响应1374个请求
内存占用约:165MB


tool reports:
================================================================================
================================================================================
Report name:                  12/30/2005 11:10:08 AM jboss 250-u 20-thread
Run on:                       12/30/2005 11:10:08 AM
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               1374
Requests per Second:          22.88

Socket Statistics
--------------------------------------------------------------------------------
Socket Connects:              1394
Total Bytes Sent (in KB):     378.45
Bytes Sent Rate (in KB/s):    6.30
Total Bytes Recv (in KB):     440.74
Bytes Recv Rate (in KB/s):    7.34

Socket Errors
--------------------------------------------------------------------------------
Connect:                      0
Send:                         0
Recv:                         0
Timeouts:                     0

RDS Results
--------------------------------------------------------------------------------
Successful Queries:           0


Script Settings
================================================================================
Server:                       localhost
Number of threads:            20

Test length:                  00:01:00
Warmup:                       00:00:00
Cooldown:                     00:00:00

Use Random Delay:             No

Follow Redirects:             Yes
Max Redirect Depth:           15


Clients used in test
================================================================================
localhost

Clients not used in test
================================================================================
Result Codes
Code      Description                   Count     
================================================================================
200       OK                            1374      


Page Summary
Page                            Hits      TTFB Avg  TTLB Avg  Auth      Query     
================================================================================
GET /dbtest.jsp                 1374      847.70    847.71    No        No        


服务器:apache-tomcat-5.5.12
测试结果:平均每秒钟响应14.94个请求,总共响应897个请求
内存占用约:50MB

tool reports:
================================================================================
================================================================================
Report name:                  12/30/2005 11:12:55 AM tomcat 250-u 20-thread
Run on:                       12/30/2005 11:12:55 AM
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               897
Requests per Second:          14.94

Socket Statistics
--------------------------------------------------------------------------------
Socket Connects:              917
Total Bytes Sent (in KB):     232.34
Bytes Sent Rate (in KB/s):    3.87
Total Bytes Recv (in KB):     197.93
Bytes Recv Rate (in KB/s):    3.30

Socket Errors
--------------------------------------------------------------------------------
Connect:                      0
Send:                         0
Recv:                         0
Timeouts:                     0

RDS Results
--------------------------------------------------------------------------------
Successful Queries:           0


Script Settings
================================================================================
Server:                       localhost
Number of threads:            20

Test length:                  00:01:00
Warmup:                       00:00:00
Cooldown:                     00:00:00

Use Random Delay:             No

Follow Redirects:             Yes
Max Redirect Depth:           15


Clients used in test
================================================================================
localhost

Clients not used in test
================================================================================
Result Codes
Code      Description                   Count     
================================================================================
200       OK                            897      


Page Summary
Page                            Hits      TTFB Avg  TTLB Avg  Auth      Query     
================================================================================
GET /ttg/dbtest.jsp             897       1305.27   1305.28   No        No   

服务器:websphere 6.0
测试结果:平均每秒钟响应23.04个请求,总共响应1384个请求
内存占用约:217MB
tool reports:
================================================================================
================================================================================
Report name:                  12/30/2005 1:50:31 PM websphere 250-u 20-thread
Run on:                       12/30/2005 1:50:31 PM
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               1384
Requests per Second:          23.04

Socket Statistics
--------------------------------------------------------------------------------
Socket Connects:              1403
Total Bytes Sent (in KB):     341.65
Bytes Sent Rate (in KB/s):    5.69
Total Bytes Recv (in KB):     293.80
Bytes Recv Rate (in KB/s):    4.89

Socket Errors
--------------------------------------------------------------------------------
Connect:                      0
Send:                         0
Recv:                         0
Timeouts:                     0

RDS Results
--------------------------------------------------------------------------------
Successful Queries:           0


Script Settings
================================================================================
Server:                       localhost
Number of threads:            20

Test length:                  00:01:00
Warmup:                       00:00:00
Cooldown:                     00:00:00

Use Random Delay:             No

Follow Redirects:             Yes
Max Redirect Depth:           15


Clients used in test
================================================================================
localhost

Clients not used in test
================================================================================


Result Codes
Code      Description                   Count     
================================================================================
200       OK                            1384      


Page Summary
Page                            Hits      TTFB Avg  TTLB Avg  Auth      Query     
================================================================================
GET /ttg/dbtest.jsp             1384      848.31    848.32    No        No     

结论:

呵呵,pc上面说明的问题能有多少呢?一点点吧!
为您提供软件测试免费职业咨询、软件测试高薪技能培训、软件测试人才免费推荐的一条龙服务!!!
联系msn:sinckyzhang@gmail.com
欢迎访问http://hr.51testing.com 国内第一个专业的软件测试领域人才招聘网站!企业招聘、个人求职全免费!

TOP

Code      Description                   Count     
200       OK                            1384      
----------------------------------------------------------------------------------------
如果是:
Code      Description                   Count     
403       Forbidden                      5738

这是什么问题呢?

TOP

应该是禁止访问

TOP

楼主通过Web Application Stress Tool Version:1.1.293.1测试了4台server,情况如下,能不能说明TOMCAT比weblogic 9.1强,websphere 6.0和JBossAS-4.0.3 SP1差不多?(内存占用比例)
服务器:weblogic 9.1
测试结果:平均每秒钟响应14.71个请求,总共响应882个请求
内存占用约:335MB

服务器:apache-tomcat-5.5.12
测试结果:平均每秒钟响应14.94个请求,总共响应897个请求
内存占用约:50MB

务器:JBossAS-4.0.3 SP1
测试结果:平均每秒钟响应22.88个请求,总共响应1374个请求
内存占用约:165MB

服务器:websphere 6.0
测试结果:平均每秒钟响应23.04个请求,总共响应1384个请求
内存占用约:217MB

TOP

我用过weblogic8.1sp3和tomcat5.5.27
我知道影响其性能表现的和很多配置有关,比如线程数的影响就会很大
我觉得单纯这样测试没有什么价值,必须是针对具体应用的情况进行具体的配置
针对应用的规模和类型也可以选用不同的中间件

而且tomcat在小的并发量下比其他中间件的表现都要好。所以一般都用在开发环境下
但是不能凭这就说tomcat比其他中间件性能就要好

这是我自己的理解,不妥之处请指正
娃哈哈~

TOP

同意楼上说的。


每种应用服务器本身还有个根据应用系统的情况进行的参数设置的优化过程,其性能表现的和很多参数配置有关。这种测试结果只能说明它们在你当前配置下的结果。

TOP

看了后,觉得很有意思。难道这样就可以判定用哪一个来做server了?我想不止这么简单吧。

TOP

首先肯定楼主的工作,但是就像前几位所说的,每个服务器的具体配置是不同的,针对的应用和规模也不一样。所以根据这个简单的测试来选择服务器是没有什么站得住脚的根据

TOP

楼主的测试很有借鉴之处阿,继续做下去哦支持楼主

TOP

没做过,呵呵,不知道,不过从经验来讲,jboss比tomcat好,weblogic比jboss好,根据系统实际情况而定了。

[ 本帖最后由 森林一木 于 2006-3-17 11:09 编辑 ]

TOP

en 支持楼主

TOP

jsp语句没有给出计算时间的函数,楼主哪些数据是通过什么工具观察到的
不然,别人咋知道哩

TOP

WAS是用来测试这个的麽?
200*20 的并发算是不错了
我们公司每次非要我填
20*2
汗!
闭关修炼ing...!
我就是我,你再也找不到这样一个我!

TOP

性能分析


得出了性能测试的数据,那么最后的性能分析呢?

TOP

很早就见过

TOP

可比性不够
51testing

TOP

这个比较意义不大

TOP

个人觉得LZ这个比较有点理想化了
测试环境应该尽量与你要做的项目相一致,你的测试比较是基于本机的测试,不能反应什么问题.

TOP

没有什么太大意义,一般在大负载的情况下,websphere表现不错.
在生产环境下tomcat和其他几种应用服务器没法比,只适合在一定的开发环境下使用,毕竟功能有限。

TOP

才看到.比较长.....顶
若幸福飘然而逝了,那是多少的后悔都换不回来的.爱情,或许会冷却,但是不得以放弃的真情却会永远在心中。

TOP

 
当前时区 GMT+8, 现在时间是 2008-7-9 17:40Copyright(C)上海博为峰软件技术有限公司 2001-2007 电话:021-64471599-8017
当您在访问网站、论坛及博客过程中遇到问题时可发送email:webmaster@51testing.com或发送论坛短信至管理员风在吹