Topic: tomcat 4.1x求教

  Print this page

1.tomcat 4.1x求教 Copy to clipboard
Posted by: supertoy
Posted on: 2003-01-29 00:23

现在的公司比较穷,居然让我用tomcat做服务器,以前从来没干过这事。
到网上找了一些资料看过,大致都说20个以下的用户还凑或,新版的4.1X比以前性能提高不少。早先我用tomcat 4.1x + 1.4.1测试了一下,速度还比较理想。一些大的复杂页面,基本都在4秒内可以出来。后来又用jmeter测过,在20个并发用户的情况下,大致在7秒左右,这也是可以接受的。可是这两天用
loadrunner测出来的结果让我大跌眼镜,在20个并发用户的情况下,几个关键
任务的平均时间都到了50多秒,基本上不可接受。
当然代码也有很大问题,很多该优化的地方程序员没考虑,不过不到万不得已,我不想做代码的性能优化,也不想加缓存,不知道有没人有tomcat实际应用的经验?负载性能到底如何?tomcat的启动参数我已经参考相关文章调整过内存,gc项。服务器是志强双cpu/ piii600 /512m

2.Re:tomcat 4.1x求教 [Re: supertoy] Copy to clipboard
Posted by: rox
Posted on: 2003-01-29 15:51

首先可以做一个简单的访问数据源的页面(确保代码的谨慎),再单独进行压力测试!
还是有问题,可以试试4.0.x系列的最新版,再试试你的工程。
测试只是手段,问题要分析!

3.Re:tomcat 4.1x求教 [Re: supertoy] Copy to clipboard
Posted by: floater
Posted on: 2003-01-31 02:20

I have this impression that tomcat is a reference implementation. In other words, it's just a reference, and thus shouldn't be used in production at all.

It's the concept, a reference. Its intention is to have a workable implementation, and doesn't care *anything* else. So be aware of this.

Now suppose you have to use this, you could try one of these:
1. optimize your code
2. optimize tomcat code
I don't recommend both. Use a profile to get the worst bottleneck and change just that(minize your change) and see it.

None of them is elegent. Besides, you may have security issues too since tomcat developers don't care this much.

4.Re:tomcat 4.1x求教 [Re: supertoy] Copy to clipboard
Posted by: lihongtao
Posted on: 2003-02-21 17:33

不会吧?你是怎么测的?
JSP编译速度是慢了点,但是再次访问怎么会有几秒钟?

5.Re:tomcat 4.1x求教 [Re: supertoy] Copy to clipboard
Posted by: lixj0571
Posted on: 2003-02-28 17:25

没那么慢吧?有点太夸张了,


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923