# High memory consumption

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

The Java Virtual Machine (JVM) running GoLand allocates some predefined amount of memory. The default value depends on the platform. If you are experiencing slowdowns, you may want to increase the memory heap.

Procedure:

1. In the main menu, go to `Help | Change Memory Settings`.

2. Set the necessary amount of memory that you want to allocate and click Save and Restart.

This action changes the value of the `-Xmx` option used by the JVM to run GoLand. Restart GoLand for the new setting to take effect.

> **Tip:**
> If the IDE crashes, you can change the value of the `-Xmx` option manually as described in [JVM options](tuning-the-ide.html#configure-jvm-options).

GoLand also warns you if the amount of free heap memory after a garbage collection is less than 5% of the maximum heap size:

![The Low Memory warning](https://resources.jetbrains.com/help/img/idea/2026.3/LowMemoryWarning.png)

Click Adjust memory options to increase the amount of memory allocated by the JVM. If you are not sure what would be a good value, use the one suggested by GoLand.

![The Memory Settings dialog](https://resources.jetbrains.com/help/img/idea/2026.3/IncreaseMemoryHeap.png)

Click Save and Restart and wait for GoLand to restart with the new memory heap setting.

If these settings do not fix the problem, capture a memory snapshot, and [send it](reporting-performance-issues.html#uploading-snapshots) to the JetBrains support team.

Procedure: Capture a memory snapshot

* Click `Help | Diagnostic Tools | Capture Memory Snapshot`.

Alternatively, press `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+Shift+P` (VSCode), `F1` (VSCode (macOS)), type `capture memory`, and select Capture Memory Snapshot.

Wait until the HPROF snapshot is built. You can navigate to it from the notification balloon.

![Capture a memory snapshot](https://resources.jetbrains.com/help/img/idea/2026.3/db_capture_a_memory_snapshot.png)

You can capture memory snapshots automatically when the IDE runs out of memory.

Procedure: Capture memory snapshots automatically

1. Click `Help | Edit Custom VM Options…`.

2. In the VMOPTIONS file, add the following lines:

```
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=$USER_HOME/java_error_in_goland.hprof
```

According to the `HeapDumpPath` parameter, the HPROF file will be created in the user directory. Alternatively, specify any other directory that has read-write access.

![capture memory snapshots automatically](https://resources.jetbrains.com/help/img/idea/2026.3/db_capture_memory_snapshots_automatically.png)

