Fix chunk generation lag / exploration lag (Chunky + JVM changes)

  • Thread starter Thread starter /u/a6a9_2
  • Start date Start date
U

/u/a6a9_2

Guest
Chunk lag destroying servers. People flying around on elytra into new areas and TPS would just tank to like 13 while the server tried generating terrain on the fly. More RAM didn't help, view distance tweaks didn't help, nothing worked.

Finally got it sorted with Chunky + some JVM changes. Here's what actually fixed it:

Chunky pregen: ran this overnight when everyone was offline:

/chunky world world

/chunky radius 3500

/chunky center 0 0

/chunky start

Took like 7 hours first time but now that whole area around spawn is pre-loaded. No more generation lag when people explore.

JVM switch to ZGC: was getting weird micro-stutters from G1GC. Changed my startup flags to:

-XX:+UseZGC -XX:+ZGenerational -Xms12G -Xmx12G

Actual results:

Before:
TPS dipping to 14ish when people spread out

After: steady 20 TPS even with everyone flying around

Couple gotchas: don't try pregen on HDD hosting, it'll take forever. Also grab ChunkyBorder so people don't fly way past what you generated.

a6a9 (Aneesh Sai Palatla)

submitted by /u/a6a9_2
[link] [comments]

Continue reading...
 
Back
Top