← /blog
6 minminecraft / performance / java

Shaving ticks off a Paper server

Everyone's first instinct when a server lags is to drop the view distance. It works, sort of, and it also makes the world feel small. I wanted the other fix: find what's actually eating the tick.

The honest answer was entity ticking. Roughly 60% of our tick budget went to mobs nobody was near. Chunk-local activation ranges plus a custom sleep state for idle farm animals cut that in half on the first night.

The second win came from async chunk IO. Paper already does most of this, but our backup job was fsyncing on the main thread every ten minutes — a 300ms spike that players read as 'the server froze again'.

Lesson I keep relearning: profile before you tune. A flame graph beats a forum thread every single time.