How to Give Minecraft More RAM
Minecraft: Java Edition has its own launcher which makes it easy to adjust all sorts of settings for the game. One of the settings you can tweak is how much RAM the game can utilize. If you’re running a big map with lots of custom creations, have a lot of mods installed, or just want the best possible performance for your Minecraft game, allocating more RAM can make a big difference.
Here’s how to do it:
Open the Minecraft launcher. If necessary, log in to your Microsoft or Mojang account. From the launcher home screen, select Installations in the top menu bar. You should see your current installation of Minecraft listed on the page, along with any other installations of the game you have on your system. Select the one you wish to allocate more RAM to, then click the three-dot menu icon on the right-hand side. Select Edit. Select More Options at the bottom of the screen. Underneath the heading JVM Arguments you’ll see a bar with a string of text in it. Near the start you should see something that looks like -Xmx2G or similar. The 2G portion of that denotes the 2GB of RAM that Minecraft has allocated to it. To increase that, all you need to do is change the value of the number. Select the text field to place your cursor in it, then use your keyboard to delete the 2, and replace it with another number. In our testing, we changed it to 4G, allocating 4GB of RAM to our Minecraft install. Minecraft needs at least 2GB to function at all, so be sure to allocate at least 2GB when making changes to the memory allowance. It would also be a good idea not to allocate more RAM than your system has, or even close to its maximum. If you’re unsure, this article explains how to find out how much RAM you have. Select Save. Then you can select the Play tab, followed by Play to begin playing Minecraft with more RAM.
How to Allocate More RAM to a Minecraft Server
If you’re running your own Minecraft server for friends and family to use, then making sure it has enough RAM is important. Without enough, you will be limited in the number of players your server can support, and the game can lag as changes to the world are sent out to every other player.
Select the text field to place your cursor in it, then use your keyboard to delete the 2, and replace it with another number. In our testing, we changed it to 4G, allocating 4GB of RAM to our Minecraft install.
Fortunately, allocating more RAM to a Minecraft server is still quick and easy. Just follow these steps.
Open the folder where you installed the Minecraft server. Right click or tap and hold on any blank space in the folder and select New followed by Text Document. Open the document and then copy and paste the following into it: java -Xmx@@@@M -Xms@@@@M - jar server. jar nogui Then, change the @ symbols to the quantity of RAM you want to allocate to the server. It needs to be written in the number of Megabytes of memory, and must be a multiple of 64. So for around 2GB of memory, put 2048. That would read: java -Xmx2048M -Xms2048M - jar server. jar nogui Select File in the top-left corner, and select Save As. Then set Save as type to All Files. Rename the file to file server launcher. bat and Select Save. Select the file server launcher file to start your Minecraft server with the newly enhanced allocation of RAM.
java -Xmx@@@@M -Xms@@@@M - jar server.jar nogui
Then, change the @ symbols to the quantity of RAM you want to allocate to the server. It needs to be written in the number of Megabytes of memory, and must be a multiple of 64. So for around 2GB of memory, put 2048. That would read:
java -Xmx2048M -Xms2048M - jar server.jar nogui