ITeye博客

tomcat参数调整及调优

fengqinyun · 2012-03-26 11:16 · tomcat · 企业架构 · Markdown

service:jmx:rmi:///jndi/rmi://192.168.150.102:6969/jmxrmi

CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6970  -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"






LANG="en_US.UTF-8"

JAVA_OPTS="-DENVIRONMENT=mysql -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6960 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xms1400m -Xmx3048m -XX:PermSize=512M -XX:MaxNewSize=256m -XX:MaxPermSize=256m -Djava.awt.headless=true -Djavax.net.ssl.trustStore=/home/appusr/crt/crt -Djavax.net.ssl.trustStorePassword=jrtruyicai"



JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6970 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xms1400m -Xmx2000m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m -Djava.awt.headless=true -Dfile.encoding=UTF-8"

tomcat dump



java_options添加如下2个参数; 
(JDK要求:1.4.2 update 12以上 或者 5.0 update 7.以上) 
-XX:HeapDumpPath=./dumpfile.hprof 
-XX:+HeapDumpOnOutOfMemoryError
然后用Eclipse Memory Analysis分析

linux下密令


jmap -dump:live,format=b,file=heap.bin pid
注意:pid 是进程号
最新:jmap -dump:live,format=b,file=heap-jvm.bin -F  6255

然后利用eclipse的memory analyzer进行内存分析

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。