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?