Before you allocate RAM there are some things you should know:
- x64 systems can allocate up to 192GB when using Windows Professional or above. 16GB when using Windows Home Premium and 8GB when using Home Premium and Starter. Also, please be aware of the physical limits imposed by your CPU Architecture.
- x32 systems can allocate up to 1GB (This is from personal experience on a 8GB machine and a 3GB machine, please correct me if I'm wrong)
So it is recommended you have a x64 system to allocate as much RAM as possible. Try an leave at least 1GB for the general system processes and stuff like that.
Here is how you allocate RAM on a windows system:
- Create a new document and save it as
run.bat
- Type the following this is for 4GB:
C:\<location to your javaw>\javaw.exe -Xmx4096M -Xms2048M -jar <location of your Minecraft exe>
So basically, the xmx
is your maximum RAM your allocating and your xms
is the minimum ram it should use.
Here is an example of an actual run.bat:
"C:\Program Files\java\bin\javaw.exe" -Xmx4096 -Xms2048 -jar "C:\users\user\Desktop\minecraft.exe"
Or if you have assigned Java in your system variables
javaw -Xmx4096 -Xms2048 -jar "C:\users\user\Desktop\minecraft.exe"
Obviously don't just copy my code, as you need to find out where A) Your javaw.exe is located and B) where your minecraft.exe
Remember: 1GB = 1024MB and 0.5GB = 512MB
Old Launcher Introduced in 1.6
With the new launcher, it is allot easier to allocate RAM to your Minecraft. Simply go ahead and edit a profile and where it says "Java Settings (Advanced)", tick all the check boxes. Then add the amount of RAM you would like to the JVM Arguments text box. For example if I wanted to run it with 1GB I would simply type -Xmx1G
and the 1G will indicate 1GB of RAM. xmx indicates the maximum RAM to allocate.
Ensure that you have the correct path to your java and that you have JDK installed.
Latest Launcher
In the latest launcher, if you go to the "installations" tab, go to the edit installation settings for that particular version, scroll down and select more options, you're able to change the max amount of RAM by simply changing the -Xmx
parameter.
ALTERNATIVELY
Simply download the tekkit pack and there is an option to play vanilla Minecraft. Simply select the "Cog" or settings icon in the top right corner and it will give you an option to allocate RAM if other methods are failing. Good Luck
Also if you are having trouble doing any of this, just simply google it and there are literally 100s of posts similar to this and allot of tutorials.
Allocating more RAM to Minecraft can do two things:
If the game's performance is being limited by a lack of available RAM, it will ease that possible performance bottleneck.
If the game is crashing due to Java running out of RAM (either due to bugs or due to complex constructions/mods in a world), it will postpone or completely prevent the crash from happening.
Whether allocating more RAM does either (or both) of these depends highly on what the source of the performance problem is in the first place; your particular computer's configuration and components; the size of the texture's you're using (32×32 takes 4× the RAM the default textures do, 64×64 takes 16× the default, etc.); the details of your Minecraft world(s); and what mods (if any) you have installed.
The default amount of RAM set by the Minecraft launcher is 1GB. This is usually plenty, but spikes in RAM usage or unusual circumstances can make it inadequate. If the game is normally running OK on 1GB but it's having a few issues sometimes, doubling it to 2GB should be plenty. If doubling it doesn't help, then the problem may not be solvable simply by giving the game more RAM and you may need to address the problem at the source: removing demanding mods, reducing texture pack size, solving physical heat problems, upgrading system drivers, turning off background processes, making redstone contraptions more efficient, etc.
Best Answer
If you are going to use JVM arguments to define the memory allocation, be sure that you are not providing duplicate commands.
-Xms1G will set the MINIMUM HEAP to 1GB at start-up.
-Xmx1G will set the MAXIMUM HEAP to 1GB at start-up.
Generally, when I need more memory for Minecraft, I set the max heap and not the min heap.
For example;
java -Xmx2G -jar minecraft.jar
you could also set it like this:
java -Xms1G -Xmx2G -jar minecraft.jar
Avoid allocating too much RAM since that will starve the rest of the machine.