DataGrip 2020.3 Help

Advanced configuration

Besides the standard options available , DataGrip enables you to perform low-level configuration of the underlying platform and the Java runtime.

JVM options

DataGrip runs on the Java Virtual Machine (JVM), which has various options that control its performance. The default options used to run DataGrip are specified in the following file:

<IDE_HOME>\bin\datagrip64.exe.vmoptions (for the default 64-bit JVM)

<IDE_HOME>\bin\datagrip.exe.vmoptions (for the optional 32-bit JVM)

DataGrip.app/Contents/bin/datagrip.vmoptions

<IDE_HOME>/bin/datagrip64.vmoptions (for the default 64-bit JVM)

<IDE_HOME>/bin/datagrip.vmoptions (for the optional 32-bit JVM)

Configure JVM options

Do one of the following to create a copy of the default file with JVM options in the configuration directory that will override the original file:

  • On the Help menu, click Edit Custom VM Options.

  • If you do not have any project open, on the Welcome screen, click Configure and then Edit Custom VM Options.

  • If you cannot start DataGrip, manually copy the default file with JVM options to the DataGrip configuration directory.

If you do not have write access to the DataGrip configuration directory, you can add the DATAGRIP_VM_OPTIONS environment variable to specify the location of the file with your preferred JVM options. This file will override both the original default file and the copy located in the DataGrip configuration directory.

Common options

The default values of the JVM options should be optimal in most cases. The following are the most commonly modified ones:

OptionDescription
-Xmx Limits the maximum memory heap size that the JVM can allocate for running DataGrip. Default value depends on the platform. If you are experiencing slowdowns, you may want to increase this value, for example, to set the value to 2048 megabytes, change this option to -Xmx2048m.
-Xms Specifies the initial memory allocated by the JVM for running DataGrip. Default value depends on the platform. It is usually set to about half of the maximum allowed memory (-Xmx), for example, -Xms1024m.
-XX:NewRatio Specifies the ratio between the size of the young and old generation of the heap. In most cases, a ratio between 2 and 4 is recommended. This will set the size of the young generation to be 1/2 to 1/4 of the old generation correspondingly, which is good when you are often working on one project and only a few files at a time. However, if you are constantly opening new files and switching between several projects, you may need to increase the young generation. In this case, try setting -XX:NewRatio=1, which will make the young generation as large as the old generation, allowing objects to remain in the young generation for longer.

For more information about available JVM options, see the java reference for Windows or macOS/Linux.

Platform properties

DataGrip enables you to customize various platform-specific properties, such as the path to user-installed plugins and the maximum supported file size. The default properties used to run DataGrip are specified in the following file:

<IDE_HOME>\bin\idea.properties

DataGrip.app/Contents/bin/idea.properties

<IDE_HOME>/bin/idea.properties

Configure platform properties:

Do one of the following to create an empty idea.properties file in the configuration directory that will override the values from the original file:

  • From the Help menu, select Edit Custom Properties.

  • If you do not have any project open, on the Welcome screen, click Configure and then select Edit Custom Properties.

  • If you cannot start DataGrip, manually create an empty idea.properties file in the DataGrip configuration directory.

If you do not have write access to the DataGrip configuration directory, you can add the DATAGRIP_PROPERTIES environment variable to specify the location of the idea.properties file. The properties in this file will override the corresponding properties in both the original default file and the one located in the DataGrip configuration directory.

Common properties

Users often change the following properties:

  • The default IDE directories may need to be moved, for example, if the user profile drive runs out of space or it is located on a slow disk, if the home directory is encrypted (slowing down the IDE) or located on a network drive, if you want to create a portable installation or exclude caches from home directory backups, and so on.

    PropertyPath to
    idea.config.pathConfiguration directory
    idea.system.pathSystem directory
    idea.plugins.pathPlugins directory
    idea.log.pathLogs directory

    Specify paths with forward slashes /, including Windows paths (for example, C:/idea/system).

    You can insert properties as variables. For example, use ${user.home} (standard Java system property) to specify paths relative to the user's home directory:

    idea.config.path=${user.home}/MyIdeaConfiguration
  • Limits that can affect performance:

    PropertyDescription
    idea.max.content.load.filesize Maximum size of files (in kilobytes) that DataGrip is able to open. Working with large files can affect editor performance and increase memory consumption. The default value is 20000.
    idea.max.intellisense.filesize Maximum size of files (in kilobytes) for which DataGrip provides coding assistance. Coding assistance for large files can affect editor performance and increase memory consumption. The default value is 2500.
    idea.cycle.buffer Maximum size of the console cyclic buffer (in kilobytes). If the console output size exceeds this value, the oldest lines are deleted. To disable the cyclic buffer, set idea.cycle.buffer.size=disabled.
    idea.max.vcs.loaded.size.kb Maximum size (in kilobytes) that DataGrip loads for showing past file contents when you compare changes. The default value is 20480.

DataGrip provides a number of other properties that define interaction with the environment (window managers, launchers, file system, and so on). Most of them act like hidden settings (in the sense that they are not evidently exposed), which you may need to enable or disable in certain cases. Change these properties only if advised by JetBrains Support.

Default IDE directories

By default, DataGrip stores user-specific files (configuration, caches, plugins, logs, and so on) in the user's home directory. However, you can change the location for storing those files, if necessary.

Configuration directory

The DataGrip configuration directory contains user-defined IDE settings, such as keymaps, color schemes, custom VM options, platform properties, and so on.

Syntax
%APPDATA%\JetBrains\<product><version>
Example
C:\Users\JohnS\AppData\Roaming\JetBrains\DataGrip2020.3
Syntax
~/Library/Application Support/JetBrains/<product><version>
Example
~/Library/Application Support/JetBrains/DataGrip2020.3
Syntax
~/.config/JetBrains/<product><version>
Example
~/.config/JetBrains/DataGrip2020.3

You can change the location of the DataGrip configuration directory using the idea.config.path property.

To share your personal IDE settings, copy the files from the configuration directory to the corresponding folders on another DataGrip installation. Make sure that DataGrip is not running to avoid erasing the copied files when you shut down the IDE. Depending on which settings you modified, the DataGrip configuration directory can contain the following subfolders:

DirectoryUser settings
codestylesCode style schemes
colors Customized editor color and font schemes
fileTemplatesUser-defined file templates which pertain to the entire DataGrip workspace
filetypes User-defined file types
inspectionCode inspection profiles
keymapsCustomized keyboard shortcuts
optionsVarious options, for example, feature usage statistics and macros
scratchesScratch files and buffers
templates User-defined live templates
tools Configuration files for user-defined external tools
shelfShelved changes

System directory

The DataGrip system directory contains caches and local history files.

Syntax
%LOCALAPPDATA%\JetBrains\<product><version>
Example
C:\Users\JohnS\AppData\Local\JetBrains\DataGrip2020.3
Syntax
~/Library/Caches/JetBrains/<product><version>
Example
~/Library/Caches/JetBrains/DataGrip2020.3
Syntax
~/.cache/JetBrains/<product><version>
Example
~/.cache/JetBrains/DataGrip2020.3

You can change the location of the DataGrip system directory using the idea.system.path property.

Plugins directory

The DataGrip plugins directory contains user-installed plugins.

Syntax
%APPDATA%\JetBrains\<product><version>\plugins
Example
C:\Users\JohnS\AppData\Roaming\JetBrains\DataGrip2020.3\plugins
Syntax
~/Library/Application Support/JetBrains/<product><version>/plugins
Example
~/Library/Application Support/JetBrains/DataGrip2020.3/plugins
Syntax
~/.local/share/JetBrains/<product><version>
Example
~/.local/share/JetBrains/DataGrip2020.3

You can change the location of the DataGrip plugins directory using the idea.plugins.path property.

Logs directory

The DataGrip logs directory contains product logs and thread dumps.

Syntax
%LOCALAPPDATA%\JetBrains\<product><version>\log
Example
C:\Users\JohnS\AppData\Local\JetBrains\DataGrip2020.3\log
Syntax
~/Library/Logs/JetBrains/<product><version>
Example
~/Library/Logs/JetBrains/DataGrip2020.3
Syntax
~/.cache/JetBrains/<product><version>/log
Example
~/.cache/JetBrains/DataGrip2020.3/log

You can change the location of the DataGrip logs directory using the idea.log.path property.

Project directory

The DataGrip project directory contains project settings.

Syntax
%HOMEPATH%\.<product><version>\config\projects
Example
C:\Users\JohnS\.DataGrip2020.3\config\projects
Syntax
~/Library/Application Support/<product><version>
Example
~/Library/Application Support/DataGrip2020.3
Syntax
~/.<product><version>/config/plugins
Example
~/.DataGrip2020.3/config/plugins

Define a project directory

You can define a default project directory for new projects. The project directory becomes preselected in File | Open and File | New | Project.

  1. In settings Ctrl+Alt+S, navigate to Appearance & Behavior | System Settings.

  2. In the Default Directory directory, specify a path to the directory where you want to store your projects by default.

  3. Click OK.

Setting a default directory
Last modified: 28 July 2020