Configure JVM Options
You can configure the properties and JVM options for your YouTrack instance. The YouTrack properties include various launch configuration settings. The JVM options let you manage behavioral, garbage collection, performance, and debugging options for your server.
For a complete list of YouTrack-specific configuration parameters, see Configuration Parameters.
Default JVM Options
To run YouTrack, the following JVM options are set by default for all installations:
Setting | JVM Option | Value |
---|---|---|
Maximum Metaspace memory | -XX:MaxMetaspaceSize | 350m |
Maximum Java heap size | -Xmx | 1024m or 1g |
The following JVM options can improve the performance of your YouTrack installation:
Setting | JVM Option | Value |
---|---|---|
Minimum Metaspace memory | -XX:MetaspaceSize | 350m |
Set JVM Options for a YouTrack JAR Installation
When you run YouTrack as a stand-alone Java process, set the JVM options in the command that you use to run YouTrack.
In this case, the JVM option is applied ad-hoc. These options are reset the next time you stop and restart the service. To set a JVM option on a persistent basis, use the configure
command:
Set JVM Options
You can set JVM options in a command-line interface or manually edit the configuration file.
When you set a YouTrack property or JVM option, the property is applied on every server restart.
Set JVM Options from the Command Line
You can set properties and JVM options for your server with the configure
command. You can use this method for any type of YouTrack installations. To execute these commands in an MSI distribution, open the Command Prompt window as an administrator.
When you set JVM options from the command line, consider the following guidelines:
Always execute the
configure
command on behalf of the OS user that runs the YouTrack service. This command creates configuration files and folders. The YouTrack service user should have sufficient permissions to access these files and folders.To set the parameter for a JVM option, enter the
configure
command with the prefix-J
. The-J
prefix signifies that a JVM option is declared after it. You must add the-J
prefix to each JVM option that you want to configure.To define an option that is passed to YouTrack by the JVM on start, use "-":
youtrack configure -J-<jvm.property>[=<value>]
For example:
youtrack configure -J-Dorg.eclipse.jetty.server.Request.maxFormKeys=10000 youtrack configure -J-Xmx1024m -J-XX:+HeapDumpOnOutOfMemoryErrorTo remove a JVM option, use "+":
youtrack configure -J+<jvm.property>[=<value>]
The constructions
+option=<value>
,+XX:<option>=<value>
and+D<property>=<value>
remove the corresponding option only if it has exactly the same value.For example:
youtrack configure -J+Dorg.eclipse.jetty.server.Request.maxFormKeys=10000The constructions
+option
,+XX:<option>
and+D<property>
remove the corresponding option regardless of the value.For example:
youtrack configure -J+ea
To set a JVM option from the command line:
In a command-line interface, enter the
configure
command. For example:<youtrack_home>bin/youtrack.sh configure -J-XX:+HeapDumpOnOutOfMemoryError
Set JVM Options Manually
You can configure JVM options manually by editing the youtrack.jvmoptions
file. This file is created automatically when you modify the default configuration. The location of the file depends on the distribution type of your YouTrack installation.
For a ZIP distribution, the file is located in the
<YouTrack installation directory>/conf
directory.For an MSI distribution the file is located in the
%programdata%\\JetBrains\YouTrack\conf
directory.You can locate the path to the
conf
folder in the<YouTrack installation directory>\internal\conf\installation.xml
file. The path is written to the propertydefault-appdata-root
. For example:<default-appdata-root>C:\ProgramData\JetBrains\YouTrack</default-appdata-root>
If you have not changed the JVM options for your server, the directory contains a sample configuration file. The sample configuration file uses the .dist
extension and contains a list of default JVM options. If the file you want to edit does not exist:
Copy the youtrack.jvmoptions.dist file and save it as youtrack.jvmoptions
orCreate a youtrack.jvmoptions file in this directory and paste the contents of the sample configuration file into it.
You can then edit the contents of the file to configure the JVM options.
To change JVM options in the configuration file:
Open the
youtrack.jvmoptions
file.Edit the JVM options directly in the file. To set the value for a pre-defined JVM option, remove the special characters that mark the corresponding line as a comment and change the property to the desired value.
Save and close the file.
Check JVM Options
After changing JVM options for your YouTrack installation you might want to check that your changes are applied. To do so, you can use a list jvm-options
command. It produces a list of JVM properties that will be applied to the YouTrack instance on the next start. Please note that the output of the command lists only persistent JVM options. Any options that are provided ad-hoc in the command to run YouTrack will override the value of the same persistent option.