I tried searching the internet about -Xmn option, without success.
Can someone please explain what this stands for and how can I use it to tune JVM?
Use these options to configure your JVM. The options prefixed with -X are nonstandard. Options that relate to the JIT are listed under JIT and AOT command-line options. Options that relate to the Garbage Collector are listed under Garbage Collector command-line options.
Java Virtual Machine, or JVM, loads, verifies and executes Java bytecode. It is known as the interpreter or the core of Java programming language because it executes Java programming.
options configuration file. The default location of this file is config/jvm. options (when installing from the tar or zip distributions) and /etc/elasticsearch/jvm. options (when installing from the Debian or RPM packages).
Double click [your application] (pid [n]). On the right side, there will be inspection contents in a tab for the application. In the middle of the Overview tab, you will see the JVM arguments for the application.
From here:
-Xmn : the size of the heap for the young generation
Young generation represents all the objects which have a short life of time. Young generation objects are in a specific location into the heap, where the garbage collector will pass often. All new objects are created into the young generation region (called "eden"). When an object survive is still "alive" after more than 2-3 gc cleaning, then it will be swap has an "old generation" : they are "survivor".
And a more "official" source from IBM:
-Xmn
Sets the initial and maximum size of the new (nursery) heap to the specified value when using -Xgcpolicy:gencon. Equivalent to setting both -Xmns and -Xmnx. If you set either -Xmns or -Xmnx, you cannot set -Xmn. If you attempt to set -Xmn with either -Xmns or -Xmnx, the VM will not start, returning an error. By default, -Xmn is selected internally according to your system's capability. You can use the -verbose:sizes option to find out the values that the VM is currently using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With