分享
 
 
 

Tomcat 测试(转TSS)

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

http://www.theserverside.com/reviews/thread.tss?thread_id=18243

Jakarta Tomcat Performance Benchmark

Introduction

Jakarta Tomcat is an open-source application server that is produced by the Apache Software Foundation. Tomcat is the reference implementation for the Java Servlet and Java Server Pages technologies. For more information, see http://jakarta.apache.org/tomcat.

My company was using the Tomcat servlet engine for a pilot project and experiencing great success. The pilot project involved a web application that had 5-10 concurrent users, but we were uncertain if Tomcat could scale to a larger number of concurrent users.

Many of our other web applications are implemented using one of the most popular commercial application servers on the market (which we will call "Commercial J2EE App Server" for the remainder of this document). I was very interested to see how Tomcat would compare in a production environment. I searched the Internet for Tomcat performance or scalability benchmarks, but the results were very limited. Therefore, I decided to produce this benchmark.

The purpose of this benchmark was to determine the viability of using Tomcat as a servlet engine in a production environment. The benchmark results are compared with "Commercial J2EE App Server". The goal was to measure the relative response times of the two application servers, rather than trying to obtain the best absolute response time. Only the servlet engine components are being compared (i.e. no plug-in for HTTP servers, etc).

To determine production viability, we need to investigate both response times and scalability. The response time is what a single user would observe, and it is expected to be sub-second. Scalability is determined by how consistent the response times are when additional concurrent users are added. As the number of concurrent users is increased, if the response time or the errors increase, then this indicates poor scalability.

Response time can be defined as the length of time that a user must wait from the instant that they submit a request to the instant that the view the response from that request. Response time can be divided further into processing time, transmission time and rendering time. We were interested in the full response time measurements for this benchmark, therefore none of the separate response time components were measured.

Configurations

Test Client

Windows 2000

Pentium 3 800 MHz

512 Mb RAM

The Grinder v2.8.3 (Sun JRE 1.3.1)

The test client was the machine that generated the requests to the servlet engine. The test client used The Grinder load-testing framework to create and execute test scripts, parameterize values and simulate a variable number of concurrent users and test cycles. For more information about The Grinder, see

http://grinder.sourceforge.net.

The "grinder.properties" file that was used for this benchmark is included in Figure 1.

Figure 1 - grinder.properties file.

The application that was used for testing in this benchmark was a search engine that is based on the Jakarta Lucene search API, and is composed of a servlet, JSPs and XML configuration files.

Server Configuration 1

Windows 2000

Pentium 3 1000 MHz

512 Mb RAM

Commercial J2EE App Server (IBM JRE 1.3.0)

Server Configuration 2

Windows 2000

Pentium 3 1000 MHz

512 Mb RAM

Jakarta Tomcat v4.1.18 (Sun JRE 1.3.1)

Results

Response Time

The response time was sub-second and fairly consistent for both "Commercial J2EE App Server" and Tomcat, until a certain threshold of concurrent users was achieved. The response time began to degrade at approximately 40 concurrent users. This number should not be considered as a limitation of either "Commercial J2EE App Server" or Tomcat, except in this particular hardware and software configuration. The important facts to note are that both servlet engines provided similar consistent sub-second response times until that threshold was reached (although "Commercial J2EE App Server" is slightly faster), and that both servlet engines began suffering from overloading at approximately the same concurrent user level.

Figure 3 apparently demonstrates that the performance was consistent from 100 to 200 threads, but in fact the response times were only similar because there were a large number of errors, and the total number of requests that were serviced with 200 threads was less than with 100 threads.

Figure 2 - Response time table.

Figure 3 - Response time chart.

Errors

All of the errors reported were "connection refused" errors, which indicates that the servers could not handle the requests in time. Both servers could only handle about 1300 requests per minute, but "Commercial J2EE App Server" started to fail with a larger number of errors than Tomcat.

Figure 4 - Errors table.

Figure 5 - Errors chart.

Conclusion

The response times for "Commercial J2EE App Server" were slightly faster, but both servlet engines performed in a consistent and similar fashion. The scalability of both servlet engines were also similar, with Tomcat being slightly more scalable, since it could handle more concurrent users without generating as many errors as "Commercial J2EE App Server".

Overall, I did not see a significant difference between these two servlet engines, and I would recommend that Tomcat performs fast enough and is scalable enough for production use.

Post reply

--

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有