Increase the memory heap of the IDE
Help | Change Memory Settings
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.
In the main menu, go to Help | Change Memory Settings.
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.
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 The Low Memory warning](https://resources.jetbrains.com/help/img/idea/2024.3/LowMemoryWarning.png)
Click Configure 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 The Memory Settings dialog](https://resources.jetbrains.com/help/img/idea/2024.3/IncreaseMemoryHeap.png)
Click Save and Restart and wait for GoLand to restart with the new memory heap setting.
GoLand can show you the amount of used memory in the status bar. Use it to judge how much memory to allocate.
Right-click the status bar and select Memory Indicator.
If you are using the Toolbox App, you can change the maximum allocated heap size for a specific IDE instance without starting it.
Open the Toolbox App, click the settings icon next to the relevant IDE instance, and select Settings.
On the instance settings tab, expand Configuration and specify the heap size in the Maximum heap size field.
If the IDE instance is currently running, the new settings will take effect only after you restart it.
If you are using a standalone instance not managed by the Toolbox App, and you can't start it, it is possible to manually change the -Xmx
option that controls the amount of allocated memory. Create a copy of the default JVM options file and change the value of the -Xmx
option in it.
Thanks for your feedback!