Live data from Hacker News

Testing a 1,000 player Minecraft server with Folia

cubxity.dev

121–130 of 166 posts

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

#121

Earlier quoted context omitted.

Let's all remember that Notch didn't want any multiplayer and purposefully did everything he could to make it painful. Minecraft would be dead without the community devs and artists.

That can't be true, minecraft already had multiplayer in 2009. He didn't make it intentionally painful and never said anything like that. I remember there being huge issues with multiplayer but that was mostly because of bad architecture, not intentional.

Correct, I don't think he hesitated even a little bit on adding multiplayer support. The very first announcement of Minecraft's existence mentioned two planned game modes (fortress and team survival) that would require multiplayer and that all gamemodes would support it https://forums.tigsource.com/index.php?topic=6273.0

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

#122

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…

Has anyone already tried to use GraalVM with it? Cool would be trying to do a native compilation and compare the performance

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

#124

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…

> not a criticism of Minecraft by the way, it's better to be popular and inefficient than not exist

I'm glad you said that, it's a very wise statement. It's the origin story of so many working-but-inefficient projects. We just don't see the graveyard of perfect-but-never-finished projects on the other side of the scale.

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

#125

This is interesting. I am interested in multithreading and parallelism. So I have a journal entry to explore which is about deliberately desynchronizing and resynchronizing game loops for performance. * For the number of clients can use epoll or liburing. * Can multiplex multiple sockets per thread my epoll-server does this. * Can split out recv and send across threads so you can send while receiving and receive whil…

> deliberately desynchronizing and resynchronizing game loops for performance.

> latch on each thread for partial causality between game loops.

This sounds like a recipe for misery. You have to start thinking about ""light cones"" if causality propagates at finite speed. Do all observers in the game universe witness events in the same order? What if they don't?

You get a little bit of this with rollback netcode, on the level of a few frames, but in that case there's always an authoritative causality and the client's guess is subordinate to it.

It also sounds like fertile ground for exploits, both of the duplicating-object type and the glitch-through-geometry type.

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

#126

Earlier quoted context omitted.

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.

Notch was well aware of the issues around allocating a lot of small objects in Java. He used to write 4k games with a byte code assembler. Implying technical knowledge of the platform was not the problem.

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

#127

Cool stuff. The possibilities of Minecraft if some optimisation work was done would be amazing. It's demotivating just how rotten the internals of Minecraft are. Bedrock edition has really nice performance but nobody wants to play it.

Plenty play bedrock. It's just.... a very sanitized and corporate experience. And for Java edition players just different enough in mechanics / ux / feel to annoy them. Very much pushes you to stick to official servers or small friend groups, and is quite aggressive on its monetization.

Bedrock is also much harder to mod, being written in C++, and mods are a big part of what people like about Minecraft. They have an add-on system but that's just fancy JSON config files so you can only do things like adding a new block, not complete reworks of the internal code to improve performance or anything like that which is totally possible on Java Edition

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

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

"generating new chunks"

That's not happeneing, it says "pre-generated world"

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

#129

Cool stuff. The possibilities of Minecraft if some optimisation work was done would be amazing. It's demotivating just how rotten the internals of Minecraft are. Bedrock edition has really nice performance but nobody wants to play it.

Bedrock gives me an uncanny valley feeling… it’s Minecraft, sure, but everything is just slightly off, and it makes my brain really not like it

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

#130

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…

Well, Java isn't really used for perf critical workloads to be fair.

I'd rephrase that as "Java usually isn't the first choice for perf critical workloads". It's still a very performant language if used correctly (outperforming C in some benchmarks where the JIT can shine), and used for lots of performance critical stuff.
Post reply on HN