`
linvar
  • 浏览: 254530 次
  • 性别: Icon_minigender_1
  • 来自: 未定
社区版块
存档分类
最新评论

Resin note1

    博客分类:
  • java
阅读更多

<cluster-default>
    <resin:import path="${__DIR__}/app-default.xml"/>
  </cluster-default>
  <cluster id="app-tier">
    <server id="app-a" address="192.168.0.10" port="6800"/>
    <server id="app-b" address="192.168.0.11" port="6800"/>
    <host id="">
      <web-app id="" root-directory="/var/www/htdocs"/>
    </host>
  </cluster>
  <cluster id="web-tier">
    <server id="web-a" address="192.168.0.1" port="6800">
      <http port="80"/>
    </server>
    <proxy-cache memory-size="256M"/>
    <host id="">   
      <resin:LoadBalance regexp="" cluster="app-tier"/>
    </host>
  </cluster>
1.一个resin instance代表一个cluster,只能启动一个cluster中的一个server
#bin/resin.sh -server app-a start

2.jvm
-Xss 单个线程堆栈大小值;JDK5.0以后每个线程堆栈大小为1M
-Xms 启动应用时,JVM堆空间的初始大小值
-Xmx 应用运行中,JVM堆空间的极限值,设置为总内存的80%
-Xmn 此参数硬性规定堆空间的新生代空间大小,初始值和最大值(NewSize,MaxNewSize),推荐设为堆空间大小的1/4
-XX:PermSize和-XX:MaxPermSize分别设置应用服务器启动时,永久存储区的初始大小和极限大小;在生成环境中强烈推荐将这个两个值设置为相同的值,以避免分配永久存储区的开销,具体的值可取系统"疲劳测试"获取到的永久存储区的极限值;
一个JVM虚拟机可有效管理的内存大概在5-6G左右,所以内存多的服务器分配给单个resin实例JVM过多的内存是没有意义的,可以启动多个resin实例




1.The Resin web server starts listening to HTTP requests on port 8080 and listens on port 6800 for load balancer and cluster messages.

2.Garbage collection
There are essentially two GC threads running. One is a very lightweight thread which does "little" collections primarily on the Eden (a.k.a. Young) generation of the heap. The other is the Full GC thread which traverses the entire heap when there is not enough memory left to allocate space for objects which get promoted from the Eden to the older generation(s).

If there is a memory leak or inadequate heap allocated, eventually the older generation will start to run out of room causing the Full GC thread to run (nearly) continuously. Since this process "stops the world", Resin won't be able to respond to requests and they'll start to back up.

The amount allocated for the Eden generation is the value specified with -Xmn. The amount allocated for the older generation is the value of -Xmx minus the -Xmn. Generally, you don't want the Eden to be too big or it will take too long for the GC to look through it for space that can be reclaimed.

3.Stack size
Each thread in the VM gets a stack. The stack size will limit the number of threads that you can have, too big of a stack size and you will run out of memory as each thread is allocated more memory than it needs. 2048k is an appropriate value for most situations.

-Xss the stack size for each thread
-Xss determines the size of the stack: -Xss1024k. If the stack space is too small, eventually you will see a java.lang.StackOverflowError.

Some people have reported that it is necessary to change stack size settings at the OS level for Linux. A call to ulimit may be necessary, and is usually done with a command in /etc/profile:

Limit thread stack size on Linux
unix> ulimit -s 2048

4.Monitoring the JVM
The most useful tool is jconsole.
jps and jstack are also useful


5.resin watchdog
For reliability and security, Resin servers are started and monitored by a separate Resin watchdog process. The watchdog continually checks the health of the Resin server and restarts the Resin instance if is becomes unresponsive.

The standard configuration launches one watchdog per machine which monitors all the Resin JVMs on that matchine, so most sites will not need to change any watchdog configuration.

The watchdog automatically restarts Resin if the Resin JVM ever crashes or exits. So if you want to stop Resin, you need to tell the watchdog to stop the instance, or you can stop the watchdog entirely. The watchdog is typically controlled by the resin.jar main program (ResinBoot), which has commands to start, stop, and restart Resin instances as well as reporting the watchdog status.


分享到:
评论

相关推荐

    resin服务器有3部分,resin1,resin-webapp,resin-lib,由于大小限制分开传

    resin服务器有3部分,resin1,resin-webapp,resin-lib,由于大小限制分开传

    resin3 和 resin4

    Resin是CAUCHO公司的产品,是一个非常流行的application server,对servlet和JSP提供了良好的支持,性能也比较优良,resin自身采用JAVA语言开发。

    resin-1 resin服务器有三部分

    resin服务器有3部分,resin1,resin-webapp,resin-lib,由于大小限制分开传

    resin3 resin3下载

    resin3 resin3下载 resin-3.0.21下载

    resin-2.1.8服务器

    比如一台SERVER的错误率是1%的话,那么支持负载平衡的两个Resin服务器就可以使错误率降到0.01%。 Resin 2.1.4( resin-2.1.4.zip),你可以从http://www.caucho.com/download/ 站点上查询Resin的最新版本并下载它...

    resin-pro-4.0.65.zip下载

    resin-pro-4.0.65下载 resin下载

    resin4.0.39 最新resin版本

    Resin是CAUCHO公司的产品,是一个非常流行的支持servlets和jsp的引擎,速度非常快。Resin本身包含了一个支持HTTP/1.1的WEB服务器。虽然它可以显示动态内容,但是它显示静态内容的能力也非常强,速度直逼APACHESERVER...

    resin-2.1.9.zip

    resin-2.1.9.zip resin-2.1.9.zip resin-2.1.9.zip

    resin-3.2.0.zip

    resin应用服务器resin-3.2.0

    resin3.1.5

    resin3.1.5

    Mastering Resin英文版

    Mastering Resin英文版

    resin应用部署详细步骤

    resin应用部署详细步骤,帮助你快速学会resin

    resin 启动脚本

    case "$1" in start) su - $RESIN_OWNER -c "$SROOT/bin/httpd.sh start" ;; stop) su - $RESIN_OWNER -c "$SROOT/bin/httpd.sh stop" ;; *) echo 'Usage:resin {start|stop}';; esac exit 0

    resin4.0.47

    resin服务器

    resin java web 容器 服务器

    比如一台SERVER的错误率是1%的话,那么支持负载平衡的两个Resin服务器就可以使错误率降到0.01%。 Resin提供了最快的jsp/servlets运行平台。在java和javascript的支持下,Resin可以为任务灵活选用合适的开发语言。...

    eclipse resin插件

    eclipse的离线resin插件 ResinLauncher: launch resin 2.x or 3.x (require JDK 1.4) within eclipse to let you debug jsp or servlet. If you are using jdk 1.4 you can use hot code replace with servlet. You...

    resin服务器配置指南

    resin服务器配置指南,实现resin服务均衡。前台服务均衡

    resin-3.1.9-src

    resin-3.1.9源代码 可以查看resin是怎么具体实现一些j2EE接口的。

    resin2.1.8

    resin2.1.8

    resin4.0.43.tar.gz resin4.0.51.zip

    resin4.0.43.tar.gz, resin4.0.51.zip。 resin windows 版本 resin linux 版本 ================= resin4.0.43.tar.gz, resin4.0.51.zip。 resin windows 版本 resin linux 版本

Global site tag (gtag.js) - Google Analytics