Classic Minecraft Java Edition can get bogged down by textures and modpacks that expand and update the game beyond its original scope. Fortunately, you can always just allocate more RAM to it so that performance doesn't suffer too much — as long as you have enough RAM, that is.
Here's how to allocate more RAM to Minecraft, regardless of how much you have in your system.
Note: Minecraft Bedrock Edition can take advantage of more RAM without you having to manually adjust anything. This tweak is for the Java Edition of Minecraft only.
The Java version of Minecraft has (by modern standards) a relatively small quantity of allocated RAM, and without you giving it access to more through the launcher, it can't go beyond that. That leads to poor performance or crashes when the memory runs out. Here's how to allocate more.
Step 1: Open the Minecraft launcher and then select the Installations tab.
Step 2: Find the profile that you want to change memory allocation for, and select the three-dot menu icon.
Step 3: Select the More options button under the «Resolution» subheading.
Step 4: Scroll down to «JVM Arguments» and look for the "-Xmx2G" parameter.
Step 5: Select the text and use your keyboard to change "-Xmx2G" to "-Xmx8G". That will allocate 8GB of RAM to the Java launcher, which for most installations should be enough. That said, you can theoretically change it to any quantity divisible by 2 that is under your total RAM quantity.
Step 6: When you've set it to the quantity you want, close down those options menus and run Minecraft again to see how it performs.
If you want to see how much memory you have left over, while playing, press and hold the F3 function key. It will display how much memory you have to spare and whether you might need to allocate more.
If you're using the CurseForge launcher, you can allocate more RAM in a similar but
Read more on digitaltrends.com