Live data from Hacker News

Testing a 1,000 player Minecraft server with Folia

cubxity.dev

51–60 of 166 posts

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

#51
While very impressive, something to note:

>The server was prepared with a 100k x 100k block pre-generated world. Our custom plugin distributed new players to the least-occupied region.

Minecraft chunk generation is notoriously though, and even a few players generating new chunks will bring the TPS down to an unplayable state very fast.

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

#52

I know this isn't the point of Folia's test, but: > During the period when 1,000 players were online, we reached a maximum of ~7.9GB/s heap allocation and our GC was hovering around 2-3GB/s when averaged over a minute. As someone who dealt with soft-realtime telephony stuff, this makes me want to scream in horror. It seems like the platform really hurts the performance here. In an average second with that many player…

The Minecraft Java version is notorious for thrashing memory. It allocates and discards objects at an incredible rate, even when the player isn't doing anything. The server has a GUI where you can watch the memory allocation with its distinctive sawtooth pattern.

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

#53

I know this isn't the point of Folia's test, but: > During the period when 1,000 players were online, we reached a maximum of ~7.9GB/s heap allocation and our GC was hovering around 2-3GB/s when averaged over a minute. As someone who dealt with soft-realtime telephony stuff, this makes me want to scream in horror. It seems like the platform really hurts the performance here. In an average second with that many player…

> In an average second with that many players, most (all?) of them will not do any action apart from changing their position

The world is not static though. Each player loads in a lot of living entities (monsters/animals/...) and block entities (furnaces, redstone, ...) that all need to update. There's some overlap of course, though in a game like Minecraft where there's a near infinite world to explore that overlap is smaller than you would think.

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

#54
post #51

While very impressive, something to note: >The server was prepared with a 100k x 100k block pre-generated world. Our custom plugin distributed new players to the least-occupied region. Minecraft chunk generation is notoriously though, and even a few players generating new chunks will bring the TPS down to an unplayable state very fast.

> Minecraft chunk generation is notoriously though, and even a few players generating new chunks will bring the TPS down to an unplayable state very fast.

And that's knowing a big part of the chunk generation already happens off the main thread.

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

#55
post #12

Interesting to see how they scale a multiplayer big world. Not many systems try to do this. Improbable, Minecraft, Second Life, and Roblox are the ones I know about. Almost everybody else shards. Any other examples of really big shared seamless multiplayer worlds?

Planetside 2 has hundreds of players on one map and can theoretically scale to thousands, though the networking gets very noticeably worse as you crowd more players into one place.

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

#56
post #51

While very impressive, something to note: >The server was prepared with a 100k x 100k block pre-generated world. Our custom plugin distributed new players to the least-occupied region. Minecraft chunk generation is notoriously though, and even a few players generating new chunks will bring the TPS down to an unplayable state very fast.

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

This is true to an extent, yes. Chunk generation can be real tough. That said, chunk generation has been re-written in Paper, so it's substantially faster than vanilla Minecraft.

When we did a large scale real player test on a much earlier build of Folia we had ~327 players at peak and we did not generate chunks because we specifically wanted to see how it ran. We didn't max out at ~327, we just didn't have more joins than that.

The project improved a bunch already so that number without chunk generation is very doable to beat if you didn't pre-gen any chunks.

Generally it's free performance to pre-gen your world though. Highly recommended for regular players.

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

#57

On a side note, I've been trying to figure out how to write Java mods for server-side vanilla Minecraft server, but there is basically no documentation at all. Is it safe to say that this isn't possible? Which flavor of minecraft server is the best documented to write mods for, Spigot?

There are three competing standards right now: - Fabric (and Quilt), which uses a mixins system, a really flexible modding API that can do client and server modification - Paper (and Purpur, Pufferfish, Folia), which is similar to the old-school Bukkit/Spigot ecosystem and supports an intuitive API for server-side plugins. If you're aiming for >30 concurrent players you really need the sorts of performance patching t…

> If you're aiming for >30 concurrent players you really need the sorts of performance patching that Paper comes with out of the box, or some custom-developed equivalent to it.

Fabric has quite a few performance mods that can achieve the same thing. I launched my new 1.20 map last week, and TPS was hanging on at 40 players without most of them even enabled.

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

#58
post #49

Earlier quoted context omitted.

There's a bit of a distinction in the Minecraft world between "mods" and "plugins". Even though to the outside perspective they're the same thing, the terms are used for two different communities/ecosystems, basically. "Plugins" are for bukkit-based compatible servers, like Spigot and Paper (and Folia, with some modifications). "Mods" are more for forge, sponge, etc servers. So you can kinda pick which direction you…

Are any of these choices restricted in their existing or likely future compatibility with where Microsoft is taking the game? My understanding is server admins will spend money on mods / plugins. Are there any server types more likely to garner paid license or plugins?

Microsoft has struct rules about the stuff you can sell for the server, and servers need to be EULA compliant. If they aren't they can get blacklisted or shutdown.

People do buy plugins but the vast majority of the plugins you'd want to use are free open source plugins. A lot of the paid/closed source stuff is kinda crappy or misleading anyway.

You can run a great server using free plugins and software. It might not be a money maker, but if your goal is to have people play and have fun and not buy stuff it's super easy and doable.

People do still donate to projects to support the authors who make the wheels spin.

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

#59
post #41

Earlier quoted context omitted.

Ultima Online, Star Wars Galaxies, and Planetside

Ultima Online is sharded. Biggest shard is ATL, with maybe 150 players.[1] Planetside 2 got up to 2000 or so, and may hold the record for a seamless land world MMO. [1] https://www.reddit.com/r/ultimaonline/comments/tr1r6j/uo_atl...

Planetside 2 has them on on huge map, but as soon as more player are nearer in one area the system got problems too. Lags, Jumps and wrong running clocks (different speeds an the map). They shard within a server. But PS2 Networking is really good and optimized, better as most current games, and Planetside 1 + 2 (and parts of the Engine) are 20 years old. Most new games are overwhelmed with 64 Players. PS2 can handle 200 on small areas without any problem.

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

#60

I know this isn't the point of Folia's test, but: > During the period when 1,000 players were online, we reached a maximum of ~7.9GB/s heap allocation and our GC was hovering around 2-3GB/s when averaged over a minute. As someone who dealt with soft-realtime telephony stuff, this makes me want to scream in horror. It seems like the platform really hurts the performance here. In an average second with that many player…

The Minecraft Java version is notorious for thrashing memory. It allocates and discards objects at an incredible rate, even when the player isn't doing anything. The server has a GUI where you can watch the memory allocation with its distinctive sawtooth pattern.

I'm excited for Project Valhalla to affect Minecraft performance; a lot of the temporary allocations are things like BlockPos objects (a Vec3i, basically) and VoxelShapes (a tree of axis aligned bounding boxes; so, like, an array of a struct that's six f64s) which seem ripe for becoming value objects that are inlined by HotSpot instead of living on the heap
Post reply on HN