- 浏览: 1092276 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (453)
- Struts2 (30)
- Spring (14)
- iBATIS (6)
- Hibernate (13)
- JVM (5)
- JSON (10)
- Ajax (5)
- Flex (1)
- JavaScript (25)
- PowerDesigner (4)
- 项目管理 (7)
- 数据库 (29)
- 生活 (18)
- 软件应用 (21)
- 无线技术 (2)
- Linux (39)
- TOP开发学习 (2)
- JAVA工具小TIPS (2)
- Java通用 (52)
- XML (3)
- 软件测试 (29)
- Maven (10)
- Jquery (1)
- 正则表达式 (3)
- 应用服务器 (15)
- Android (5)
- linux 和windowx 下 tomcat 设置JVM (8)
- 应用服务器 连接池 (4)
- Linux 后台输出中文乱码 (1)
- Hadoop (28)
- python (2)
- Kafka (7)
- Storm (5)
- Elasticsearch (7)
- fddd (1)
最新评论
-
kafodaote:
Kafka分布式消息系统实战(与JavaScalaHadoop ...
分布式消息系统Kafka初步 -
小灯笼:
LoadRunner性能测试实战课程网盘地址:http://p ...
LoadRunner性能测试应用(八) -
成大大的:
Kafka分布式消息系统实 ...
分布式消息系统Kafka初步 -
hulalayaha2:
Loadrunner性能测试视频教程下载学习:http://p ...
LoadRunner性能测试应用(八) -
993042835:
搞好 谢谢
org.hibernate.exception.ConstraintViolationException: could not delete:
Resin will automatically allocate and free threads as the load requires. Since the threads are pooled, Resin can reuse old threads without the performance penalty of creating and destroying the threads. When the load drops, Resin will slowly decrease the number of threads in the pool until is matches the load. Most users can set thread-max to something large (200 or greater) and then forget about the threading. Some ISPs dedicate a JVM per user and have many JVMs on the same machine. In that case, it may make sense to reduce the thread-max to throttle the requests. Since each servlet request gets its own thread, thread-max determines the maximum number of concurrent users. So if you have a peak of 100 users with slow modems downloading a large file, you'll need a thread-max of at least 100. The number of concurrent users is unrelated to the number of active sessions. Unless the user is actively downloading, he doesn't need a thread (except for "keepalives").
Keepalives make HTTP and srun requests more efficient. Connecting to a TCP server is relatively expensive. The client and server need to send several packets back and forth to establish the connection before the first data can go through. HTTP/1.1 introduced a protocol to keep the connection open for more requests. The srun protocol between Resin and the web server plugin also uses keepalives. By keeping the connection open for following requests, Resin can improve performance.
TimeoutsRequests and keepalive connections can only be idle for a limited time before Resin closes them. Each connection has a read timeout, request-timeout. If the client doesn't send a request within the timeout, Resin will close the TCP socket. The timeout prevents idle clients from hogging Resin resources.
In general, the read-timeout and keepalives are less important for Resin standalone configurations than Apache/IIS/srun configurations. Very heavy traffic sites may want to reduce the timeout for Resin standalone. Since read-timeout will close srun connections, its setting needs to take into consideration the client-live-time setting for mod_caucho or isapi_srun. client-live-time is the time the plugin will keep a connection open. read-timeout must always be larger than client-live-time, otherwise the plugin will try to reuse a closed socket. Plugin keepalives (mod_caucho/isapi_srun)The web server plugin, mod_caucho, needs configuration for its keepalive handling because requests are handled differently in the web server. Until the web server sends a request to Resin, it can't tell if Resin has closed the other end of the socket. If the JVM has restarted or if closed the socket because of read-timeout, mod_caucho will not know about the closed socket. So mod_caucho needs to know how long to consider a connection reusable before closing it. client-live-time tells the plugin how long it should consider a socket usable. Because the plugin isn't signalled when Resin closes the socket, the socket will remain half-closed until the next web server request. A netstat will show that as a bunch of sockets in the FIN_WAIT_2 state. With Apache, there doesn't appear to be a good way around this. If these become a problem, you can increase read-timeout and client-live-time so the JVM won't close the keepalive connections as fast.
TCP limits (TIME_WAIT)A client and a server that open a large number of TCP connections can run into operating system/TCP limits. If mod_caucho isn't configured properly, it can use too many connections to Resin. When the limit is reached, mod_caucho will report "can't connect" errors until a timeout is reached. Load testing or benchmarking can run into the same limits, causing apparent connection failures even though the Resin process is running fine. The TCP limit is the TIME_WAIT timeout. When the TCP socket closes, the side starting the close puts the socket into the TIME_WAIT state. A netstat will short the sockets in the TIME_WAIT state. The following shows an example of the TIME_WAIT sockets generated while benchmarking. Each client connection has a unique ephemeral port and the server always uses its public port:
The socket will remain in the TIME_WAIT state for a system-dependent time, generally 120 seconds, but usually configurable. Since there are less than 32k ephemeral socket available to the client, the client will eventually run out and start seeing connection failures. On some operating systems, including RedHat Linux, the default limit is only 4k sockets. The full 32k sockets with a 120 second timeout limits the number of connections to about 250 connections per second. If mod_caucho or isapi_srun are misconfigured, they can use too many connections and run into the TIME_WAIT limits. Using keepalives effectively avoids this problem. Since keepalive connections are reused, they won't go into the TIME_WAIT state until they're finally closed. A site can maximize the keepalives by setting thread-keepalive large and setting live-time and request-timeout to large values. thread-keepalive limits the maximum number of keepalive connections. live-time and request-timeout will configure how long the connection will be reused.
read-timeout must always be larger than client-live-time. In addition, keepalive-max should be larger than the maximum number of Apache processes. Apache 1.3 issuesUsing Apache as a web server on Unix introduces a number of issues because Apache uses a process model instead of a threading model. The Apache processes don't share the keepalive srun connections. Each process has its own connection to Resin. In contrast, IIS uses a threaded model so it can share Resin connections between the threads. The Apache process model means Apache needs more connections to Resin than a threaded model would. In other words, the keepalive and TIME_WAIT issues mentioned above are particularly important for Apache web servers. It's a good idea to use netstat to check that a loaded Apache web server isn't running out of keepalive connections and running into TIME_WAIT problems.
Resin优化: |
发表评论
-
打开“添加和删除程序”时报错:0x00310030,该内存不能为"writ
2012-05-09 18:08 929打开“添加和删除程序”时报错:0x00310030,该内存不能 ... -
只要三步就能找回被删除并清空的文件 转的
2011-03-22 09:06 985只要三步就能找回被删除并清空的文件 步骤: 1、单击“开始 ... -
把文件下载到网络服务器上wget
2010-09-21 16:24 983连接到网络服务器 #cd /usr #wget 'h ... -
给你的mp3大换血 【很好听的歌】
2010-08-19 12:53 1121这些歌, 请戴上耳机, 调大音量, 一个人听 ,全世界 都是你 ... -
photoshop 30种PS技术 让你照片美到不行~婚纱照可以省一大笔钱了
2010-08-19 12:52 1926照片名称:调出照片柔和的蓝黄色-简单方法, 1、打 ... -
云计算:程序员重回个人英雄时代
2010-07-16 13:55 847文/ 刘 鹏 曾几何时,那些耳熟能详的程序英雄的名字渐渐地 ... -
如何通过TCPIP端口为系统添加网络打印机(转)
2010-07-09 09:16 4203转自 http://www.xici.net/main.asp ... -
php计划任务的实现
2010-07-06 10:23 8047php计划任务的实现 (zt) ... -
Windows下用cmd命令安装及卸载服务
2010-06-29 11:41 2238第一种方法: 1. 开始 ->运行 ->cm ... -
Loadrunner 8.1 测试利器相关下载及破解方法(精)转
2010-06-22 14:29 3614Loadrunner 8.1 测试利器相关下载及破解方法(精) ... -
在resin.conf中设置最大值 threadmax
2010-04-22 17:39 4785<!--S 头部开始--> 在resin ... -
全球免费软件推荐(国外篇)
2010-04-21 14:25 1302本文是最优秀免费软件工具集合,我们划分为16个种类,其中包含了 ... -
myEclipse 6.5 中如何添加TCP/IP monitor
2010-04-15 17:44 2365myEclipse 6.5 中如何添加TCP/IP monit ... -
脑图软件推荐——PersonalBrain(转)
2010-03-14 10:40 2231脑图软件推荐——Persona ... -
别树一帜的思维图软件:PersonalBrain(转)
2010-03-12 22:20 2894别树一帜的思维图软 ... -
在tomcat中设置编码格式
2010-02-23 13:49 4450在tomcat中设置编码格式 <Conn ... -
三条命令让你xp启动如飞
2010-02-11 13:58 861三条命令让你xp启动如飞1、 ... -
你的电脑不再是蜗牛--加速绝招
2010-02-11 13:45 1523你的电脑不再是蜗牛--加速绝招 电脑速度慢 1 ... -
电脑其实很好玩,玩好了其实很无耻
2010-02-11 13:38 800电脑其实很好玩,玩好了其实很无耻 步骤:1、单击“开始 ... -
想让你的迅雷下载速度提高4倍吗?
2010-02-11 13:32 3719想让你的迅雷下载速度提高4倍吗? 1.首先打开迅雷的安 ...
相关推荐
《Resin2优化:命令配置与服务器调优详解》 Resin是一款高性能、轻量级的Java应用服务器,尤其在处理Web应用方面表现出色。在实际应用中,为了确保Resin能够高效稳定地运行,对服务器进行优化是必不可少的步骤。...
1. **高性能的Servlet容器**:Resin3优化了Servlet的处理机制,确保了高并发场景下的高效运行。 2. **JSP支持**:对JSP的出色支持使得开发者能够快速构建动态Web页面,提升了开发效率。 3. **内存管理**:Resin3采用...
Resin服务器是一款高性能的Java应用服务器,由Caucho Technology公司开发。它的设计目标是提供高效、稳定且易于管理的平台来运行...了解并掌握这些知识点,将有助于您更好地部署、管理和优化基于Resin的Java应用程序。
Resin,作为一个高性能的Java应用服务器,其源码解析对于我们深入理解Web服务器的运行机制和优化技术具有重要的价值。本文将从日志分析、运行时调试、网络模型以及线程池模型四个方面进行深入探讨。 一、日志分析 ...
可直接双击运行,如安装失败,请右击,以系统管理员身份运行。
4. 线程优化经验 为了解决线程问题,可以在resin.conf文件中设置thread-min、thread-max和thread-keepalive参数。这些参数可以根据实际情况进行调整,以确保Resin的稳定运行。 5. Resin.conf配置参数说明 Resin....
Resin 4.0 服务器是一款高性能的...同时,定期更新Resin到最新版本,可以确保获得最新的安全补丁和性能优化。总的来说,Resin 4.0服务器是Java Web应用的理想选择,尤其适合那些追求高性能、高并发和易管理性的企业。
【标题】:“resin-1 resin服务器的组件详解” 【正文】: Resin服务器是一款高效、轻量级的Java应用服务器,尤其适用于处理...理解这些组件的作用,有助于更好地管理和优化Resin服务器,从而提升应用的性能和稳定性。
总结来说,Resin的Eclipse插件是Java开发者在使用Eclipse开发基于Resin 3.1的应用时的重要辅助工具,它提供了一整套集成了Resin服务器管理、应用部署、日志查看等功能,极大地优化了开发流程。通过阅读提供的博文...
3. **性能优化**:Resin以其高性能而闻名,它采用了预编译JSP、零拷贝I/O等技术来提高响应速度。例如,Resin能够将JSP页面编译为Servlet类,以减少运行时的解释成本。 4. **负载均衡与集群**:Resin 3.1.8支持多...
为了提升性能和保障安全性,建议对Resin进行一些必要的优化,例如调整线程池大小、启用SSL、限制访问权限等。具体配置项可以在`resin.xml`中找到。 9. **停止与重启Resin** 当需要停止或重启Resin时,同样在bin...
### Resin 4.0 配置文件介绍与解析 #### 一、Resin 4.0 启动概述 **Resin 4.0** 是一款高性能的应用服务器,适用于部署 Java 应用程序。本章节主要介绍了 Resin 的启动过程、启动前的准备条件以及在不同操作系统上...
此外,Resin的性能优化是其一大亮点。它采用了多线程模型,能够有效地利用多核处理器,提高并发处理能力。内存管理也经过优化,降低了垃圾回收对性能的影响。这些特性使得Resin在处理高负载场景时表现优异。 然而,...
- **性能优化**:这个版本进行了大量的性能优化,包括更高效的内存管理和更快的请求处理。 - **安全性增强**:3.1.8版可能包含安全更新,修复了潜在的安全漏洞,提升了服务器的安全性。 - **管理工具**:提供了...
通过对Resin 3.1.9源代码的分析,开发者可以深入理解J2EE规范的底层实现,掌握服务器内部的工作原理,这对于优化应用性能、排查问题以及自定义扩展有着极大的帮助。同时,Resin的高效性能和轻量级特性也为其他开源...
Resin 4.0.58是该软件的一个特定版本,它在发布时可能包含了性能优化、安全更新和其他改进。以下是对Resin 4.0.58以及与Java、Windows 64位系统相关的知识点的详细解释: 1. **Resin服务器**:Resin设计为一个快速...
10. **日志和监控**:Resin提供了丰富的日志记录和监控工具,帮助开发者调试和优化应用。 在升级到更现代的版本之前,使用Resin 3.1.10的老系统可能会遇到一些挑战,比如对新Java和Web技术的支持不足、安全性可能...
Resin 是一款高性能的Java应用服务器,由Caucho Technology公司开发。Resin 4.0.23 版本是这个系列中的一个重要版本,它...无论是对于初学者还是经验丰富的开发者,掌握Resin的使用都能极大地提升工作效率和应用性能。
2. 高性能:Resin以其高性能而闻名,它优化了JSP和Servlet的处理,提供了更快的响应速度。这得益于其内置的HTTP缓存和连接池管理,以及对多线程和并发处理的支持。 3. Java EE支持:虽然Resin主要作为Web服务器,但...