Live data from Hacker News

Testing a 1,000 player Minecraft server with Folia

cubxity.dev

81–90 of 166 posts

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

#81
post #14

Earlier quoted context omitted.

EVE Online

I believe they shard each sector and their inability to sub-divide their hosting on a sector level has created their infamous timewarped battles?

Well, at the smallest level (if I recall correctly) it's a single solar system; they have a few beefy servers on stand-by, one is always in use for Jita, the main and most active trading hub, and others can be spun up and a whole solar system transferred over if it gets busy. And as someone else pointed out, you can organize a large fight in advance so they can transfer it over.

But there's the bottleneck, because they can only do the calculations of ship movement & actions on a single node. I'm sure it's been optimized to no end as well. IIRC it's written in Python, but that's not going to be the main performance bottleneck.

I have only the smallest of clues about distributed systems, the only way they could scale it up is to somehow make it so they can run a single solar system or cluster of ships on multiple servers, but for that you get the overhead of inter-server communication or you need an asynchronous, eventually-consistent game instead of something realtime.

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

#82
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?

In reality, big Minecraft servers like Hypixel that handle 100k+ players also shard. You jump between many different servers seamlessly using something called Bungeecord.

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

#83

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…

Minecraft Java used to allocate over 200MB/s per player when moving, and just 50MB/s when static. A lot of it stems back from Minecraft 1.8, where code was updated to take a BlockPos(float x, float y, float z) class instead of just (float x, float y, float z). Pretty much every single object in the game has to deal with its position. Millions of objects allocated per frame, only to be discarded later. Along with a lo…

IIRC the introduction of BlockPos post-dates Notch. The style of just passing three floats around was his original style.

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

#84

Earlier quoted context omitted.

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 av…

Tbf “a ~30 minute walk to get to another team (~4 minutes if you take the nether)” doesnt seem very seamless to me. That’s quite a commute!

Hah. On 2b2t, an "anarchy" server where any player can blow up any build and type whatever garbage into chat they want, players often opt to travel out tens of millions of blocks in an effort to make their builds extremely difficult to find. Can take many hours of nether travel to get to where you want to go.

And inevitably, people still find them, usually through advanced techniques -- hacks that tell you whether a chunk is newly generated or part of an existing 'chunk trail' can be used to hunt down players that have taken great effort to hide their location.

Anyways, a distance of 10240 is just how this particular test was set up. The regionizing is still useful in a much cozier world. As I understand the only way for it to be guaranteed that everyone is inside the same bubble (and therefore the ticking is all on a single thread) is for everyone to be in the same 768 block radius, or for there to be a line of players spaced this distance apart. It's rather atypical for a server to organically develop this way, since people really like to explore for hours before settling in the perfect spot. But some heavily planned/curated server are like this.

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

#86
post #53

Earlier quoted context omitted.

> 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…

Well yeah but that's a process that can run independently from player movement and (I guess?) can be a highly asynchronous and paralellised process. (note: armchair remark, I honestly haven't a clue)

> can be a highly asynchronous and paralellised process

It really can't, though. Parallelization is the enemy of consistent game mechanics, especially in a complex sandbox game like minecraft. There are tons of things that interact with each other in minecraft's world - if you just tick everything at arbitrary times, those interactions cease to be deterministic and might break entirely unless you write a ton of spaghetti code to deal with every edge case. Redstone in particular is the best example of a mechanic that heavily relies on the synchronous nature of the game logic loop.

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

#87
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...

UO Outlands (by far the most active current UO free shard) hovers around 2500-3000 characters online nightly (1500-1800 unique IPs).

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

#88
post #33

I'll just drop this factoid: Mineplex has won the Guinness World Records award on January 28, 2015 for having 34,434 concurrent players, the most on a Minecraft server at the time.

I'll just drop this factoid:

You "win" Guinness World Records by paying for them.

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

#89
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...

Shards in UO are called that way because of the lore (gem shattered into shards), and each shard is just a regional server completely isolated from other shards. So they are not very different from Minecraft or Planetside servers. Sharding in other games split the user base based on active load. This is not the case with UO.

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

#90
post #77

Earlier quoted context omitted.

Allocation is typically really cheap, maintaining pools for objects would likely have more overhead. And while collecting garbage takes resources too, it's heavily concurrently, especially in GCs like Shenandoah and ZGC. So instead of more overhead due to pooling on the thread that uses the objects, you have more overhead on a different thread during garbage collection. So while it makes sense to avoid unnecessary al…

Pooling would have been more overhead than allocation + deallocation? Do you have any relevant readings? No idea how to do it in java but a few pointers ought to be enough. You can also omit clearing the memory area between allocations for things that aren't security sensitive, if that is done in java, which I would assume.

Allocation + deallocation might have more overhead together. I'll try to rephrase: Requesting an object from a pool might have more overhead than allocating a fresh object, and deallocating the object doesn't happen on an application thread but on a GC thread (depending on the GC, obviously). Alexksey Shipilev has good resources how GCs in HotSpot typically allocate objects (https://shipilev.net/jvm/anatomy-quarks/4-tlab-allocation/).

There definitely are scenarios where pooling might make sense, but basically the low hanging fruits in that area in minecraft are already reaped.

Post reply on HN