I have the issue that whenever i install DH it always create LAG SPIKES an idk how to fix it
DH chunks 256
Chunks in Mc 14
@giantalexis DH does tend to significantly impact performance, BUT that also does sound like your Java garbage collector eating up a ton of CPU time. If you press f3 and the RAM usage is very high, and goes back to being low every lag spike, that is the Java garbage collector.
There’s a few things you could try to help with the issue if that is the case, if you’ve allocated a lot of RAM (like more than 12GB) you could try allocating less, and if you’ve allocated a small amount of RAM (like 4-6GB) you could try increasing that.
In Java, when you create variables or other things in code, they are stored in RAM “forever,” and the garbage collector’s job is to go through everything and clean up your RAM so that you don’t run out of it. If you have a lot of RAM allocated, it takes a long time to go through and remove stuff, which creates lag spikes.
The other things is that different versions of Java have different garbage collectors, some of which cause more lag than others. If you have Java 21, they added a new garbage collector called Generational ZGC, it uses a LOT of RAM but it significantly reduces the lag spikes from garbage collection. If you are able to allocate at least 12GB, I also suggest trying it by adding these JVM args to your game: -XX:+UseZGC -XX:+ZGenerational
This conversation is on Discord · Reply there