This wikiHow teaches you how to increase the amount of memory (RAM) that Minecraft can use, which may help solve memory errors. If you're using your personal version of Minecraft, you can easily allocate RAM from launcher versions 1.6 through 2.0.X; you can check your launcher version number in the lower-left corner of the launcher window. If you're editing a server's RAM, you will need to create a file that will launch Minecraft with more memory. It's a good idea not to allocate more than half to two-thirds of your computer's total RAM to Minecraft.

Method 1
Method 1 of 3:

Using a Minecraft Server

  1. 1
    Check your computer's available RAM. The amount of available RAM will dictate how much memory you can allocate to Minecraft. To check RAM:
    • Windows - Open Start, click the Settings gear, click System, click About, and look at the number next to "Installed RAM".
    • Mac - Open the Apple menu, click About This Mac, and look at the number to the right of the "Memory" heading.
  2. 2
    Update your Java program. Go to Java's website at https://www.java.com/en/download/ and click the "Download" button below the latest version of Java. This will ensure that your Java version is up-to-date and ready for RAM allocation.
    • If you're on Windows, make sure you download the correct bit version for your operating system. You can only allocate 1 GB of RAM on a 32-bit computer.
    Advertisement
  3. 3
    Open your Minecraft server directory. This is the folder that contains the Minecraft_server.exe file that you launch to start your Minecraft server.
    • The easiest way to find this is by searching for the "Minecraft_server" file and then opening its file location.
  4. 4
    Create a text document in your server folder. Click either Home (Windows) or File (Mac), then either click New item (Windows) or select New (Mac) and click Text Document. This will create a new text document in the same location as the minecraft_server.exe file.
  5. 5
    Enter in the code to allocate more RAM. Enter the following code into your text document depending on the operating system you are using:

    Windows

     java -Xmx####M -Xms####M -exe Minecraft_Server.exe -o true
     PAUSE


    OS X

     #!/bin/bash
     cd "$( dirname "$0" )"
     java -Xms####M -Xmx####M -exe Minecraft_Server.exe -o true


    Linux

     #!/bin/sh
     BINDIR=$(dirname "$(readlink -fn "$0")")
     cd "$BINDIR"
     java -Xms####M -Xmx####M -exe Minecraft_Server.exe -o true


    • Change #### to the value in megabytes that you want to allocate. To allocate 2 GB, type 2048. To allocate 3 GB, type 3072. To allocate 4 GB, type 4096. To allocate 5 GB, type 5120.
  6. 6
    Save the file. If you are using windows, save the file as a ".bat" file. Click File and select Save As.... Change the file extension from ".txt" to ".bat". If you are using OS X, save the file as a ".command" file. If you are running Linux, save the file as a ".sh" file.
    • You may first have to enable file extensions on Windows to view them.
  7. 7
    Run the new file to start Minecraft. The file you create will be the new launcher for your Minecraft server. Launching with the new file (.bat for Windows, .command for Mac, or .sh for Linux) will allocate the new amount of RAM to the server.
  8. Advertisement
Method 2
Method 2 of 3:

Using Launcher Version 2.0.X

  1. 1
    Check your computer's available RAM. The amount of available RAM will dictate how much memory you can allocate to Minecraft. To check RAM:
    • Windows - Open Start, click the Settings gear, click System, click About, and look at the number next to "Installed RAM".
    • Mac - Open the Apple menu, click About This Mac, and look at the number to the right of the "Memory" heading.
  2. 2
    Update your Java program. Go to Java's website at https://www.java.com/en/download/ and click the "Download" button below the latest version of Java. This will ensure that your Java version is up-to-date and ready for RAM allocation.
    • If you're on Windows, make sure you download the correct bit version for your operating system.
  3. 3
    Open the Minecraft launcher. Double-click the Minecraft icon to do so.
    • If the launcher window has "1.6..." in the bottom-left corner (or at the top of the window), use the launcher version 1.6.X method instead.
  4. 4
    Click the Installations tab. It's at the top of the launcher.
  5. 5
    Make sure the Advanced settings switch is on. This switch is in the top-right side of the Launch Options page. If the switch isn't green, click it before continuing.
  6. 6
    Click the profile you want to change. If you only see one option on this page, just click that option.
  7. 7
    Ensure the JVM arguments are enabled. See the text box called JVM arguments to enable this feature.
  8. 8
    Edit the amount of RAM that Minecraft can use. You'll see a line of text in the "JVM arguments" text field, the first section of which says -Xmx1G; change the "1" to the number of gigabytes of RAM you want to use for Minecraft.
    • For example, you would change this text to say "-Xmx4G" to use four gigabytes of RAM with Minecraft.
  9. 9
    Click SAVE. It's at the bottom of the window. Minecraft will now use your selected amount of RAM for the specified profile.
  10. Advertisement
Method 3
Method 3 of 3:

Using Launcher Version 1.6.X

  1. 1
    Check your computer's available RAM. The amount of available RAM will dictate how much memory you can allocate to Minecraft. To check RAM:
    • Windows - Open Start, click the Settings gear, click System, click About, and look at the number next to "Installed RAM".
    • Mac - Open the Apple menu, click About This Mac, and look at the number to the right of the "Memory" heading.
  2. 2
    Update your Java program. Go to Java's website at https://www.java.com/en/download/ and click the "Download" button below the latest version of Java. This will ensure that your Java version is up-to-date and ready for RAM allocation.
    • If you're on Windows, make sure you download the correct bit version for your operating system.
  3. 3
    Start the Minecraft launcher. In 1.6.X and newer, you can allocate more RAM directly from the Minecraft launcher. If you are using an older version, see the next section.
  4. 4
    Select your profile. Click Edit Profile and select a profile from the list.
  5. 5
    Enable JVM Arguments. In the "Java Settings (Advanced)" section, check the "JVM Arguments" box. This will allow you to enter commands to modify the Minecraft program.
  6. 6
    Allocate more RAM. By default, Minecraft will allocate 1 GB of RAM for itself. You can increase this by typing -Xmx#G. Replace # with the number of gigabytes you want to allocate. For example, if you wanted to allocate 18 GB, you would type -Xmx18G.
  7. 7
    Save your profile. Click Save Profile to save your settings. Your specified amount of RAM will now be applied to your selected profile.
  8. Advertisement

Community Q&A

  • Question
    After using method one, my Minecraft still runs at 38-42 fps, and it only uses 1250 MOB out of the 4,000 I assigned it. How do I fix this?
    Community Answer
    Community Answer
    RAM isn't the only thing that contributes to the amount of FPS. You need to consider how powerful your CPU is and what your graphics settings are in game. My suggestion is try lowering your render distance and particles. Also, make sure V-Sync is off, as this does limit your frame rate. Another thing you could try is installing Optifine, which gives you more control over your graphics settings.
  • Question
    If I have 2 GB of RAM, do I use -Xmx1G or -Xmx2G?
    Community Answer
    Community Answer
    I would say the first one, as you would then allocate 1 GB of RAM, and you don't want everything else on your computer quitting.
  • Question
    My newly built computer has 16 GB total of RAM. Am I okay to allocate half of it to Minecraft?
    Community Answer
    Community Answer
    16 BG is a lot of space.You shouldn't need all 8 GB to play Minecraft.
Advertisement

Warnings

  • Be careful that you do not allocate more RAM than your computer has, or else you will get an error that the Java VM failed to start, and Minecraft will not run.
    ⧼thumbs_response⧽
  • Minecraft is not ideal to run on a Guest Virtual Machine that runs on your PC. Otherwise, use the Host one (or your main boot OS).
    ⧼thumbs_response⧽
Advertisement

About This Article

Jack Lloyd
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 1,915,358 times.
13 votes - 63%
Co-authors: 37
Updated: September 15, 2021
Views: 1,915,358
Categories: Minecraft
Article SummaryX

1. Open the launcher.
2. Click Launch Options.
3. Enable Advanced Settings.
4. Select a profile.
5. Enable ″JVM arguments.″
6. Edit the amount of RAM.
7. Click SAVE.

Did this summary help you?
Advertisement