Skip to content

Instantly share code, notes, and snippets.

@Zheaoli
Last active July 27, 2022 05:37
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Zheaoli/56ce1aa44cbde45db9625fe842b12b05 to your computer and use it in GitHub Desktop.
Save Zheaoli/56ce1aa44cbde45db9625fe842b12b05 to your computer and use it in GitHub Desktop.
This is a JVM config for Jetbrains IDE on my laptop(With i9 10th CPU and 64G RAM)
-Xms128m
-Xmx8182m
-XX:ReservedCodeCacheSize=512m
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:+UnlockExperimentalVMOptions -XX:+UseZGC
-XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5
-XX:+UnlockDiagnosticVMOptions -XX:-ZProactive
@jianhaiqing
Copy link

It would be nicer to have the host machine hardware configuration, such as cpu and memory info

@Zheaoli
Copy link
Author

Zheaoli commented Mar 6, 2022

It would be nicer to have the host machine hardware configuration, such as cpu and memory info

Good Idea

@Zheaoli
Copy link
Author

Zheaoli commented Mar 7, 2022

If you trying to use JBR17/JDK17, maybe you could use the config options below

-Xms128m
-Xmx8182m
-XX:ReservedCodeCacheSize=512m
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:+UnlockExperimentalVMOptions -XX:+UseZGC
-XX:ZCollectionInterval=120
-XX:-ZProactive
-XX:NewRatio=2
-XX:ReservedCodeCacheSize=1024m
-XX:+AlwaysPreTouch
-Djava.net.preferIPv4Stack=true
-XX:LargePageSizeInBytes=1024m
-XX:+UseCodeCacheFlushing
-XX:+UseSplitVerifier
-XX:CompileThreshold=10000
-XX:+OptimizeStringConcat
-ea
-Dsun.java2d.metal=true

@cfw
Copy link

cfw commented Mar 7, 2022

fix typo 8182 -> 8192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment