Before reading this article, we encourage you to read one of our other articles so that you're fully aware of the different memory spaces required for the typical operation of a Minecraft: Java Edition server. The article can be found by clicking here.

We've recently implemented a new policy for increased Metaspace memory requests as follows:

  • We offer 256MB for free with every server.

  • Additional Metaspace memory beyond 256MB will be pulled from the your Heap

We calculate the Metaspace memory by the following equation:

Metaspace = 256 + (32 * ((Memory in MB - 1024MB)/1024))
Heap = Memory in MB - (Metaspace - 256)

For example, a 5GB server:

Metaspace = 256 + (32 * ((5120 - 1024)/1024)) = 384
Heap = 5120 - (384 - 256) = 4992

By default, the 5GB server would be 4.875GB allocated to Heap memory and 384MB to Metaspace memory. 256MB of the Metaspace memory would be provided free of charge, the additional 128MB is the .125GB from your Heap memory.

You can set your Metaspace memory by editing your .tweaks file for any server(s) you wish to set a custom amount on. The default setting is auto , which uses the behavior listed above.

Valid options for the metaspace-max option in the .tweaks file are:

  • auto 

  • Lowest value: 256  (for 256MB)

  • Highest value: 1024 (for 1024MB)

For most servers, 256MB of Metaspace memory will suffice, however, larger modpacks may require additional Metaspace memory. Examples are: Modern Skyblock 3, AllTheMods 3 

The most common reason for needing to modify this limit would be for:

  • Caused by: java.lang.OutOfMemoryError: Metaspace 

If you have any questions or concerns regarding this, please feel free to reach out to our team by clicking the blue button at the bottom right of this page or your control panel.

Did this answer your question?