These are some basic steps on how to allocate more RAM to your game.
Step 1 - Open the Launcher.
Step 2 - Click the 'installations' button
Step 3 - Choose the profile you want to allocate more RAM to (e.g. Latest Release)
Step 4 - Click the 'more options' button
Step 5 - You will see alot of text, only concentrate on the first line saying -Xmx2G
Step 6 - Replace 2G with how much RAM you want to allocate (e.g. "4G" = 4GB of RAM allocated)
Attention:
32-bit system only supports up to 4GB RAM memory. Therefore, most 32-bit based systems only support a maximum of 2GB to be allocated to Java. The limit depends on the system, if you got an error, try less allocation.
If you are not using the native Java that comes with the launcher, be sure to use the latest and correct version of Java (64bit on 64bit-OS-Systems is recommended).
How much RAM do I have?
The easiest way to see how much RAM you have on Windows is to open the Task Manager and change to the Performance Tab. Look how much Physical Memory is available. On MacOS, go to the Apple Menu, select About This Mac. This window shows you your total amount of RAM.
Note that other programs and your system also need RAM to work. For example, if you run TeamSpeak or Firefox in background, you should leave enough memory for this software to run.
Some numbers for reference:
Windows 7: 1 GB RAM (32-Bit) or 2 GB RAM (64-Bit)
Windows 8 / 8.1: 1 GB RAM (32-Bit) or 2 GB RAM (64-Bit)
Windows 10: 2 GB RAM
Linux: 1-2 GB
Skype: 256 MB
Teamspeak: 64 MB
It is recommended to never allocate more than half your system RAM to the game. Also be aware that allocating more RAM does not necessarily make the game faster.
Something doesn't work? You got an error?
First of all check for spelling mistakes. Also important: JVM arguments are case-sensitive
Try to install the non-native version of Java (the download can be found here).
If you go that, make sure to set your "Java Executable" in the launcher
to the non-native javaw.exe (e.g. if you installed Java 17.0.6.10, set
it to C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin\javaw.exe). Please note that Java 9 and above are not yet fully supported.
Add -Xms1G and try again
Lower the numbers if your issue still persists.
Check if you've enough free RAM, and make sure you use 64-bit when allocating more than 2GB or RAM.
You found a fault in the post? Something is missing? Please let me know via a reply here.
In some cases I have actually seen a large amount of RAM reduce game speed. If we're talking in general terms, you don't ever need 32GB of RAM assigned to your game. Unless of course, you're running a heavy modpack
Rollback Post to RevisionRollBack
Senior Moderator for the official Minecraft Discord server (Minecraft, Live, Feedback)
Moderator for MoJIRA (Minecraft official bug tracker)
A 4000x4000 texture pack with 16 variants for every block type.
RAM wouldn't help at all here, as your GPU itself can only handle so large of a texture size (for example, mine supports up to 16384x16384 - this is the total size of ALL block and item textures combined as the game stitches them into a single texture atlas at runtime (draw calls can only operate on one texture at a time). Last I saw (1.13) the default atlas was 1024x512 so this means I can only run up to 256x textures, and probably less since the game (1.6.4) only reports 8192 as the maximum size that can be allocated. Interestingly, this is with 512 MB allocated (1.6.4, even heavily modded (non-Forge), only needs around 256 MB); if I allocate 1 GB it goes down to 4096, which leads to another important thing to note - you need to make sure there is enough free memory for the rest of your system (for example, the issue this person had was due to insufficient native memory, not a more traditional Java heap issue; this is more common on 32 bit but 64 bit isn't immune).
Thanks for taking the time to do this! If I may I want to ask something fairly specific.
How is this actually done? I have 64gb of RAM and dual graphic cards (2080 supers) on SLI.
I am trying to play RAD mod pack which is very heavy. I'd love to play it with HD texture packs, SEUS shader pack and all at max settings.
Is this even possible? Alternatively, how do I best take advantage of a system like this? You mention that you don't need 32gb of RAM unless you are doing something crazy if I dedicated that will the game even use it?
We have tried so many times to allocate more ram to the Minecraft server.
It seems easy but a step-by-step guide is necessary like you did here, thanks a lot for the detailed guidance.
I need to add some more value on this page and there we can see 2 different ways on how to allocate more ram to the Minecraft server - Read more
Guys, keep posting this kind of useful tips, I know how important is to solve this kind of issues for Minecraft lovers. I really appreciate your efforts.
usually, you don't need to allocate much RAM at all, for 200 mods it depends on your settings, if you have a laptop and are using every mod and setting that helps performance you can get away with 2-3 GB RAM (I tested with foamfix mod) but if you want HD graphics and highest settings you would need much more, I've seen YouTubers who play insane craft (over 270 pages of items in nei) and they also have to record/Livestream which is very resource-intensive and they allocate about 22GB (they never reach this threshold but allocate a lot to prevent crashing to anything but a nuke). but 32GB seems overkill, and can be bad since the RAM garbage collector has to scan more area and the cms collector mode (the most effective one) is not worthwhile for programs with over 4GB RAM allocated.
Minecraft use way too much memory, that makes it slow in the first place.
True; it shouldn't need more than about 60 MB * (render distance squared / 64); that is, 60 MB at 8 chunks, 240 MB at 16 chunks, 960 MB at 32 chunks (actually, a bit less since not all the initial 60 MB is for loaded chunks; you do want to add a bit more for headroom for the garbage collector). The first two values should be easily handled by any computer available or still in use today (including the oldest, lowest-end systems, I imagine somebody is still using some laptop with only 2 GB), if you still think 240 MB is too high, you can only do so much when you need to store millions of objects (blocks) in memory (not not really even as "blocks", just pointers, aka "block IDs", or at least the game used to, before 1.13 eliminated them; older versions needed 2.5 bytes per block, 3 bytes if they made use of an extension to IDs, which Mojang never used, only mods), just the way "voxel" games work, and really it is a miracle that 20+ year old computers were able to run the game decently at all (rendering is just as important, all those ultra-realistic-looking games out there have way less polygons being drawn to screen than even the most simple voxel game, granted, there are ways to reduce the polygon count, such as "level of detail", which only some mods, like "Far Plane Two", use).
Evidence? I've modded in countless hundreds of features yet they have had absolutely no impact of memory usage; in fact, I've significantly reduced it, especially allocation rates (how fast the "used memory" value goes up):
At 8 chunk render distance with 96 MB allocated (maybe a bit too low as I did this to prove a point, 128 MB would be good enough though):
At 16 chunk render distance; 512 MB was allocated (the amount I recommend), of which about 375 MB was used by the JVM, with around 3 times the actual usage (as noted above, the formula I gave is only approximate due to only loaded chunks using more memory), so there is plenty of room, of course, you'd need to multiply this by 1.5 to accommodate the maximum height limit since 1.18, although terrain doesn't seem to go higher than the old limit (much like how 1.2 doubled the limit to 256 but it wasn't until 1.7 that it could generate higher than 128, and even then only in a few biomes):
Unfortunately, many people just say, "well, modern hardware is just so much better now so it doesn't matter", which is an all-too-common way of thinking and the game could run so much better (ideally, 2x hardware performance increase = 2x software performance. It is true that some features are expected to reduce performance; like increasing the world height, but not as much as a simple 2x increase, as evidenced from my own experience with modding the game to have 2-3 times the ground depth, the latter way more on average than 1.18, and the game had long had an entire dimension that was 128 blocks deep):
It is true that some features are expected to reduce performance; like increasing the world height, but not as much as a simple 2x increase, as evidenced from my own experience with modding the game to have 2-3 times the ground depth, the latter way more on average than 1.18, and the game had long had an entire dimension that was 128 blocks deep):
I agree. Average Height is about 5 sections in old mc and with the new world height we add about 5 sections (-4 underground +1 because bigger mountains)
So i think it is a two times fold on chunk memory, but note that in overall we just talk about chunks not the whole game, and since 1.18 there is also depth render distance for sections to my knowledge. Also chunks were "fully blocking" before and now they are usually "threaded", causing the famous invisible blocks. Chunk distance is also circular now. Even with 3d biome map, 64 bit blockstates, and client/server, it still only takes about 300mb for the chunks with 10 renderdistance. A world in pre 1 13 would only use 50mb for 10 render distance.
Wirth's Law also tells us that we might not need the 3d biomemap, its anyway only used for chunkgeneration for now. And who needs over 2 billion blockids and over 2 billion blockstates?
Unfortunately, many people just say, "well, modern hardware is just so much better now so it doesn't matter",
How to allocate more RAM (memory) to Minecraft
Based on this post by this user, updated and corrected for 1.20+.
These are some basic steps on how to allocate more RAM to your game.
Step 1 - Open the Launcher.
Step 2 - Click the 'installations' button
Step 3 - Choose the profile you want to allocate more RAM to (e.g. Latest Release)
Step 4 - Click the 'more options' button
Step 5 - You will see alot of text, only concentrate on the first line saying -Xmx2G
Step 6 - Replace 2G with how much RAM you want to allocate (e.g. "4G" = 4GB of RAM allocated)
Attention:
32-bit system only supports up to 4GB RAM memory. Therefore, most 32-bit based systems only support a maximum of 2GB to be allocated to Java. The limit depends on the system, if you got an error, try less allocation.
If you are not using the native Java that comes with the launcher, be sure to use the latest and correct version of Java (64bit on 64bit-OS-Systems is recommended).
How much RAM do I have?
The easiest way to see how much RAM you have on Windows is to open the Task Manager and change to the Performance Tab. Look how much Physical Memory is available. On MacOS, go to the Apple Menu, select About This Mac. This window shows you your total amount of RAM.
Note that other programs and your system also need RAM to work. For example, if you run TeamSpeak or Firefox in background, you should leave enough memory for this software to run.
Some numbers for reference:
It is recommended to never allocate more than half your system RAM to the game. Also be aware that allocating more RAM does not necessarily make the game faster.
Something doesn't work? You got an error?
to the non-native javaw.exe (e.g. if you installed Java 17.0.6.10, set
it to C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin\javaw.exe). Please note that Java 9 and above are not yet fully supported.
You found a fault in the post? Something is missing? Please let me know via a reply here.
Senior Moderator for the official Minecraft Discord server (Minecraft, Live, Feedback)
Moderator for MoJIRA (Minecraft official bug tracker)
Very helpful, thank you!
Let's say I have 64Gb RAM on my laptop, if I give Minecraft 32Gb, do you know if Minecraft itself can slow down if it has access to too much ram?
In some cases I have actually seen a large amount of RAM reduce game speed. If we're talking in general terms, you don't ever need 32GB of RAM assigned to your game. Unless of course, you're running a heavy modpack
Senior Moderator for the official Minecraft Discord server (Minecraft, Live, Feedback)
Moderator for MoJIRA (Minecraft official bug tracker)
A 4000x4000 texture pack with 16 variants for every block type.
You may need more than 2GB there
Senior Moderator for the official Minecraft Discord server (Minecraft, Live, Feedback)
Moderator for MoJIRA (Minecraft official bug tracker)
RAM wouldn't help at all here, as your GPU itself can only handle so large of a texture size (for example, mine supports up to 16384x16384 - this is the total size of ALL block and item textures combined as the game stitches them into a single texture atlas at runtime (draw calls can only operate on one texture at a time). Last I saw (1.13) the default atlas was 1024x512 so this means I can only run up to 256x textures, and probably less since the game (1.6.4) only reports 8192 as the maximum size that can be allocated. Interestingly, this is with 512 MB allocated (1.6.4, even heavily modded (non-Forge), only needs around 256 MB); if I allocate 1 GB it goes down to 4096, which leads to another important thing to note - you need to make sure there is enough free memory for the rest of your system (for example, the issue this person had was due to insufficient native memory, not a more traditional Java heap issue; this is more common on 32 bit but 64 bit isn't immune).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Thanks for taking the time to do this! If I may I want to ask something fairly specific.
How is this actually done? I have 64gb of RAM and dual graphic cards (2080 supers) on SLI.
I am trying to play RAD mod pack which is very heavy. I'd love to play it with HD texture packs, SEUS shader pack and all at max settings.
Is this even possible? Alternatively, how do I best take advantage of a system like this? You mention that you don't need 32gb of RAM unless you are doing something crazy if I dedicated that will the game even use it?
Any help would be very appreciated!
We have tried so many times to allocate more ram to the Minecraft server.
It seems easy but a step-by-step guide is necessary like you did here, thanks a lot for the detailed guidance.
I need to add some more value on this page and there we can see 2 different ways on how to allocate more ram to the Minecraft server - Read more
Guys, keep posting this kind of useful tips, I know how important is to solve this kind of issues for Minecraft lovers. I really appreciate your efforts.
usually, you don't need to allocate much RAM at all, for 200 mods it depends on your settings, if you have a laptop and are using every mod and setting that helps performance you can get away with 2-3 GB RAM (I tested with foamfix mod) but if you want HD graphics and highest settings you would need much more, I've seen YouTubers who play insane craft (over 270 pages of items in nei) and they also have to record/Livestream which is very resource-intensive and they allocate about 22GB (they never reach this threshold but allocate a lot to prevent crashing to anything but a nuke). but 32GB seems overkill, and can be bad since the RAM garbage collector has to scan more area and the cms collector mode (the most effective one) is not worthwhile for programs with over 4GB RAM allocated.
Here are the full default JVM arguments:
-Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
There must be more to optimizing the game than just changing the number behind -Xmx.
My machine has 8 cores (16 threads) and 64 GB RAM </brag>, so what other options are there?
Switch to the Installations tab.
Click the profile you want to edit https://mobdro.bio/ .
Click "more options" at the bottom to reveal the "JVM Arguments" field.
Minecraft use way too much memory, that makes it slow in the first place.
Minecraft 1.6.4 Performance Comparison
True; it shouldn't need more than about 60 MB * (render distance squared / 64); that is, 60 MB at 8 chunks, 240 MB at 16 chunks, 960 MB at 32 chunks (actually, a bit less since not all the initial 60 MB is for loaded chunks; you do want to add a bit more for headroom for the garbage collector). The first two values should be easily handled by any computer available or still in use today (including the oldest, lowest-end systems, I imagine somebody is still using some laptop with only 2 GB), if you still think 240 MB is too high, you can only do so much when you need to store millions of objects (blocks) in memory (not not really even as "blocks", just pointers, aka "block IDs", or at least the game used to, before 1.13 eliminated them; older versions needed 2.5 bytes per block, 3 bytes if they made use of an extension to IDs, which Mojang never used, only mods), just the way "voxel" games work, and really it is a miracle that 20+ year old computers were able to run the game decently at all (rendering is just as important, all those ultra-realistic-looking games out there have way less polygons being drawn to screen than even the most simple voxel game, granted, there are ways to reduce the polygon count, such as "level of detail", which only some mods, like "Far Plane Two", use).
Evidence? I've modded in countless hundreds of features yet they have had absolutely no impact of memory usage; in fact, I've significantly reduced it, especially allocation rates (how fast the "used memory" value goes up):
https://www.minecraftforum.net/forums/minecraft-java-edition/discussion/3192541-i-cannot-comprehend-the-memory-usage-of-modern-and
At 8 chunk render distance with 96 MB allocated (maybe a bit too low as I did this to prove a point, 128 MB would be good enough though):
At 16 chunk render distance; 512 MB was allocated (the amount I recommend), of which about 375 MB was used by the JVM, with around 3 times the actual usage (as noted above, the formula I gave is only approximate due to only loaded chunks using more memory), so there is plenty of room, of course, you'd need to multiply this by 1.5 to accommodate the maximum height limit since 1.18, although terrain doesn't seem to go higher than the old limit (much like how 1.2 doubled the limit to 256 but it wasn't until 1.7 that it could generate higher than 128, and even then only in a few biomes):
Unfortunately, many people just say, "well, modern hardware is just so much better now so it doesn't matter", which is an all-too-common way of thinking and the game could run so much better (ideally, 2x hardware performance increase = 2x software performance. It is true that some features are expected to reduce performance; like increasing the world height, but not as much as a simple 2x increase, as evidenced from my own experience with modding the game to have 2-3 times the ground depth, the latter way more on average than 1.18, and the game had long had an entire dimension that was 128 blocks deep):
https://en.wikipedia.org/wiki/Wirth's_law
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
I agree. Average Height is about 5 sections in old mc and with the new world height we add about 5 sections (-4 underground +1 because bigger mountains)
So i think it is a two times fold on chunk memory, but note that in overall we just talk about chunks not the whole game, and since 1.18 there is also depth render distance for sections to my knowledge. Also chunks were "fully blocking" before and now they are usually "threaded", causing the famous invisible blocks. Chunk distance is also circular now. Even with 3d biome map, 64 bit blockstates, and client/server, it still only takes about 300mb for the chunks with 10 renderdistance. A world in pre 1 13 would only use 50mb for 10 render distance.
Wirth's Law also tells us that we might not need the 3d biomemap, its anyway only used for chunkgeneration for now. And who needs over 2 billion blockids and over 2 billion blockstates?
Indeed
The worst is still offheap memory tho
Minecraft 1.6.4 Performance Comparison