Live data from Hacker News

How we built an auto-scalable Minecraft server for 1000+ players

worldql.com

91–100 of 145 posts

Re: How we built an auto-scalable Minecraft server for 1000+ players

#91
post #74
post #20

Earlier quoted context omitted.

Is there a specific reason why Minecraft hasn’t been “adapted” from the original game to a robust design that could scale to larger worlds and player populations before your project ?

The development priorities of Minecraft are a little strange. They have had a lot of opportunities to increase extensibility and performance (see modding API, cubic chunks, etc) but were too slow about it or focused on other things. AFAIK the long-term vision is to move the game entirely to the C++ clients which are much more performant, but a lot of the core playerbase is still on Java for modding and platform compa…

> The development priorities of Minecraft are a little strange [...] focused on other things

Cynical to say that Microsoft are focused more on milking as much out of the brand and merchandising as possible rather than actually improving the core gameplay in meaningful ways.

"Can we have more performance?" "I can do you a glow squid?" "What about shaders and whatnot?" "Axolotl?"

Re: How we built an auto-scalable Minecraft server for 1000+ players

#92
post #67

Being able to serve 1000+ players in a spatial "MMO" game is like the holy grail of netcode programming... > Here's a demonstration showcasing 1000 cross-server players, this simulation is functionally identical to real player load. The server TPS never dips below 20 (perfect) and I'm running the whole thing on my laptop. If it can run on one laptop, why does it need horizontal server scaling? :P You don't really kno…

> Being able to serve 1000+ players in a spatial "MMO" game is like the holy grail of netcode programming...

What do you mean by holy grail? Is it not something that's already accomplished by several games/MMOs?

Unless "spatial MMO" means something specific here.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#93
post #12

Earlier quoted context omitted.

I rent a small Linode to run a minecraft server for my extended family. Sometimes it struggles to keep up with just a half dozen of us, and when I tried swapping from a spigot based system to a forge one so the kids could have mods it was basically unplayable. I can't imagine scaling out to thousands of users, this was some amazing work. While developing this did you come up with any best practice recommendations for…

> a small Linode [...] it struggles to keep up with just a half dozen of us I run my server on a 32GB Ryzen5 PC with the world on an SSD and it often struggles with just 2 players no matter what options I tweak. Keep dreaming of the day the Java parts get the same performence as the Bedrock parts (but I know it'll likely never happen.)

Something wierd about a vanilla minecraft server is that sometimes less RAM is better. If you are using a good enough cpu going from 4 gb allocated to 2 gb allocated massively increases performance for low numbers of users because garbage collection runs more efficiently. You can tune the garbage collection manually, but super counterintuitively this fixed most of my problems.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#94
post #85
post #31

Earlier quoted context omitted.

It might be too pricy, but if you go to about 25usd/month, you can get a dedicated server with an i7 from hetzner server auction. These cheap boxes don't have ecc ram etc - but should work well for things like this. https://www.hetzner.com/sb?country=us

The cheapest available right now was 140 euro. When do the 25 dollar server come out?

I can see few options for 23.53 EUR right there

Either way, it's auction page, may not always have the deals you're looking for in this price range

Re: How we built an auto-scalable Minecraft server for 1000+ players

#95
post #85
post #31

Earlier quoted context omitted.

It might be too pricy, but if you go to about 25usd/month, you can get a dedicated server with an i7 from hetzner server auction. These cheap boxes don't have ecc ram etc - but should work well for things like this. https://www.hetzner.com/sb?country=us

The cheapest available right now was 140 euro. When do the 25 dollar server come out?

If the cheapest is $25/month, I think it would just make sense to get a used school/office PC. I was able to pick up a used Haswell i5, 8GB of memory PC for $200, which you would probably get better performance out of, and break even at ~8 month mark. That being said, pandemic prices might shift those numbers.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#96

Earlier quoted context omitted.

If you're just using ECS to parallelize disjoint subsystems then no, it won't get you there. But if you're using it (as Veloren is, and as I hope more people do) in a more deliberate way, to further parallelize within a system, you can indeed scale quite well to large numbers of cores. I've done some theoretical bottleneck calculations and we will still have tons of work to do with 64 cores available, if the game is…

The original question was: > Is there a specific reason why Minecraft hasn’t been “adapted” from the original game to a robust design that could scale to larger worlds and player populations before your project ? The answer is because it's a lot of hard work. I am happy that a bunch of smart and talented people are working really hard to optimize Veloren. Good for you. I hope you help push the state of the art.

We have plenty of contributors who have never even programmed before, and certainly have no experience with parallel programming, and the bulk of our physics parallelization (easily the trickiest part to make concurrent) has been done by people who aren't professional programmers. And I don't think I can recall a single change (proposed or implemented) by any of these contributors that resulted in a significant reduction in parallelization opportunities, nor any that found the difficulty of contributing to have been increased by the fact that much of the game is parallelized--so this is not primarily a result of benevolent guardians gatekeeping unfriendly features, or anything like that. I can also count on one hand the number of bugs we've had due to race conditions caused by parallelizing things that were previously single-threaded. I think that modern tooling, languages, and libraries have gotten good enough that correct parallel programming is no longer nearly as hard as it's reputed to be.

Nor is scaling well on multicore the "point" of the game or even an explicit goal (though handling lots of players is)--taking advantage of multiple CPU cores is just one of many ways to improve performance, which we try to tackle on multiple fronts (including increased utilization of the GPU, explicit SIMD, smarter algorithms, allocation reduction, structure compression for improved cache locality and network utilization, etc. etc.). We haven't made any special effort to parallelize at the expense of single-threaded optimizations, and generally only do parallelization within a system, move things to the background, etc. where it is revealed as a bottleneck. And we've mostly done so by utilizing existing Rust libraries like crossbeam, specs, rayon, and wgpu, not rolling our own stuff. So again, there is nothing at all special about Veloren's design or focus here that makes it more amenable to parallelization than any other game would be, despite it being in a genre that is supposedly difficult to make scale.

And that's the thing I'm specifically trying to push back on--the idea that multicore scaling for games is only possible if you have some dedicated cabal of programming wizards who want to push the state of the art. We live in the age of libraries, and wizards are only needed deep in the guts of the implementations of those libraries (just as they always have been, and probably will be until the end of time). A game programmer does not need to understand how a lockfree work stealing queue is implemented (or even what it is!) in order to use "parallel for" to beat the snot out of a carefully optimized single-threaded version of the same task, and it's usually far easier to do the former than the latter.

I certainly understand why for a game like Minecraft, with a lot of legacy mechanics and mods that were never designed to be threadsafe, or a game engine like Unity, Unreal, or Roblox, that similarly have lots of plugins and customer code they would like to keep working, it would be very challenging to parallelize after the fact. And naturally, there are limits to what you can do on a single system, and your game design options become far more restricted once you're talking about 10k rather than 1k concurrent players. But for a brand new game without any legacy baggage, there's really no reason why it should scale poorly on multicore systems.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#97
post #21

Impressive work! There's a lot of potential here, but probably within a pretty limited market. Outside of 2b2t and maybe Hypixel, is there really anyone who wants 1000 players on the same world? Is the small market the only reason why a solution like this hasn't been created before, or are there bigger complications that aren't listed or haven't come up yet, or maybe the technology wasn't available? Surely someone li…

Tons and tons of server would love having 1000 people in 1 world. The reason that hub servers generally have multiple servers of the exact same same concept (factions, towny, pixelmon, etc) is in no small part because of limitation in lag due to population. Hell, even using this to support the same (roughly standard) 300 person limited server but not have to disable the more lag inducing problems is a plus.

Re: How we built an auto-scalable Minecraft server for 1000+ players

#98
post #31
post #12

Earlier quoted context omitted.

I rent a small Linode to run a minecraft server for my extended family. Sometimes it struggles to keep up with just a half dozen of us, and when I tried swapping from a spigot based system to a forge one so the kids could have mods it was basically unplayable. I can't imagine scaling out to thousands of users, this was some amazing work. While developing this did you come up with any best practice recommendations for…

It might be too pricy, but if you go to about 25usd/month, you can get a dedicated server with an i7 from hetzner server auction. These cheap boxes don't have ecc ram etc - but should work well for things like this. https://www.hetzner.com/sb?country=us

On the page, one option advertised is for €23.53/month with an Intel Core i7-4770, 2 TB HDD, and 32 GB RAM. What’s the catch? How is it possible to rent such hardware for so cheap?

Re: How we built an auto-scalable Minecraft server for 1000+ players

#99
post #30

Love the font on this site. Looks like you can find it here: https://brailleinstitute.org/freefont

Indeed, it sadly looks like it comes with some custom non-commercial license though [1], rather than something more standard like the SIL Open Font License [2]. Feels like an odd choice for a non-profit entity, but non-commercial clauses tend to creep in with good, idealistic intentions as it can be difficult for those new to open/free culture to realise how hairy and counterproductive they can be in the end.

[1]: https://www.brailleinstitute.org/wp-content/uploads/2020/11/...

[2]: https://en.wikipedia.org/wiki/SIL_Open_Font_License

Re: How we built an auto-scalable Minecraft server for 1000+ players

#100
post #99
post #30

Love the font on this site. Looks like you can find it here: https://brailleinstitute.org/freefont

Indeed, it sadly looks like it comes with some custom non-commercial license though [1], rather than something more standard like the SIL Open Font License [2]. Feels like an odd choice for a non-profit entity, but non-commercial clauses tend to creep in with good, idealistic intentions as it can be difficult for those new to open/free culture to realise how hairy and counterproductive they can be in the end. [1]: ht…

I don’t know if this is correct. I’m getting Atkinson Hyperlegible from Google Fonts and it seems to allow commercial use: https://github.com/googlefonts/atkinson-hyperlegible/blob/ma...
Post reply on HN