GlitchNode Blog

Devlogs, performance notes, and behind-the-scenes of running game servers.

2025-08-05

Optimizing Java Servers for Smooth Gameplay

JavaPerformance

We tuned resource allocation to keep TPS stable under typical loads. Our default profile balances memory and GC without being too opinionated.

Container limits

  • Memory: container Memory cap maps to server size (Small/Medium/Large)
  • CPU: CpuShares to prevent noisy neighbors, with headroom for spikes

JVM & server flags

  • Use the image’s sane defaults (Java 21 variants) and keep GC simple
  • Prefer vertical scaling (RAM) before horizontal split for tiny communities

When to scale

  • Scale up: sustained memory >80% or frequent GC pauses
  • Scale out: heavy plugins/modpacks, many concurrent redstone farms