Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Basic Java Flags

Can be used to optimize a server or program.

Memory allocation

FlagDescription
-XmsMinimum allocated memory for Heap
-XmxMaximum allocated memory for Heap
-XssAllocated memory for Stack

Main flags

FlagDescriptionNote
-XX:+DisableAttachMechanismDisable the attachment mechanism that allows agents to be loaded into the JVM
-XincgcActivates the garbage collector, which will unload unused RAM from time to time. The collector type is chosen depending on the version of Java.
-serverJava server activation. Speeds up the compilation of classes, which gives a performance boost, but increases the startup time.Only for Java x64
-Dfile.encoding=UTF-8UTF-8 encoding
-XX:AutoGCSelectPauseMillis=3000The time in milliseconds between calls to the automatically selected garbage collector.
-XX:+UseConcMarkSweepGCActivating a garbage collector that uses multiple threads
-XX:ConcGCThreads=2Number of threads for garbage collector
-XX:+UseSerialGCGarbage collector that runs on a single thread

Additional for optimization

FlagDescriptionNote
-XX:+AggresiveOptsActivating Java Experimental Arguments
-XX:-UseGCOverheadLimitIgnores low memory for garbage collection
-XX:+UseCompressedOopsReducing the size of the pointer, headings, as well as shifts within the created objects.
-XX:+OptimizeFillAllows you to translate array fill/copy cycles into direct machine instructions.
-XX:+OptimizeStringConcatOptimization of the concatenation operation.

About

Java arguments for program performance tuning.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors