Skip to content

Live tool + guide

Minecraft Server RAM Allocation, and How Much to Give Your Own PC

Short answer: For Minecraft server RAM allocation, start from the modpack author's recommendation. Without one, PaperMC recommends at least 6 to 10 GB for a server however few players it has, with -Xms set equal to -Xmx and about 1 to 1.5 GB of the plan left for Java and the system. On your own PC, never give Minecraft so much that Windows or macOS runs short.

RAM calculator

How much RAM should I allocate?

Start at 4 GB -Xmx4G

A starting point, not a measurement. Watch memory with F3 while you play: if the used figure keeps hitting the maximum, add 1 GB; if it stays far below, take some back.

Set it in your launcher: CurseForge general Minecraft settings (default), or the modpack’s Profile Options · Modrinth App instance settings → Java and memory → Custom memory allocation · Prism instance Settings → Java → tick Memory → Maximum Memory Usage · Official launcher Installations → ⋯ → Edit → JVM arguments, change the -Xmx value to -Xmx4G.

Minecraft server RAM allocation and RAM for your own modded game are the same setting, -Xmx, with different limits around it. A server should use a fixed allocation it can always hold; your own PC has to share memory with the operating system, your browser and Discord. The calculator above handles both: tell it whether this is your PC or a server, how many mods are in the pack, how many players will be online on a server, and how much RAM the machine has, and it suggests a -Xmx value plus either the launcher settings for your PC or a start script for a server.

Treat every number here as a starting point to adjust, not a measurement. Mod lists differ too much for any table to be exact, which is why the last two sections show you how to check, from inside the game, whether the allocation you chose is actually the constraint.

Starting points by setup

Use the pack author's figure when one exists: they know their pack. The CurseForge app does this automatically when an author has provided a recommendation, and its default for modpacks is 4 GB, which CurseForge advises not going below. Otherwise take the row closest to your setup and adjust after a session or two.

Servers and clients spend memory differently. A dedicated server renders nothing, but it keeps the world updated around every connected player: the Minecraft Wiki describes simulation-distance in server.properties as the distance from players within which entities are updated, and view-distance as the amount of world data the server sends each client. Your own PC has to hold your view of the world plus the textures and shaders for drawing it.

Mods in the packYour own PC: start -Xmx atServer: start -Xmx at
Vanilla, or up to 10 mods2 GB3 GB
11 to 60 mods3 GB4 GB
61 to 150 mods4 GB6 GB
More than 150 mods6 GB8 GB
Shader pack on topconsider 1–2 GB more (the calculator does not add this)not applicable (servers do not render)
Configuration guidance, not measurements: the starting values the calculator above uses. PaperMC recommends at least 6–10 GB for any server; the lighter server rows are this site's starting points for small modded servers. On a server the calculator adds 0.5 GB per concurrent player past four.

How the calculator picks a number

The calculator follows these rules, in this order. They are this site's configuration guidance, built around the PaperMC and CurseForge figures cited below.

  1. Base allocation from the mod count, as in the table above: 2, 3, 4 or 6 GB on your own PC and 3, 4, 6 or 8 GB on a server, for up to 10, up to 60, up to 150 and more than 150 mods.
  2. Server only: add 0.5 GB for every concurrent player beyond the first four.
  3. Ceiling: never more than 8 GB on your own PC or 10 GB on a server.
  4. Your own PC: leave the system the larger of 3 GB or 30% of the PC's RAM. That keeps the suggestion at or below 70% of total memory, under the 75% mark above which the CurseForge app shows a warning.
  5. Server: leave the larger of 1.5 GB or 15% of the machine's RAM for Java and the system. PaperMC's documentation says Java needs memory on top of -Xmx and recommends reducing -Xmx and -Xms by about 1,000 to 1,500 MB; for an 8 GB host it suggests 6,500 MB, which is what the calculator gives.
  6. If that headroom leaves less than the base figure, the suggestion is cut to fit, rounded down to the nearest half gigabyte and never below 1 GB, and the calculator says how much the pack would like.
  7. Server: the start script it prints sets -Xms to the same value as -Xmx. PaperMC's reasoning is that a server should be expected to use its entire -Xmx anyway, and memory below -Xmx that is never claimed is wasted.

Why more RAM is not automatically better

Giving Minecraft more memory only helps while memory is the thing it is short of. Past that point the extra does nothing, and on a home PC it can make things worse.

  • The operating system and every other program still need memory. Take too much and the system starts swapping to disk, which shows up as stutter.
  • Java uses memory beyond -Xmx. Oracle's troubleshooting guide notes that class metadata (Metaspace) is allocated in native memory, and PaperMC's docs warn that Minecraft and Java need additional memory on top of the -Xmx value.
  • Returns diminish. PaperMC states that more memory does not mean better performance above a certain point, and that buying 32 GB for a server will only waste money.
  • This site treats about 8 GB as a practical ceiling for your own PC, which is where the calculator stops. That is configuration guidance, not a measured limit.
  • If a pack still runs out at a generous allocation, Oracle's guide notes that in a long-running program the cause can be code holding on to objects it should release. In a modded game that points at a mod, which you find by halving the mods folder, not by raising the number again.

Setting it in the official Minecraft Launcher

In the official launcher, memory is a JVM argument stored on each installation, so change it on the installation you actually launch, for example the Fabric or NeoForge one, not on Latest release. Mojang's 26.1 changelog says the game now allocates 4 GB by default, up from 2 GB.

  1. Open the launcher and choose Minecraft: Java Edition, then the Installations tab.
  2. Click the three dots on the installation you play and choose Edit.
  3. On the edit page, find the JVM arguments field; the Minecraft Wiki lists it among the settings there, alongside the game directory and Java executable.
  4. Change only the -Xmx value: -Xmx6G gives the game 6 GB.
  5. Leave every other argument as it is, click Save, and launch from that installation.

CurseForge, Modrinth App, Prism and ATLauncher

Each of these launchers has two places for memory: a global default and a per-instance override, and the override wins. If an instance has its own setting switched on, raising the global value changes nothing for it, so check the instance first. The setting names below are copied from each launcher's interface text or help pages.

  • CurseForge app: CurseForge's help article lists two places, the game's general Minecraft settings for the default and a modpack's Profile Options window for that pack. The default for modpacks is 4 GB (4,096 MB), and the app can apply the modpack author's recommendation automatically.
  • Modrinth App: global default under Settings, Java and memory, Memory allocation (described in the app as the maximum memory available to each instance). Per instance: instance settings, Java and memory, tick Custom memory allocation and move the slider.
  • Prism Launcher: global default under Settings, Java, Memory. Per instance: the instance's Settings page, Java tab, tick the Memory box to override, then set Maximum Memory Usage (-Xmx) and, if you like, Minimum Memory Usage (-Xms). Prism warns when the maximum is close to or above your system memory.
  • ATLauncher: global default under Settings, Java/Minecraft, Maximum Memory/Ram. Per instance: the instance's Settings, Java/Minecraft tab, Maximum Memory/Ram. The value is in megabytes (the launcher's own default is 4096), so 6 GB is 6144.
  • Server hosts' panels: the allocation is often tied to the plan. If a slider exists, remember PaperMC's advice to stay about 1 to 1.5 GB below the plan size.
Diagram of where the memory setting lives in five launchers: official launcher JVM Arguments field, CurseForge Settings Minecraft Java Settings Allocated Memory and per-profile Profile Options, Modrinth App Java and memory and Custom memory allocation, Prism Memory with Maximum Memory Usage, ATLauncher Maximum Memory/Ram, plus a server start script.
Where the RAM setting lives in each launcher, global default on the left and per-instance override on the right. Labels from each launcher's interface text, read October 2026.

Setting it in a server start script

A self-hosted server takes its memory from the command that starts it, and from nowhere else. Edit the script, change both numbers, and restart.

Vanilla, Paper and Fabric servers put the flags directly on the java command. NeoForge and Forge (1.17 and later) installers create run.bat and run.sh scripts that read user_jvm_args.txt; NeoForge's documentation says to set the server's RAM in that file, and the script's own comments say to add custom JVM arguments there. The file's comments show one flag per line, such as -Xmx4G, and call 4 GB a good default for a modded server.

Two ways a server gets its memory

# Vanilla, Paper or Fabric: flags on the java line
java -Xms6G -Xmx6G -jar server.jar nogui

# NeoForge / Forge: user_jvm_args.txt, read by run.bat / run.sh
-Xms6G
-Xmx6G

# -Xmx  most memory the game may use
# -Xms  memory claimed at start; equal to -Xmx on a server

OutOfMemoryError: which message you got and what it needs

java.lang.OutOfMemoryError comes with a detail message appended to it, and Oracle's Java troubleshooting guide treats each one as a different problem. Search your log for the full line.

  • Java heap space: an object could not be allocated in the heap. Oracle notes this can be as simple as a heap size that is too small for the application, or, in a long-running program, something holding on to objects it should release. Raise -Xmx one step; if it still happens after a long session, suspect a mod.
  • GC Overhead limit exceeded: Java is spending most of its time collecting garbage and making very slow progress, which Oracle says typically means the live data barely fits into the heap. Oracle's action is the same as for heap space: increase the heap.
  • Metaspace: the native memory that holds class metadata ran out. Very large mod lists load a lot of classes. Oracle notes that Metaspace is allocated from the same address space as the Java heap, so a smaller heap leaves more room for it when the heap has space to spare; raising -Xmx does not fix this one.
  • Requested array size exceeds VM limit: code asked for an array larger than the Java VM allows, regardless of how much heap is available. More RAM will not help; look at the mod the stack trace names.
  • The game or server is killed with no OutOfMemoryError at all: the machine, not the Java heap, ran out. PaperMC's docs warn that the operating system's OOM killer can kill a server whose -Xmx leaves no room. Lower -Xmx so the system keeps room.

Reading the memory lines on the F3 screen

Press F3 in game. In the memory entry, the Mem line shows the percentage of memory in use and then used/total in MB; an Allocation rate line follows, then Allocated, which shows how much memory the game has claimed as a percentage of the maximum it can use. The Minecraft Wiki notes the game labels these MB even though they are measured in MiB.

  • The total on the Mem line should match your -Xmx. If it does not match what you set, the setting did not apply.
  • If the used figure keeps climbing over a long session and the game ends in OutOfMemoryError, Oracle's guide points at something holding on to objects. Find it by halving the mods folder.
  • If the percentage never comes near 100% and the game still lags, memory is not your bottleneck. Lower render distance or look at CPU-heavy mods instead of raising -Xmx.

Worked example: a six-player modded Fabric server

Take a modded Fabric server for six friends. Say the pack is about 100 mods, nobody runs a dedicated machine, and the choice is between a 6 GB and an 8 GB hosted plan.

  1. Base from the table: 61 to 150 mods on a server starts at 6 GB.
  2. Players: six is two past four, so add 1 GB, for 7 GB.
  3. A 6 GB plan cannot hold that: after the calculator's 1.5 GB of headroom it caps the suggestion at 4.5 GB.
  4. On the 8 GB plan, the same headroom caps it at 6.5 GB, the figure PaperMC's docs give for an 8 GB host. Set -Xms and -Xmx to that.
  5. In server.properties, keep view-distance and simulation-distance moderate; the Minecraft Wiki describes both as distances around each player and recommends lowering them if players have major lag.
  6. After a week of play, check the panel's memory graph if it has one. If memory never comes near the ceiling, you have headroom; if it hits the ceiling, either raise the plan or find the mod holding memory.
RAM calculator on this site set to A server with 100 mods, 6 players and an 8 GB machine, showing Start at 6.5 GB, -Xmx6656M, and start script lines for Fabric, Forge and NeoForge.
The calculator at the top of this page with the numbers from this example: 100 mods, six players, an 8 GB plan. It stops at 6.5 GB even though the pack would like about 7 GB. Screenshot of this site's own RAM calculator, November 2026. Site terms.

Sources & further reading

Back to the full How to Mod Minecraft guide for the whole install walkthrough from the beginning.

ShareRedditXFacebook
Sukie, editor of How to Mod Minecraft

Sukie · Editor

Sukie runs How to Mod Minecraft. She writes and edits every guide on the site, works through each install path herself before publishing, and rewrites anything that turns out to be wrong. The focus here is narrow on purpose: getting mods, loaders and modded servers working without wading through forum threads.

About this site · How guides are checked · Last updated November 5, 2026

NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.