Minecraft on Ubuntu is using 100% of my RAM
I am using Java version on ubuntu 20.04 and have an issue with the RAM usage.
I have tested other Minecraft versions, Java versions, launcher versions, and I've even changed the assigned RAM but the problem persists.
I start playing the game and nearly at 45 minutes the PC will crash. This takes a shorter amount of time if I rise the chunk load size or spawn a bunch of mobs.
What was happening is than as long as Minecraft runs, the memory usage will rise until system crashes. I have checked the Java RAM usage but it does not show more than 1GB of used RAM, no other process is filling the RAM, yet at the general view the "available RAM" keeps decreasing.
Weirdly after closing Minecraft this consumed RAM will not be freed and will be consuming system RAM until reboot of the PC. I figured out that I can recover that "consumed RAM" by executing this after I close the game:
echo 1 > /proc/sys/vm/drop_caches
Not exactly sure what's happening or if there is a way to fix it. Has anyone else experienced the same problem and uncovered a solution?
Pictures about "Minecraft on Ubuntu is using 100% of my RAM"
Why is my Minecraft server using so much RAM?
The most common cause for memory issues in Minecraft servers is too many chunks being loaded at one time.How do I lower my RAM usage in Minecraft?
First, you want to login into your multicraft control panel. Scroll down until you see View Distance. Once you find this option you can change this to something lower to reduce memory usage and lag. Depending on the number of players you have active on your server you can reduce this down as needed.Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ron Lach, Barbara Olsen, Thirdman, Anna Tarazevich