Exactly how much ram should I allocate to minecraft
I am playing Minecraft 1.21.11 on Minecraft. I have 32 gb of ram.
I am playing with the modrinth app add using the mods: voxy, iris, sodium, chunky and photon on fabric.
currently I have 16gb of ram allocated but to improve performance I want to increase that but I am not sure what to set my ram allocation at. am I supposed to set at a number that is a power of 2 like for example 8, 16, 32, etc.
I am playing with the modrinth app add using the mods: voxy, iris, sodium, chunky and photon on fabric.
currently I have 16gb of ram allocated but to improve performance I want to increase that but I am not sure what to set my ram allocation at. am I supposed to set at a number that is a power of 2 like for example 8, 16, 32, etc.
Commentaires
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
For perspective, we run a server here which has five mods via Fabric for up to 10 players, although usually it is a max of 5 at once and I also play in the launcher on that PC that runs the server. I have 32Gb on Windows 11 and set the RAM range to be dynamic with a base of 6Gb and a max of 8Gb. We have no issues and even run two servers at once on the same PC (the second server is 3-6Gb) so we can have me playing and two servers running all at once with no issues.
I think for you playing solo 16Gb RAM is plenty, but there is also no harm in going to a max of 24 out of your 32Gb.
Edit: The CPU is a 10th gen i5 with no dedicated graphics, so our PC these days is very sub-mid-range and we still have no issues.
```-Xmx4g -Xms4g -XX:+ZGC -XX:+UseCompactObjectHeaders```
ZGC is a modern garbage collector that has significantly faster cycles than the (currently-default) G1GC and won't produce the same micro-stutters with high memory allocation. Note that this will be the new default with updates released after 2026, but it's still worth knowing for versions before that
With that out of the way, how much RAM you need to allocate will be dependent on how heavy are the mods you're using. Vanilla Minecraft or Minecraft with only optimization mods can comfortably stay at the default 4GB. If you start throwing in tweak mods, it might be worth upping it to 6-8GB. Heavy modpacks can eat up to 20GB or more.