I started a hardcore world in 21w44a, fresh. This was done in Windows 10. After playing for a little while, I saved and exited. The next day, I opened up the same world. Framerate tanked, getting worse the more of the world was loaded. Eventually, Minecraft completely hung and I had to kill the process.
I copied the world to a different machine (running macOS) and was able to reproduce the problem. Including having to kill the process. It was using over 500% CPU at the time it was killed. Logs don't show anything interesting, but are attached.
I've uploaded a zip file of the world in question to dropbox, as other worlds haven't been able to reproduce this, it might be something specific in the world data itself, or where the player exited and re-enters the world.
https://www.dropbox.com/s/f71bf7qspiy2pjv/New%20World%20%285%29.zip?dl=0
Attachments
Comments 6
Unix-based systems report CPU usage where 100% is full load on one core. Over 500% means it was running full load on five cores, with work on a sixth.
It’s useful detail to describe that the process was stuck doing something with a lot of resources being used.
Opened the world to the same thing. After a bit of trying, I got in the World (With 10 GB of RAM). I have now been in this world for 2 hours and i have still the same performance.
Seed: 5637837785475677757
Cords: -937 30 556
RAM usage: 9567 MB at max
Screenshot: F3+SHIFT menu opened, F3+ALT+SHIFT menu opened Lagspike
PS:
Open Minecraft Launcher
Go to the Versions Tab
Click on the three points next to the Version
Scroll down until you see "show more" and click on "show more"
Now scroll down to the "JMV-Arguments"
Change the first Argument (-Xmx2G or -Xmx2048MB) to -Xmx(Number of GB of RAM)G
Important: Never change the GB of RAM to almost max, always let at least 4-8 GB of RAM for your OP, etc.
(I recommend at max half of your RAM)
I can confirm that increasing the maximum heap size does provide a workaround, but I'm definitely left wondering what is going on.
With the larger max heap, I do notice that the memory used rises rapidly, gets collected, and then rises rapidly again. So every ~20-30 seconds it's going from 2.8GB to 5GB dropping back to 2.8GB and then rising back up to 5GB. I'm not even doing anything in the world, just standing still. That's quite a bit of heap churn compared to what I'm used to seeing with 1.17.1, that grows maybe a few hundred MB between collections, rather than multiple GB.
You can't use more than 100% of the CPU