How to Allocate More RAM for Minecraft
While Minecraft’s graphics are pretty rudimentary, once you install mods, texture packs and start building, the game’s RAM usage can quickly creep up. To render the game in all its glory, you may need to allocate more RAM for Minecraft. Here is how you can do that.
How to allocate more RAM to Minecraft
Note that Minecraft requires at least 2 GB of RAM to run smoothly. With mods and texture packs, that may go up to 6 GB. Also make sure you leave at least half the RAM for your usual computer processes. To change how much RAM "Minecraft" can use, you'll have to change the settings of your Minecraft Launcher app.
1. Open the Minecraft Launcher and select the "Installations" tab on the top left.
2. Select the version of Minecraft that you want to allocate RAM for, then click the three dots on the right, then select "Edit."
3. Select "More Options" in the bottom-right corner of the screen.
In the JVM Arguments textbox, you’ll find code that reads “-Xmx2G" or something similar. The ‘2G’ shows you how much RAM Minecraft is currently using. Simply change that number to how much RAM you want to allocate to Minecraft.
4. Hit ‘Save’ to finalize the changes.
If you want to allocate more RAM to the Minecraft server you’re hosting, here is what you do.
1. Open the folder that has all your Minecraft server files.
2. Create a new text document.
3. Open the document, then paste the following code:
java -Xmx####M -Xms####M -exe Minecraft_Server.exe -o true
In place of "####" insert how much RAM you want to allocate. You'll have to write the allocation in megabytes — so if you want to allocate 4 GB, for instance, you'll enter " 4096," making the code:
java -Xmx4096M -Xms4096M -exe Minecraft_Server.exe -o true
4. Now click "File," then "Save As…" In the menu that opens, change the "Save as type" to "All Files." Save it.
5. Once the document is saved and visible in your folder, rename it "file server launcher.bat" or "run.bat" without the quotes.
6. What started as a text document is now the new launcher for your Minecraft server. Double-click the new .bat file to run your server with the new amount of RAM.