Idea and tomcat memory settings
Prerequisites:
1. My computer is 64-bit Win10, and the memory is 24G
. 2. My IDEA version is 2018.1
IDEA memory settings
1. Find the IDEA memory installation address: D:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\bin
2. Find idea64.exe.vmoptions
3. The settings are as follows:
-Xms1024m
-Xmx4096m
-XX:MaxMetaspaceSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:+PrintGC
-XX:+PrintGCDetails
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
Description:
1.Xms1024m, the minimum memory setting is 1G
2.Xmx4096m, the maximum memory setting is 4G, the reason is that I use the computer memory for my work to be 8G
3.MaxMetaspaceSize=512m, the metadata area, the memory size of the method area before
jdk8 4.UseConcMarkSweepGC, set the old age Collect concurrently on behalf of 5.SoftRefLRUPolicyMSPerMB = 50 ,
the object of "soft reference" can survive for 50 milliseconds after the last access 7 can be deleted and used for analysis 4. Start idea64.exe every time instead of starting idea.exe Reference address: http://www.cnblogs.com/jack204/archive/2012/07/02/2572934.html
TOMCAT memory settings
Open tomcat settings in IDEA
and fill in WM options:
-Xms2g
-Xmx2g
-XX:+UseCompressedOops
Description:
1.UseCompressedOops, pointer compression
uses 32-bit pointers in 64-bit HotSpot, the default 64-bit memory usage is 1.5 times more than 32-bit memory