About the common configuration of java virtual machine in development

 1. Set java virtual machine parameters in myeclipse
 Optional JVM parameter settings

 Clean up the cache location: myeclipse->servers->tomcat-jdk------- configuration


-Dorg.apache.tapestry.disable-caching=true
-Dorg.apache.tapestry.enable-reset-service=true
-Xms512m
-Xmx1024m

-XX:MaxNewSize=512m -XX:MaxPermSize=1024m


XMS : The heap memory initially allocated by the
JVM XMX : The maximum allowable heap memory allocated by the JVM, allocated on demand
1. -XX:newSize: indicates the size of the initial memory of the new generation, which should be less than the value of -Xms;
2. -XX:MaxPermSize: Indicates the maximum upper bound for non-heap allocated memory.

2. -XX:MaxnewSize: Indicates the maximum upper limit of the memory that can be allocated by the new generation; of course, this value should be less than the value of -Xmx;
3. -Xmn: As for this parameter, it is two pairs of -XX:newSize and -XX:MaxnewSize Configure two parameters at the same time, that is to say, if you configure the memory size of the new generation through -Xmn, then -XX:newSize = -XX:MaxnewSize = -Xmn, although it will be very convenient, but it should be noted that this parameter is in JDK1 .4 version only used later.

1. -XX:PermSize: indicates the initial memory allocation size of the non-heap area, which is abbreviated as permanent size (persistent memory)


2. Set java virtual machine parameters in tomcat

File catalina.bat

set JAVA_OPTS= -Xms512M -Xmx1024M  -XX:PermSize=1024M -XX:MaxNewSize=1024M -XX:MaxPermSize=1024M -Dfile.encoding=UTF-8


3.在server.xml中
    <Connector port="8080" protocol="HTTP/1.1"
                connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8" />
参考文档:http://blog.csdn.net/a15937712253/article/details/23396719

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325588391&siteId=291194637