Playing Minecraft on PC means you have access to a world of mods, shaders, and other unique elements to add to your copy of the game. However, by default, Minecraft only allows you to allocate 2 GB of RAM to the application, meaning your performance can be hindered if you decide to download a ton of add-ons. If you want to increase performance across the board, you'll need to allocate more RAM to Minecraft, which can be done right from the application itself.
Allocate more RAM to Minecraft
Fortunately, while Minecraft caps your RAM by default, it's extremely simple to uncap it. All you have to do is open the Minecraft Launcher on PC to start. With the launcher open, follow the steps below to increase your RAM usage while playing Minecraft:
Click on either "Minecraft: Java Edition" or "Minecraft for Windows" from the left-hand side of the screen
On both of these pages, you'll see an "Installations" tab at the top of the screen
Select the Installations tab and hover over your installation of the game
By hovering, you can see a three-dot icon appear next to the "Play" button
Click the three-dot icon and then press "Edit"
Select "More Options" from the bottom of the menu and then find the box labeled "JVM Arguments"
By default, this box reads: "-Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M"
You can disregard everything in this box except for the start of it, the part that reads "-Xmx2G"
This is your current RAM allocation. To change it, simply replace the "2" with 4, 6, 8, 16, or any other possible RAM configuration
Click "Save" at the bottom of the screen, and you're done
I recommend going with either 4 or 8 GB of RAM allocation, as anything higher can spell some issues for your PC. More specifically, allocating too much RAM to Minecraft has been known to cause input delay and lag for even high-end PCs. If you have an inordinate amount of shaders or mods, though, you might have to go with 16 GB to run everything smoothly.