Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does -Xmn jvm option stands for

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?

like image 737
Bhushan Avatar asked May 27 '14 04:05

Bhushan


People also ask

What is option in 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.

What does JVM stand for?

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.

Where are JVM options set?

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).

How do I find JVM options?

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.


1 Answers

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.

like image 186
awksp Avatar answered Oct 05 '22 11:10

awksp