论坛首页 Java企业应用论坛

Tomcat6.0.18还不错

浏览 17933 次
精华帖 (0) :: 良好帖 (2) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2008-09-14  
我对Executor不太了解,但是我看他默认是注释,我就不太敢用了。不知道是不是不太成熟,才没有默认就采用这个配置? 因为我们是做Tomcat插件的产品的。大家都知道既然做产品就得尽量考虑周到。请有这个经验的说一下。如果已经比较成熟的话,我也一定要研究一下这个。
0 请登录后投票
   发表时间:2008-09-15  
引用自:
Java Concurrency in Practice
By Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea

Historically, operating systems placed relatively low limits on the number of threads that a process could create, as few as several
hundred (or even less). As a result, operating systems developed efficient facilities for multiplexed I/O, such as the Unix select and poll
system calls, and to access these facilities, the Java class libraries acquired a set of packages (java.nio) for nonblocking I/O. However,
operating system support for larger numbers of threads has improved significantly, making the thread-per-client model practical even for
large numbers of clients on some platforms.
[1]
[1] The NPTL threads package, now part of most Linux distributions, was designed to support hundreds of
thousands of threads. Nonblocking I/O has its own benefits, but better OS support for threads means that there
are fewer situations for which it is essential.
0 请登录后投票
   发表时间:2008-09-15  
ice123456 写道
Ethip 写道
key232323 写道

直接上tomcat对外么?

问下,这个“对外”是什么意思啊?

直接对外访问。意思是外界可以访问到tomcat


致谢!
0 请登录后投票
   发表时间:2008-09-16  
elgs 写道
引用自:
Java Concurrency in Practice
By Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea

Historically, operating systems placed relatively low limits on the number of threads that a process could create, as few as several
hundred (or even less). As a result, operating systems developed efficient facilities for multiplexed I/O, such as the Unix select and poll
system calls, and to access these facilities, the Java class libraries acquired a set of packages (java.nio) for nonblocking I/O. However,
operating system support for larger numbers of threads has improved significantly, making the thread-per-client model practical even for
large numbers of clients on some platforms.
[1]
[1] The NPTL threads package, now part of most Linux distributions, was designed to support hundreds of
thousands of threads. Nonblocking I/O has its own benefits, but better OS support for threads means that there
are fewer situations for which it is essential.



我首先不否认这种说法的正确性。我在本地实验分别用NIO 和 IO 进行socket的读写,使用NIO不仅能大大提高速度,而且能够减少异常情况的出现。起码用NIO达到了我理想的效果,好像发送1K左右的info 20/s or 300/s。具体数据记不清了,但是感觉NIO效果不错。起码最简单的,对于数据缓存读写,而不是按位,感觉就好很多 。

其他的环境没有测试过。楼主引用的不知道是在什么环境下测试的结果。
0 请登录后投票
   发表时间:2008-09-18  
hantsy 写道
NIO 不一定比老的方式好,性能不一定有提高,毕竟它是jdk1.4的产物,老外已经有一些议论置疑nio的实际作用了。
现在nio已经在准备nio2了。


恩,这个有必要用数据证实一下
0 请登录后投票
   发表时间:2008-09-18  
直接对外会用一个比较单纯的 Http Server,如 Apache,IIS等
0 请登录后投票
   发表时间:2008-09-18  
6.0.18 版有个EL表达式方面的bug,我改回16版了
0 请登录后投票
   发表时间:2008-09-19  
key232323 写道
支持,lz一般用什么做应用服务器?
直接上tomcat对外么?


我这里的结构是:squid + tomcat

tomcat不直接对外。
0 请登录后投票
   发表时间:2008-09-19  
xieke 写道
请教一下,是如何做到

系统监控,并得出tomcat运行稳定了许多的结论的。


我是通过cacti来判断的。

我有一组集群的机器,我先升级了一般为tomcat6.0.18采用我所述的配置。
另外一半没有变。

在高负载的情况下,没有变动的服务器会出现cpu升高,load上升的情况。

而升级后的服务器的cpu和load非常稳定。

很好。
0 请登录后投票
   发表时间:2008-09-19  
grandboy 写道
我对Executor不太了解,但是我看他默认是注释,我就不太敢用了。不知道是不是不太成熟,才没有默认就采用这个配置? 因为我们是做Tomcat插件的产品的。大家都知道既然做产品就得尽量考虑周到。请有这个经验的说一下。如果已经比较成熟的话,我也一定要研究一下这个。


我一般不会太深入研究,主要就是根据实际情况,拿到产品环境试一下就知道那个好了。

一切来自实践。呵呵
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics