How to allocate more RAM to your Minecraft server
Increasing RAM in your Minecraft server gives it more power. This results in pixel-rich graphics, less lag and crashes, and an overall better gaming experience.
However, you need to balance RAM with other server resources and configurations to get the best possible performance out of your server.
In this tutorial, we’ll show you how to allocate more RAM to Minecraft using three methods. You’ll also learn actionable tips for optimizing your server performance.
But first, let’s start by discussing how exactly more RAM can enhance your game.
Understanding RAM allocation in Minecraft
Modding Minecraft brings new items, blocks, resource packs, interface changes, and more, which significantly changes your gaming experience.
As the world complexity increases, you may need to boost gameplay stability by allocating more RAM to Minecraft. If you experience crashes on a modded server, insufficient memory is a likely cause.
In most cases, the minimum RAM requirements for a smooth server experience are based on the customization level and the number of players. Check out the following optimal ranges for RAM requirements in Minecraft:
- Server hosting non-modded Minecraft, with few active players –1-4 GB
- Server hosting non-modded Minecraft, with many active players – 4-6 GB
- Lightly-modded server – 6-7 GB
- Heavily-modded server – 8-10 GB
When increasing RAM allocation to your server, do not just throw all available megabytes at Minecraft. Your server still needs at least 512 MB for other systems to operate optimally. Make sure to subtract that from the total RAM capacity that your Minecraft hosting plan or your local computer provides.
Pro Tip
If 512 MB reserved for system usage is not enough for stable gameplay, allocate no more than half of your available memory to Minecraft.
How to allocate more RAM to a Minecraft server
Without further ado, let’s see how to allocate more RAM to a Minecraft server using three methods.
Upgrade your VPS plan
As reconfiguring all available RAM for Minecraft alone can crash your server, you need to increase the capacity of your server’s total RAM first. To do so, follow the steps below:
- Open your hPanel, navigate to VPS on the left side menu, and select Manage for the plan you want to upgrade.
- In Overview, scroll down and select Upgrade VPS.
- On the Choose Your VPS Plan page, choose your new plan and select Upgrade.
- Click Continue to confirm the restart process of your VPS service. It will only take a few minutes.
- Choose your preferred billing period.
- Click Choose payment method and select a preferred payment method.
- That’s it – now you just have to pay for your order.
Now, go to your Hostinger account to allocate more RAM to your server. Even after upgrading, the default memory value that VPS allocates is 1028 MB.
- In hPanel, go to VPS → Manage → Overview.
- Click the Manage panel button, and your Game Panel will open in a new tab.
- Log in to Game Panel with your credentials.
- In Instances, select the Minecraft server for which you want to allocate more RAM.
- Select Manage.
- If you need to accept the terms of the server, in the Minecraft Server EULA popup, select Accept.
- In the side panel, select Configuration.
- Select Minecraft.
- Enter a new value in megabytes (MB) in Memory Limit (MB).
Important! Leave at least 512 MB from the total RAM capacity of your Minecraft VPS plan to ensure stable system configuration.
For example, if your VPS has 2 GB of RAM, the maximum value for allocating RAM is 1536 MB.
Update RAM allocation in your game launcher
Minecraft’s game launcher offers tools for changing RAM values depending on your available resources. Here are the steps:
- Open the Minecraft game launcher.
- Click Installations.
- Select the three dots () → Edit next to the Minecraft edition for which you want to allocate more RAM.
- Select MORE OPTIONS.
- In JVM ARGUMENTS, edit the
-Xmx
Java command. For example:
- If you want to allocate 4 GB RAM, enter:
-Xmx4G
- For 1512 MB RAM, add:
-Xmx1512M
- Click Save.
Due to better mod management, third-party launchers are very popular among Minecraft server hosts. Check your third-party launcher documentation to find the equivalent settings to manage Minecraft RAM allocation. Look for Java-related settings, just like the following options for ATLauncher.
Edit your server configuration files
If you run your server on local hardware, like a computer, you can modify RAM allocation using Java configuration files. For this, follow the steps below:
- Create a new text file on the machine where you host your Minecraft server.
- In the text file, enter the following command line:
java -Xmx1234M -Xms1234M -jar server.jar nogui PAUSE
Replace 1234
with the required amount of RAM in megabytes. For example, if you want to allocate 3 GB (3072 MB) of RAM, enter:
-Xmx3072M -Xms3072M -jar server.jar nogui PAUSE
- Save the text file as run.bat.
- In the explorer of your Minecraft server, search for server.jar.
- Right-click the server.jar file and edit the filename to delete the .jar extension.
- Navigate to your run.bat file.
- To start the file, double-click run.bat
Note that using the same Xmx
and Xms
values for the minimum and maximum heap sizes helps avoid performance drops when Java dynamically adjusts the heap size.
Pro Tip
Follow our guide on how to set up and configure your dedicated Minecraft server for a thorough guide with tips and tricks.
Minecraft performance optimization tips
When optimizing your server, you need to pay attention to more resources than RAM. Besides doing regular checks, here are some tips to keep your server running efficiently and game without any lags.
Manage all server resources
Analyze and manage CPU usage, disk space, and network bandwidth to ensure you can play Minecraft without interruptions.
Configure your network
Make sure your network settings allow for stable packet exchange between your server and your players’ computers.
Update software
Stay on top of required updates for the applications you need to run your system optimally. Applying the latest updates improves server performance and boosts security.
Balance player load
Make sure your server can handle the number of online players. If the number is too big, adding more memory or optimizing settings might not help you.
Take care of security
Opt for a VPS hosting provider that offers robust security measures. For example, Hostinger’s Minecraft servers come with a built-in firewall, a malware scanner, DDoS protection, free automatic weekly backups, and a 99.9% uptime guarantee.
Additionally, we recommend enabling two-factor authentication to keep your online community safe.
Run optimization mods
Minecraft offers a variety of game optimization mods. For your inspiration, check out our list of the best Minecraft mods. Be sure to always read the documentation of your mods to avoid compatibility issues and known errors.
For more tips and tricks about optimizing a server for gaming, check out our guidelines on optimizing a server for maximum performance.
Conclusion
Learning how to allocate more RAM to Minecraft is quick, easy, and ensures better gameplay.
However, you have to keep in mind that allocating more RAM to the game cannot be at the expense of system requirements – you should leave at least 512 MB of RAM to ensure the server runs smoothly.
If stuttering or low frame rates persist after you allocate more RAM to Minecraft, most likely memory isn’t the culprit. In this case, make sure your device meets the minimal hardware and software requirements.
Should you have any more questions, explore the FAQ section or leave a comment below.
How to allocate more RAM to Minecraft FAQ
In this section, we’ll cover the most frequently asked questions on how to give Minecraft more RAM.
What is RAM, and how does it affect Minecraft?
Short for Random Access Memory, RAM is a short-term data storage that allows quick access to data currently used by the system. In Minecraft, more RAM can handle more online players and bigger worlds and ensure stable gameplay with mods. Insufficient RAM leads to slower games and more lags.
Does increasing RAM allocation in Minecraft improve performance?
Yes. Allocating more RAM to your Minecraft server can significantly improve gameplay performance. Increasing RAM ensures the game’s demands are met, especially when hosting many players, using mods, and creating bigger worlds.
What is the recommended amount of RAM to allocate for Minecraft?
The recommended RAM allocation varies depending on your needs. Running a base game requires 1-2 GB. If you want to use mods or increase player capacity, allocate 4-7 GB of RAM. If you run dozens of mods and want to maintain stable gameplay for hundreds of players, ensure 8-10 GB of RAM availability.