思步网

标题: jboss tomcat weblogic websphere 性能对比测试 [打印本页]

作者: 流浪开心果    时间: 2010-12-6 13:58
标题: 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上面说明的问题能有多少呢?一点点吧!
作者: lona_ma    时间: 2011-6-13 14:48
佩服lz的钻研精神,个人也一直很想做个类似的测试,,不过居然一直没做..
只是这个测试过于简单,对我等参考意义有限.. 期待lz以后何时可以对动态页面为主流的处理的体现好好测试一下, 大loading下的负载均衡仔细考量,,多CPU下的各个service的表现等等更加符合实际的情况..
唉,中文越来越差了,希望lz可以见谅
作者: 我是呆贼10    时间: 2013-3-31 21:31
呵呵。。。LZ敢整点更有创意的不?
作者: Findwadg    时间: 2013-4-12 14:02
果断MARK,前十有我必火!
作者: 猪是的念来过倒    时间: 2014-4-16 19:24
很有借鉴意义,先收藏了,谢谢楼主。
作者: 朱维妙    时间: 2014-7-17 22:31
有空一起交流一下。
作者: 石映飞云    时间: 2014-7-25 14:54
确实不错,顶先
作者: 乖乖、一起来    时间: 2014-7-31 20:46
还不错哦,如果再能多分享一些就perfect了!
作者: 喝奶茶的少年    时间: 2014-9-9 13:42
看起来不错
作者: 萌萌彬@    时间: 2014-10-27 16:12
有空一起交流一下。
作者: 岁月如歌、    时间: 2014-10-30 13:40
有空一起交流一下。
作者: 海沫深@    时间: 2014-11-21 18:11
不错 支持一个了
作者: 分开旅行    时间: 2015-1-21 14:44
还不错哦,如果再能多分享一些就perfect了!
作者: 岁月飘逝╰    时间: 2015-1-31 16:02
非常好,顶一下占位编辑
作者: 寻她人    时间: 2015-6-1 22:09
非常好,顶一下占位编辑
作者: 李珊    时间: 2015-6-29 11:30
前排支持下了哦~
作者: 七度光    时间: 2015-9-30 10:14
前排支持下了哦~
作者: 三重门。    时间: 2015-11-30 22:09
以我的经验来看,楼主的想法是可以执行的~
作者: 你直入生命    时间: 2016-3-16 09:37
支持,赞一个
作者: 那种倒影成月。    时间: 2016-10-22 07:22
我也来顶一下..
作者: 望树    时间: 2016-11-4 13:42
我了个去,顶了
作者: 彩色的黑!    时间: 2017-4-5 13:22
very good.
作者: 闲蛋i    时间: 2017-7-7 22:20
我了个去,顶了
作者: 我要专一了    时间: 2017-11-1 11:21
非常好,顶一下占位编辑
作者: 寵柳嬌花    时间: 2018-6-15 10:17
我也来顶一下..
作者: 深海苏眉鱼    时间: 2018-7-2 17:57
前排支持下了哦~
作者: 入花庭    时间: 2018-8-9 20:17
very good.
作者: 六角星    时间: 2018-10-30 21:15
很有借鉴意义,先收藏了,谢谢楼主。
作者: 清泊    时间: 2018-11-19 14:52
有空一起交流一下。
作者: 掐死时间    时间: 2018-12-12 16:24
前排支持下了哦~
作者: 我命本喜    时间: 2018-12-19 14:42
非常好,顶一下占位编辑
作者: 感情洁癖者i    时间: 2018-12-24 17:24
不错 支持一个了
作者: 放飞的风筝。    时间: 2019-6-17 16:24
看起来不错
作者: 叛逆、、、    时间: 2019-6-18 12:15
看帖要回,回帖才健康,在踩踩,楼主辛苦了!
作者: 森迷@    时间: 2019-6-18 21:46
看了LZ的帖子,我只想说一句很好很强大!
作者: ‘黑白交錯℡    时间: 2019-8-16 11:29
这么强,支持楼主,佩服
作者: 倒霉催的    时间: 2019-10-19 20:01
很有借鉴意义,先收藏了,谢谢楼主。
作者: 不成功也成仁    时间: 2019-10-21 12:33
打酱油的人拉,顺便赚点金币
作者: 班尼路    时间: 2019-11-8 08:12
确实不错,顶先
作者: 黄的笔记    时间: 2019-11-16 17:22
支持,赞一个
作者: 愿out¨    时间: 2020-1-31 17:44
这么强,支持楼主,佩服
作者: 画子入戏.    时间: 2020-4-10 17:28
打酱油的人拉,顺便赚点金币
作者: 孤岛    时间: 2020-4-18 11:08
很有借鉴意义,先收藏了,谢谢楼主。
作者: ..吂    时间: 2020-7-7 09:20
看起来不错
作者: 东方男孩    时间: 2020-11-27 19:40
very good.
作者: 顾痣    时间: 2020-12-2 19:45
路过 帮顶 嘿嘿




欢迎光临 思步网 (http://www.step365.com/) Powered by Discuz! X3.2