Child pages
  • Memory Management

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
# make sure that the hardcoded System.gc() or Runtime.gc() are ignored (rmi does this)
# Initial Java Heap Size (in MB), when G1GC is used just set the init memory to the max memory  
# Maximum Java Heap Size (in MB)


-server -Xms4G -Xmx4G -XX:+UseG1GC -XX:MetaspaceSize=200M -XX:MaxMetaspaceSize=200M -XX:MinMetaspaceFreeRatio=0 -XX:MaxMetaspaceFreeRatio=100 -XX:+DisableExplicitGC 


Where the 4G for the initial (Xms) and the max (Xmx) should be set to the maximum heap you want or can assign to the java vm.