Performance is worsened when running on Apple Silicon chips through Rosetta
Southpaw1496 opened this issue ยท 4 comments
Version information
mc1.17.1-0.3.2+build.7
Expected Behavior
I'd expect my performance to be better.
Actual Behavior
The performance is better at its best, but when moving it is characterized by massive lag spikes.
Reproduction Steps
Step 1: Obtain a Mac with an Apple Silicon chip (I appreciate this is difficult).
Step 2: Load Minecraft without Sodium and take note of the general performance, especially when moving through the world.
Step 3: Load Minecraft with Sodium
Step 4: Observe the difference.
Java version
Java 16.0.1 64-bit
CPU
Apple M1
GPU
Apple M1 Integrated GPU
Additional information
And now for a small essay
I tested both vanilla and Sodium in the exact same control environment (as permitting). First, I ran vanilla in a Jungle world, which is ideal since the jungle highlights issues with rendering a lot of transparency etc., due to all the trees (I think). Here is a screenshot of the F3 screen:
I then ran Sodium, by itself, in the same environment. I think the lag comes when chunks are being rendered, since at first the lag was unplayable, but after a few moments it stabilized at a frame rate slightly better than vanilla:
However, as soon as I started moving through the world (and new chunks were being rendered) the lag started up again.
It's quite hard to screenshot the extent of how many spikes there are at its worst, because every time you take a screenshot you stop moving, getting rid of the worst of them. I do hope the problem is at least somewhat illustrated.
It should also be noted that this version is running through Apple's Rosetta 2 x86 emulation. I know there is a MultiMC hack to get it running natively, but I haven't tried it because MultiMC won't work with my Microsoft account. I think it's still important even if is running through emulation, because that is the way the majority of users are playing the game.
I'll be happy to provide any more information that I can.
Just want to add that this also happens when using the ARM64 build of Java and LWJGL with Sodium. It's fine in vanilla.
However, this workaround worked perfectly:
I would encourage you to check Video Settings > Advanced and adjust Chunk Memory Allocator to SWAP as the latest hardware from Apple is known to have a problem the defaults, anyways.
Just wanted to say I am having the same issue on a MacBook Air (2015) running macos Majove (10.14.6). Trying to play survival in an area with lots of leaves stalls your game to 3-10 fps and very slowly stablizes. I removed sodium and decided to use other fps mods instead to boost performance.
I had no problems on my old MacBook Air (from 2012), which is why I assumed it only affected Apple Silicon chips. Interesting
Unfortunately, we are likely never going to support using Sodium under Rosetta. I just don't have access to Apple's M1 hardware to debug what's going on here, and more notably, Java applications are known to have severe performance pitfalls when running on Rosetta. You will always get a significantly better experience using an ARM64 build of Java/LWJGL.
Regardless of that... I would encourage you to check Video Settings > Advanced
and adjust Chunk Memory Allocator
to SWAP
as the latest hardware from Apple is known to have a problem the defaults, anyways.
Hopefully in the future it will be possible to login to a Microsoft account with MultiMC on macOS, assuming Mojang doesn't natively support ARM64 themselves by then.