Live data from Hacker News

Testing a 1,000 player Minecraft server with Folia

cubxity.dev

1–10 of 166 posts

Re: Testing a 1,000 player Minecraft server with Folia

#2
Always fun to continue to see innovation within the Minecraft Java space.

At Hypixel we ran (and I believe they still do run) a custom fork of Spigot from 2014-ish, with features from each sequential update to Minecraft being added to our fork via our Spigot fork. This let us diverge greatly and customize the Minecraft protocol to our own needs, saving hugely on internal bandwidth and letting us optimize crap out of the L7 "BungeeCord" reverse-proxy we used.

Re: Testing a 1,000 player Minecraft server with Folia

#4
>Players were spread into 49 different teams across the map. Each team consisted of around 20 players.

How is that different from sharding into mini 20 player servers? I was hoping for 1000 players all in visual range :)

Eve Online record is >6000 players all in visual range, but they cheat by lowering server tick from 1Hz down to 0.1Hz https://wiki.eveuniversity.org/Time_dilation

Re: Testing a 1,000 player Minecraft server with Folia

#5
Has anyone made a comparison of Minecraft server performance on ZGC vs Shenandoah vs G1GC on a recent JDK version? I'm curious whether the amazing GC pause numbers hyped by the latest versions of ZGC hold up (max pause times of 500 microseconds and averages of 50 microseconds).

Also what's going on with the generational Shenandoah GC spikes in that graph? There's some pretty crazy spikes that completely dominate the pause numbers and make it pretty hard to read the graph. It looks like GC pauses kept increasing up until the server crashed?

Re: Testing a 1,000 player Minecraft server with Folia

#6
post #4

>Players were spread into 49 different teams across the map. Each team consisted of around 20 players. How is that different from sharding into mini 20 player servers? I was hoping for 1000 players all in visual range :) Eve Online record is >6000 players all in visual range, but they cheat by lowering server tick from 1Hz down to 0.1Hz https://wiki.eveuniversity.org/Time_dilation

As I understand, Folia can't help you if all your players are bunched together, but unlike having separate servers connected by Velocity or Bungee, it is a seamless experience -- everyone is in the same world and can visit anyone else without having to use commands, go through portals, or even wait for a loading screen. The "bubbles" that make up the world merge and split seamlessly, with special attention paid to avoid breaking vanilla game mechanics.

[Speculation, I don't have the data and wasn't involved in the test] The test placed each 'team' 10240 blocks apart, which is close enough for a ~30 minute walk to get to another team (~4 minutes if you take the nether), so I assume a lot of bubble merging/splitting happened. It's also far enough away that, if the regionizing logic allows for it, you're split off onto another thread relatively early into your journey to visit another 'team' spawnpoint. This is a relatively realistic scenario for an SMP, where towns are usually 2,000 to 20,000 blocks apart.

Re: Testing a 1,000 player Minecraft server with Folia

#7

Has anyone made a comparison of Minecraft server performance on ZGC vs Shenandoah vs G1GC on a recent JDK version? I'm curious whether the amazing GC pause numbers hyped by the latest versions of ZGC hold up (max pause times of 500 micro seconds and averages of 50 microseconds). Also what's going on with the generational Shenandoah GC spikes in that graph? There's some pretty crazy spikes that completely dominate the…

I can't attest to how valid these benchmarks are, but this explores the topic and is referenced a lot in the community - https://github.com/brucethemoose/Minecraft-Performance-Flags...

Re: Testing a 1,000 player Minecraft server with Folia

#8
post #4

>Players were spread into 49 different teams across the map. Each team consisted of around 20 players. How is that different from sharding into mini 20 player servers? I was hoping for 1000 players all in visual range :) Eve Online record is >6000 players all in visual range, but they cheat by lowering server tick from 1Hz down to 0.1Hz https://wiki.eveuniversity.org/Time_dilation

Keep in mind that the entities-in-viewing-range scales quadratically with players. 10 players in view distance is (at 20 ticks per second) 180 packets per second *per player*, or ~2k pps on the server. 100 players, ~200k pps. 1000 players, ~20m pps. All on a single Java thread, hence why Minecraft typically performs better on high clock-speed low(er) core count CPUs. Folia splits the load for the world into multiple threads, but only on a per-region basis, with each 512x512 being (potentially) on a different thread.

EDIT: Correction, as doctor_phil points out that's a quadratic scale not an exponential scale. Derp.

Re: Testing a 1,000 player Minecraft server with Folia

#9
post #4

>Players were spread into 49 different teams across the map. Each team consisted of around 20 players. How is that different from sharding into mini 20 player servers? I was hoping for 1000 players all in visual range :) Eve Online record is >6000 players all in visual range, but they cheat by lowering server tick from 1Hz down to 0.1Hz https://wiki.eveuniversity.org/Time_dilation

(Disclaimer: I'm on the Paper team, and Paper is the org under which Folia sits)

AgentK20 explained the technical bits along with the other reply to you, but basically the "actually all in one world" is the big part. For sharding you're handing players off to different instances. With Folia someone can just walk from one person to another without any issue or lag.

Folia dynamically groups people into regions depending on their distance. So it was designed to have people spread out to be able to support many regions across many threads. You can put 1000 people in one spot, it just gets very unhappy and you're now not really taking advantage of the whole point of Folia.

It's not a solution for every server or person but it's definitely cool because it's another tool in the Minecraft tool box. And the API is very similar to Paper, whereas the sharded options start to get kinda tricky quickly.

Re: Testing a 1,000 player Minecraft server with Folia

#10
Worth mentioning that this requires mods which break many in-game devices. The official in-game behavior was not able to be scaled.

That's an interesting and legitimate strategy to the scaling problem, but good to know the downsides with the upsides when trying to take lessons from this.

Post reply on HN