一行命令获取当前JVM所有可设置的参数以及当前默认值
java -XX:+PrintFlagsInitial >>1.txt
然后查看这个1.txt即可
uintx AdaptivePermSizeWeight = 20 {product} uintx AdaptiveSizeDecrementScaleFactor = 4 {product} uintx AdaptiveSizeMajorGCDecayTimeScale = 10 {product} uintx AdaptiveSizePausePolicy = 0 {product} uintx AdaptiveSizePolicyCollectionCostMargin = 50 {product} ........ ........
具体的参数含义可以百度,当然也可以去查找open JDK的源码查看
另外给一个目前我个人觉得不错的eclipse JVM参数
JDK 6 下:
-vmargs -Xverify:none -client -XX:-UseSplitVerifier -Dosgi.requiredJavaVersion=1.6 -Xms256m -Xmx256m -XX:MaxPermSize=200m -XX:PermSize=200m -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CompileThreshold=1000 -XX:+UseStringCache -XX:+UseFastAccessorMethods -XX:+UseBiasedLocking -XX:CMSFullGCsBeforeCompaction=5 -XX:+UseCMSCompactAtFullCollection -XX:+UseThreadPriorities -XX:+MaxFDLimit -XX:-DontCompileHugeMethods -XX:InitialCodeCacheSize=128m -XX:ReservedCodeCacheSize=128m
时间: 2024-10-26 00:03:17