-Xms
Sets the inital heap space.
EXAMPLE: -Xms2g
-Xmx
Sets the max heap space.
[h2]-XX Options[/h2]
To check all options supported by your VM:
[icode]java -server -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal[/icode]
http://jvm-options.tech.xebia.fr/#
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
Pregenerated: 1.8.0 60 64-bit
[h3]Behavior Options[/h3]
IgnoreUnrecognizedVMOptions (Boolean: false)
Ignore unrecognized VM options.
EagerInitialization (Boolean: false)
Eagerly initialize classes when possible.
GenerateRangeChecks (Boolean: true)
Generate range checks for array accesses
ForceTimeHighResolution (Boolean: false)
WIN32.
OnError (Comma seperated string list: empty)
Run user-defined commands on fatal error; see VMError.cpp for examples
OnOutOfMemoryError (Comma seperated string list: empty)
Run user-defined commands on first java.lang.OutOfMemoryError.
Example: -XX:OnOutOfMemoryError =“sh ~/somescript.sh”
UseCompressedStrings (Boolean: false)
Use byte arrays for strings which are ASCII.
[h3]Memory Options[/h3]
InitialHeapSize (Integer: 0)
Initial heap size (in bytes); zero means OldSize + NewSize
MaxHeapSize (Integer: 96M)
Maximum heap size (in bytes). -Xmx maps to this.
InitialRAMFraction (Integer: 64)
Fraction (1/n) of real memory used for initial heap size
MaxDirectMemorySize (Integer: -1)
Maximum total size of NIO direct-buffer allocations.
MaxHeapFreeRatio (Integer: 70)
Max percentage of heap free after GC to avoid shrinking.
InitialCodeCacheSize (Integer: platform specific)
Initial code cache size (in bytes)
ReservedCodeCacheSize
UseCodeCacheFlushing
[h3]Runtime Compiler Options[/h3]
AggressiveOpts (Boolean: false)
Turn on optimizations that are expected to be default in upcomming version.
CompileThreshold (Integer: platform specific)
Number of interpreted method invocations before (re)compiling. Lowering this number gives the compiler less time to gather accurate statistics which could result in slower code and will cause the compiler to run more often which increases CPU burden within a given time window.
DontCompileHugeMethods (Boolean: LOOKUP)
Don’t compile methods larger HugeMethodLimit if true.
HugeMethodLimit (Integer: 8000)
Don’t compile methods larger than the value if DontCompileHugeMethods is true.
MinInliningThreshold (Integer: 250)
Minimum invocation count a method needs to have to be inlined.
MaxInlineLevel (Integer: 9)
Maximum number of nested calls that are inlined.
MaxRecursiveInlineLevel (Integer: 1)
Maximum number of nested recursive calls that are inlined.
MaxTrivialSize (Integer: 6)
Maximum bytecode size of a trivial method to be inlined
MaxInlineSize (Integer: 35)
Maximum bytecode size of a method to be inlined.
FreqInlineSize (Integer : platform specific)
maximum bytecode size of a frequent method to be inlined
InlineFrequencyRatio (Integer: 20)
Ratio of call site execution to caller method invocation.
InlineSmallCode (Integer: )
Only inline already compiled methods if their code size is less than this.
DelayCompilationDuringStartup (Boolean: true)
Delay invoking the compiler until the main class is loaded.
DesiredMethodLimit (Integer: 8000)
Desired maximum method size (in bytecodes) after inlining.
InlineAccessors (Boolean: true)
Inline accessor methods (get/set)
PerBytecodeRecompilationCutoff (Integer: 200)
Per-BCI limit on repeated recompilation (-1=>‘Inf’)
PerMethodRecompilationCutoff (Integer: 400)
After recompiling N times, stay in the interpreter (-1=>‘Inf’).
[h3]Garbage Collector Options (General)[/h3]
InitialSurvivorRatio (Integer: 8)
Initial ratio of eden/survivor space size
InitialTenuringThreshold (Integer: 7)
nitial value for tenuring threshold
DisableExplicitGC (Boolean: false)
Choose if calling [icode]System.gc()[/icode] does a full GC.
[h3]Debugging aides[/h3]
LogCompilation (Boolean: false)
Log compilation activity in detail to hotspot.log or LogFile. It’s in XML, co check out JITWatch, a HotSpot JIT compiler log analisys and visualization tool.
PrintAssembly (Boolean: false)
Print native assembly code after compiles. Requires an external disassembler plugin.
https://wikis.oracle.com/display/HotSpotInternals/PrintAssembly also covers related options that enable printing of native methods, stubs, interpreter code, etc., and selective printing using CompileCommand.
Both 32- and 64-bit Windows binaries of a disassembler plugin can be found at the FCML Downloads page
For windows 64-bit VMs a copy of this plugin can be found inside: Graal/Truffle builds. Copy the library on your path (or side-by-side jvm.dll) to use with other OpenJDK based builds.
PrintAssemblyOptions (String: empty)
Options string for PrintAssembly
PrintCompilation (Boolean: false)
PrintInlining (Boolean: false)
Prints inlining optimizations
PrintIntrinsics (Boolean: false)
prints attempted and successful inlining of intrinsics