IDEA开发工具对VM的一些配置
程序员文章站
2022-03-04 13:35:03
...
主要是为了解决开发Spring项目时内存溢出的问题。应根据不同机器的实际情况做适当调整。
1、Run/Debug Configurations -->VM options:
-XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m -Xms256m -Xmx256m -Xmn128m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC
2、Run/Debug Configurations -->VM options:
-XX:CompressedClassSpaceSize=128m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -Xms512m -Xmx512m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC
根据项目实际情况选择上述1或者2的配置。
3、安装路径/bin下的一些修改(如我的路径:D:\Program Files\JetBrains\IntelliJ IDEA 2019.3\bin):
(1)修改文件“idea.properties”:
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
idea.config.path=D:/Program Files/JetBrains/.IntelliJIdea/config
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
idea.system.path=D:/Program Files/JetBrains/.IntelliJIdea/system
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
idea.plugins.path=${idea.config.path}/plugins
(2)修改文件“idea.exe.vmoptions”和“idea64.exe.vmoptions”
-Xms1024m
-Xms4096m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
上一篇: Docker 部署 vue+spring boot 前后端分离项目详解
下一篇: idea常用快捷键