jboss tomcat weblogic websphere 性能对比测试 (1)

    技术2022-05-11  106

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

    测试系统环境: PC机, windows xp sp2CPU: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个请求内存占用约:335MBtool reports:

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

    Web Application Stress Tool Version:1.1.293.1

    Number of test clients:       1

    Number of hits:               882Requests per Second:          14.71

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

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

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

    Script Settings================================================================================Server:                       localhostNumber of threads:            20

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

    Use Random Delay:             No

    Follow Redirects:             YesMax Redirect Depth:           15

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

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

    Page SummaryPage                            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-threadRun on:                       12/30/2005 11:10:08 AMRun length:                   00:01:00

    Web Application Stress Tool Version:1.1.293.1

    Number of test clients:       1

    Number of hits:               1374Requests per Second:          22.88

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

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

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

    Script Settings================================================================================Server:                       localhostNumber of threads:            20

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

    Use Random Delay:             No

    Follow Redirects:             YesMax Redirect Depth:           15

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

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

    Page SummaryPage                            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-threadRun on:                       12/30/2005 11:12:55 AMRun length:                   00:01:00

    Web Application Stress Tool Version:1.1.293.1

    Number of test clients:       1

    Number of hits:               897Requests per Second:          14.94

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

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

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

    Script Settings================================================================================Server:                       localhostNumber of threads:            20

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

    Use Random Delay:             No

    Follow Redirects:             YesMax Redirect Depth:           15

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

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

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

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

    Web Application Stress Tool Version:1.1.293.1

    Number of test clients:       1

    Number of hits:               1384Requests per Second:          23.04

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

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

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

    Script Settings================================================================================Server:                       localhostNumber of threads:            20

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

    Use Random Delay:             No

    Follow Redirects:             YesMax Redirect Depth:           15

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

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

    Result CodesCode      Description                   Count     ================================================================================200       OK                            1384     

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

    结论:

    呵呵,pc上面说明的问题能有多少呢?一点点吧!


    最新回复(0)