如何优化linux resin 配置的配置

resin优化 - 大伟 - ITeye博客
博客分类:
1、优化JVM参数
修改resin.conf文件,在&server-default&节点下增加配置 JVM参数的子节点&jvm-arg&。 -Xmx和-Xms的值需要根据服务器内存的大小调整,对于多数应用来说,-Xmx配置成1024M,完全能满足使用要求。通常将-Xms与-Xmx选项 的值设置为相同。
-XX:PermSize=128m
-XX:MaxPermSize=256m
-Dcom.sun.management.jmxremote
2、调整图片Cache图片文件的时间
url-pattern="*.gif" expires="6000s"
url-pattern="*.jpg" expires="6000s"
url-pattern="*.png" expires="6000s"
3、调整线程池的最大线程数
4、日志输出 如果不配置stdout-log,那么resin会把System.out输出的信息,自动输出到${resinHome}/log/jvm-default.log文件中,且这个文件不会按天存储,随着时间推移,这个文件会越来越大,最后影响系统效率。
path="${resinHome}/log/stdout.log" timestamp="[%Y-%m-%d %H:%M:%S.%s]" rollover-period="1D"
path="${resinHome}/log/stderr.log" timestamp="[%Y-%m-%d %H:%M:%S.%s]" rollover-period="1D"
5、resin-server TIME_WAIT 过多的处理 thread-max指定了最大连接数, socket-timeout是socket超时时间 keepalive-max指定了长连接的数量,这是可以重复使用的连接, netstat -an时系统可以看到响应数量的ESTABLISHED状态 设定keepalive-max和把keepalive-timeout调小可以减少TIME_WAIT的数量。 在&server-default&节点下增加配置
6、调整检查程序更新时间间隔的配置 Resin 会在一个指定的周期内,检查一下web-app目录下的classes、jsp、jar以及配置文件是否更新,并且根据检查的情况,确定是否重新装载这些 文件。对于生产系统来说,不会经常更新文件,时间间隔应该加长,提高系统的效率。文本框中配置的时间间隔为20分钟。
浏览: 327892 次
来自: 北京
333引用[url][*]||||[/flash][/flas ...
业务类在Spring配置 ...
这些东西,用的挺爽
&dependency&
&groupId ...当前位置: →
→ resin2.1.17内存优化,该怎么解决
resin2.1.17内存优化,该怎么解决
& 作者:佚名 & 来源: 互联网 & 热度:
&收藏到→_→:
摘要: resin2.1.17内存优化不知道发这里对不对,有高手遇到的收拾收拾,帮帮忙啊! 环境: 服务器:win2003&64位&,4核,4G...
"resin2.1.17内存优化,该怎么解决"::
resin2.1.17内存优化不知道发这里对不对,有高手遇到的收拾收拾,帮帮忙啊!
服务器:win2003&64位&,4核,4g物理内存
resin2.1.17,连接池是proxool&0.9.1版本,按照帮助都配好了,服务器也运行比较稳定
没有出现宕机问题。
问题是:运行1-2天后,服务器内存占用到2.5g左右,之后一直稳定在这个水平,关闭resin和sql服务器内存也没降下来,除非重启,重启后开始占用600m左右,只要用户一登录使用一段时间内存就上到2.5g.
当前并发不多,最多几十个而已。
今天用jconsole自带的工具查看了一下jvm的各种状态,发现很多线程阻塞的很多,不知道啥原因,gc没法及时回收,就连连接池里面的连接我看看状态都是阻塞,程序此文来自: 马开东博客
转载请注明出处 网址:
每次调完确定已经释放回去了,空闲连接和设置的参数一个样,没有一直active状态的。我想问一下:resin哪里设置可以让jvm占用内存最小?如何自动尽快释放内存?谢谢!
------解决方案--------------------------解决方案--------------------这种情况,就是程序的问题了。
俺觉得这种情况没啥影响,服务器配置这么高,4g占了2.5g,之后又不增加了,也不算特别高,如果本服务器不再配置别的项目,完全不用担心。------解决方案--------------------可以考虑添加负载均衡,resin2.1.17引擎支持这个功能。 搜索此文相关文章:此文来自: 马开东博客
网址: 站长QQ
上一篇:没有了
resin2.1.17内存优化,该怎么解决_java其他相关文章
java其他_总排行榜
java其他_最新
java其他_月排行榜
java其他_周排行榜
java其他_日排行榜resin3的优化配置 | 系统运维 |
_数据库_运维_开发_IT学习_无忧IT学习网
一起学习!一起进步!
resin3的优化配置
浏览: 52 views
本文是在apache2+resin3(开源版)环境下的配置,主要是对resin3配置进行了分析,详细调试请见caucho-doc&,apache2的调优见apache的man文档。实践总结,如转载请注明出处&2h...
本文是在2+resin3(开源版)环境下的配置,主要是对resin3配置进行了分析,详细调试请见caucho-doc&,2的调优见的man文档。实践总结,如转载请注明出处&2hei.net&谢谢.
& Using Resin(R)& under the GNU Public License (GPL).
& See&&for information on Resin Professional,
& including caching, clustering, JNI acceleration, and OpenSSL integration.
resin配置文件:& resin.conf
1、dependency-check-interval 参数调整
resin检查系统配置及、、resin.conf等文件的时间间隔。
默认值为2秒,适合开发及调试环境,如果是正式环境尽量把参数调大或者直接改为-1,不允许检查,也就是禁止了热部署。
&dependency-check-interval&-1s&/dependency-check-interval&
改变cache-mapping的值:
&&&&& &cache-mapping url-pattern=&/& expires=&5s&/&
&&&&& &cache-mapping url-pattern=&*.gif& expires=&60s&/&
&&&&& &cache-mapping url-pattern=&*.jpg& expires=&60s&/&
&&&&& &cache-mapping url-pattern=&*.png& expires=&60s&/&
3、jvm优化
jvm需要根据你的系统配置及应用来调整。
JVM OPTION PASSED TO RESIN&&&& MEANING
-Xms&&&&&&&&&&&&&&&&&&&&&&&&&& initial
-Xmx&&&&&&&&&&&&&&&&&&&&&&&&&& maximum
-Xmn&&&&&&&&&&&&&&&&&&&&&&&&&& the size of the heap for the young generation
将-Xms和-Xmx设置为一样大小是不错的选择。
如: bin/httpd.sh -Xms500M -Xmx500M -Xmn100M
更多的关于jvm优化参数如:young generation、Eden generation、older generation可见
Sun documentation on garbage collection
jvm的,google一下有很多的工具,如:jconsole jstat jstack
jconsole的使用见我的另外一篇文章 《使用Jconsole对的内存使用情况(JVM)进行》
1003 Resin
973 resin.jar
Attaching to process ID 973, please wait&
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_16-b02
0&0000&&&&& 64K&&&& /home/jdk1.5.0_16/bin/
0xa00000&&&&& 127K&&& /lib64/ld-2.5.so
0xe00000&&&&& 1647K&& /lib64/libc-2.5.so
0x0000&&&&& 22K&&&& /lib64/libdl-2.5.so
0x0000&&&&& 600K&&& /lib64/libm-2.5.so
0xa00000&&&&& 138K&&& /lib64/libpthread-2.5.so
0xa00000&&&&& 111K&&& /lib64/libnsl-2.5.so
0x00002aaab46ad000&&&&& 26K&&&& /home/jdk1.5.0_16/jre/lib/amd64/libmanagement.so
0x00002aaab49de000&&&&& 79K&&&& /home/jdk1.5.0_16/jre/lib/amd64/libnet.so
0x00002aeeac3c1000&&&&& 9933K&& /home/jdk1.5.0_16/jre/lib/amd64/server/libjvm.so
0x00002aeeacd46000&&&&& 43K&&&& /home/jdk1.5.0_16/jre/lib/amd64/native_threads/libhpi.so
0x00002aeeace61000&&&&& 52K&&&& /lib64/libnss_files-2.5.so
0x00002aeead06c000&&&&& 58K&&&& /home/jdk1.5.0_16/jre/lib/amd64/libverify.so
0x00002aeead17b000&&&&& 171K&&& /home/jdk1.5.0_16/jre/lib/amd64/lib.so
0x00002aeead2a5000&&&&& 78K&&&& /home/jdk1.5.0_16/jre/lib/amd64/libzip.so
&S0C&&& S1C&&& S0U&&& S1U&&&&& EC&&&&&& EU&&&&&&& OC&&&&&&&& OU&&&&&&&& PC&&&& PU&&&&&&& YGC&&&& YGCT& FGC&&&& FGCT&&&& GCT&&&
48.0& 0.0&&& 0.0&&
& && 18545.6&& 56.6&&&&& 1&&& 0.055&& 1&&&&& 0.115&&& 0.170
48.0& 0.0&&& 0.0&&
& && 18545.6&& 56.6&&&&& 1&&& 0.055&& 1&&&&& 0.115&&& 0.170
48.0& 0.0&&& 0.0&&
& && 18545.6&& 56.6&&&&& 1&&& 0.055&& 1&&&&& 0.115&&& 0.170
jstack 1489
Thread 1495: (state = BLOCKED)
&- .lang.Object.wait(long) @bci=0 (Interpreted frame)
&- .lang.Object.wait() @bci=2, line=474 (Interpreted frame)
&- .lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116 (Interpreted frame)
Thread 1489: (state = IN_NATIVE)
&- .net.SocketInputStream.socketRead0(.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
&- .net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Interpreted frame)
&- .net.SocketInputStream.read() @bci=23, line=182 (Interpreted frame)
&- com.caucho.server.resin.Resin.waitForExit() @bci=304, line=1265 (Interpreted frame)
&- com.caucho.server.resin.Resin.main(.lang.String[]) @bci=42, line=1367 (Interpreted frame)
4、JNI加速
resin不使用NIO而是使用了JNI的方式使用本地码的方式来提升效率,经验证,resin使用JNI的效率要高于使用NIO,
使用JNI是需要对resin进行编译,在./configure时把jni编译进去,
./configure &enable-jni&&&&& 美中不足的是Resin Professional版本才提供此项功能。
下面是resin-doc的说明:
Resin does not use NIO & it uses JNI to handle low-level I/O calls with native code. The performance using this method was found to be much better than nio.
5、第一次编译的处理
一般来讲,第一次访问会自动进行编译,如果更新了过多的、且系统访问很大的话,重启resin容易造成负载过高。
下面配置是启动app-server时,对所有的进行编译,编译完毕后启动监听,这样启动时间会长一些,但是可以防止第一次访问编译造成系统负载大。
&&&&& &listener&
&&&&&&& &listener-class&com.caucho..PrecompileListener&/listener-class&
&&&&&&& &init&
&&&&&&&&& &extension&&/extension&
&&&&&&&&& &extension&x&/extension&
&&&&&&& &/init&
&&&&& &/listener&
6、resin 与 性能的比较
resin3单独使用时性能也是不错,当然也可以跟配合使用。下面是resin-doc中的说法:
and Servlets, Resin standalone is certainly faster than Resin/. Because of the extra overhead of the Resin/ connection, the Resin/ configuration is necessarily slower than Resin standalone.
可以看出各有优劣,
对于静态页面来说比较快。如果使用了SSL,+resin要比resin单独使用快一些,更为重要的是resin3的开源版本不支持ssl。
7、resin-server TIME_WAIT 过多的处理
thread-max指定了最大连接数,socket-timeout是socket超时时间
keepalive-max指定了长连接的数量,这是可以重复使用的连接,netstat -an时系统可以看到响应数量的ESTABLISHED状态
设定keepalive-max和把keepalive-timeout调小可以减少TIME_WAIT的数量。
&&&&& &thread-max&256&/thread-max&
&&&&& &socket-timeout&65s&/socket-timeout&
&&&&& &keepalive-max&128&/keepalive-max&
&&&&& &keepalive-timeout&120s&/keepalive-timeout&
一般来讲如果是Resin standalone方式,调整timeout并不是很重要,如果是+resin的方式,而且压力很大的情况下,需要调小timeout的值。
load-balance-idle-time是用来设置load-balance和分布式session的关闭时间,默认时间为keepalive-timeout & 1s
&load-balance-idle-time&100s&/load-balance-idle-time&
8、关于watchdog
resin3启动是多了一个watchdog的进程。可以单独启动也可以跟随resin.jar一起启动,主要是用来resin jvm实例,在必要的时候重启。
&watchdog-jvm-arg&-Dcom.sun.management.jmxremote&/watchdog-jvm-arg&
&watchdog-port&6600&/watchdog-port&
查看& watchdog& 状态&&&&
-jar lib/resin.jar status
Resin/3.1.6 status for watchdog at 127.0.0.1:6600
server & : active
& password: missing
& user: root
& root: /home/resin/
& conf: /home/resin/conf/resin.conf
& | & & | & & | & & | & & | & & | & & | & & | & & | & & | & & | & & | & & | &
最热门文章
41254 views
10906 views
9976 views
6395 views
5956 views
4771 views
4116 views
4053 views
友情链接 |
本站进行132次查询DISASEMBLE RESIN AND THE MANUFACTURING METHOD FOR THEREOF by NASUN HITEC LTD.,CO - Patent No.
DISASEMBLE RESIN AND THE MANUFACTURING METHOD FOR THEREOF
Details for Australian
Patent Application No.
Pub. Number
PCT Number
PCT/KR02/02496
PCT Pub. Number
Filing date
30 December 2002
Wipo publication date
13 October 2003
International Classifications
C08L 003/12
Compositions of starch, amylose or amylopectin or of their derivatives or degradation products
C08L 023/00
Compositions of macromolecular compounds obtained by reactions involving only carbon-to-carbon unsaturated bonds
C08L 029/04
Compositions of homopolymers or copolymers of compounds having one or more unsaturated aliphatic radicals, each having only one carbon-to-carbon double bond, and at least one being terminated by an alcohol, ether, aldehydo, ketonic, acetal, or ketal radical
C08L 033/02
Compositions of homopolymers or copolymers of compounds having one or more unsaturated aliphatic radicals, each having only one carbon-to-carbon double bond, and only one being terminated by only one carboxyl radical, or of salts, anhydrides, esters, amides, imides, or nitriles thereof
Event Publications
3 April 2003
Priority application(s): 10-
20 November 2003
Published as
16 December 2004
This application lapsed under section 142(2)(f)/See Reg. 8.3(3). Examination has not yet been requested or directed for this application. Note that applications or patents shown as lapsed or ceased may be restored at a later date.
The information provided by the Site not in the nature of legal or other professional advice.
The information provided by the Site is derived from third parties and may contain errors.
You must make your own enquiries and seek independent advice from the relevant industry professionals before acting or relying on any information contained herein.
Next and Previous Patents/Applications
IP Reporting Samples
Customised IP Reporting
IP Insider for IP Professionals
IP Monitor Professional
& IP Monitor Pty Ltd 2011}

我要回帖

更多关于 idea resin配置 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信