---
title: "tomcat参数调整及调优"
author: "fengqinyun"
date: "2012-03-26T11:16:23Z"
tags: []
categories: ["企业架构"]
slug: "tomcat"
draft: false
lastmod: "2015-05-19T09:40:05Z"
id: 1463865
url: "https://stevenfeng.iteye.com/blog/1463865"
---

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

```java

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"


```





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

```

linux下密令

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

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