Minecraft with shaders bad performance

Recently started my adventure with Linux and been trying to figure out why Minecraft with shaders is performing horribly. I am using Prism Launcher and a modpack with Sodium + Iris. Every time the chunks are being loaded, the GPU utilization drops down to 30%-40% causing bad frametimes and lag spikes. This happens both on vanilla Arch and CachyOS. Tried setting CPU governor to performance, changing kernels, sessions (from X11 to Wayland) and setting to “prefer maximum performance” in Nvidia X Settings. So far nothing has fixed it.

However I tried the same Minecraft instance on Linux Mint 22 and no issues there, the GPU is always utilized and never goes below 90%. So any idea how is it done that on Mint, GPU usage never significantly drops unlike in Arch-based distros?

My PC specs are Ryzen 7 5800X, RTX 3090, 32 GB RAM

Did you try to disable GSP firmware?

Did you also try using an Adoptium/Temurin build of Java? They’re more optimized, which fits the theme of CachyOS: AUR (en) - Packages

Ive also optimized custom java17 and 21 versions, which should improve the performance too btw.

Hi! it would be cool if you include graalvm java 8 for old instances like minecraft 1.7.10, because graalvm is more optimized, and im fan of old versions and such help would be appreciated

When chunks are being loaded/generated minecraft is using a significant amount of your cpu cores, potentially all of them, which sounds like it’s causing a bottleneck preventing your gpu from running at full capacity.
I suggest that you try some different kernels/schedulers to see if that evens out the performance - a scheduler that’s fairer and doesn’t prioritize the highest load will probably help. Also, if you are using the “game-performance” wrapper, try disabling that. In my experience running minecraft with a high priority can have unexpected consequences. I think the above will probably be the biggest differences compared to Linux Mint.
If that doesn’t make enough of a difference, then sodium/minecraft allows you to limit the number of “Chunk Update Threads” which will reduce the overall system load when chunks are being loaded/generated. Just, bear in mind that reducing this will reduce the number of chunks that can be generated at any one time.