3 ms·
>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
by rasz 3y ago
>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 https://wiki.eveuniversity.org/Time_dilation
- creatonez 3y agoAs 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.
- skrebbel 3y agoTbf “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!
- creatonez 3y agoHah. 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.
- AgentK20 3y agoKeep 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.
- creatonez 3y ago> 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. A small correction - Folia regions are not Minecraft regions. They don't necessarily align with the 512x512 region grid, and can take different shapes and sizes depending on what the regionizing algorithm is doing. The term "bubble" is used in some of the documentation and may be a more accurate description.
- AgentK20 3y agoOhhh, very interesting. I'll admit I only took a cursory glance at the code when it was first announced on the Paper discord since I'm not as much involved with MC anymore, but that's good to know. I'll need to dive in again one of these days.
- ocelotpotpie 3y agoCome back to the Discord and pepper away with questions!
- doctor_phil 3y agoThat scaling sounds quadratic and not exponential.
- deleted 3y ago[deleted]
- ocelotpotpie 3y ago(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.
- imtringued 3y agoThat is a completely different problem that is mostly bottlenecked by bandwidth and not CPU time. Every players data has to be sent to every other player. This requires a CDN like architecture to increase bandwidth.
- rasz 3y agoSure you need fast tick updates for dynamic models right in front of you, but something ~100 virtual meters away? can at least halve it, 500m maybe even 1/10 will suffice.