How To Allocate more RAM to Minecraft

bat

Minecraft is set at a default of around 512 MB of RAM allocated to it, as this is the default set by Java. This is plenty for some activities in the game, but can result in poor performance on certain systems, especially during prolonged play, as the game will attempt to cache data on the hard drive of your computer once the RAM usage hits a certain percent. Entry level laptops now typically come with 4 GB of DDR3 RAM so there is no sense in not using more of it to power the game!

Fixing this is a relatively simple task on Windows XP/Vista/7. You will need to know the directory for your Minecraft install, how much total RAM you have on your system, and how much you want to allow Minecraft to use. It is important to not allocate more RAM than you actually have, as this will cause errors.

To get started, open a basic text editing program such as Notepad. The first line of text you will want to enter looks like this: javaw -Xmx1536m -Xms512m -jar "C:\Users\(username)\Desktop\Games\Minecraft.exe". The -Xmx is the parameter, in megabytes, for the max amount of RAM Minecraft can access. Likewise, -Xms is the parameter for the minimum amount, also in megabytes. Included is my default filepath for Minecraft, on Windows 7, which you will want to replace with your file path. In my example, I have tripled the amount of RAM potentially available to Minecraft (1536m), but you can change this number to better suit your needs.

The next line of the file should read: “start Minecraft.exe”. This will change the parameters for RAM usage and boot up the game for you in one process, rather than having to do these chores separately. All told, my file looks like this:

javaw -Xmx1536m -Xms512m -jar "C:\Users\(username)\Desktop\Games\Minecraft.exe"
start Minecraft.exe

The final step is to save your text file as a .bat file. To do this in Notepad, simply go to File, Save As, and enter a file name. Change the file type from .txt to All File Types, and at the end of the file name, add “.bat”. This will save the file properly.

This should increase the stability of your Minecraft game, and help increase frame rates slightly. Was this brief guide useful to you? Let us know on the forums or in comments on Facebook!

No comments

Leave your comment

In reply to Some User