For years, Minecraft anarchy servers have been plagued by a persistent problem: lag. The sheer scale of these worlds, combined with large player counts and complex player-made contraptions, often led to unplayable experiences. Now, with the introduction of a revolutionary software known as Folia, that problem might just become a thing of the past. This article explores how Folia changes the game for Anarchy servers and also mentions avas.cc, one of the first anarchy servers to adopt this technology.
The Problem With Performance
Minecraft servers traditionally operate on a single thread, known as the "main thread." This limitation means that everything on the server—from player movement and block interactions to entity AI and chunk generation—is processed sequentially. As a result, servers hosting many players, or with large, complex builds, often suffer from lag as they struggle to keep up with all the demands placed upon a single processing thread.
Folia's Solution
Folia's approach is radically different. It groups nearby loaded chunks into "independent regions," each with its own tick loop. These loops operate in parallel across a configurable thread pool. This means the server effectively has multiple "main threads" and can tick multiple regions simultaneously, distributing the workload and reducing lag. Here’s a breakdown:
- Parallel Processing: Regions with players are ticked at the regular Minecraft tickrate (20 TPS) concurrently on a threadpool.
- No Main Thread: Folia removes the traditional main thread bottleneck; each region effectively acts as its own isolated simulation.
- Scalability: The ability to tick multiple regions in parallel allows Folia to scale exceptionally well for servers with spread-out playerbases.
In simpler terms, it's like turning one long assembly line into multiple shorter ones all running at once, which reduces the load on any single assembly line.
Key Advantages of Folia
The implications of Folia for Minecraft anarchy servers are huge. Here's why:
- Reduced Lag: By processing tick loops in parallel, Folia dramatically reduces server lag, leading to a smoother, more responsive gameplay experience.
- Increased Scalability: Folia can handle larger player counts without significant performance degradation.
- Enhanced Performance: Complex contraptions and builds no longer pose the same threat to server performance, fostering greater creativity and freedom.
Configuration and Hardware
To fully harness the power of Folia, you’ll want a machine with at least 16 cores (not threads). Proper configuration is also essential, starting with pre-generating the world to reduce chunk system worker threads. The below thread allocation example will need further tuning - please use it as a rough guideline.
- Netty IO threads: 4 per 200-300 players
- Chunk system IO threads: 3 per 200-300 players
- Chunk system workers: 2 per 200-300 players, if pre-generated
- Tick Threads: The remaining cores after allocation (up to 80%), based on testing performed on a 330-player server.
Plugin Compatibility
One major downside of Folia is plugin compatibility. Because Folia eliminates the main thread and many plugin developers rely on the single thread for compatibility, every plugin that exists will need to be at least slightly modified in order to function with Folia. However, Folia is planning on implementing a system in which plugins can use new APIs that act similarly to the Bukkit Scheduler in order to schedule tasks to the appropriate threads. These changes will allow servers to have a better framework for using these more performance-focused changes.
Folia also has a special check system to prevent any plugins that are not designed to be used with a multithreaded region system. In order to use a plugin on Folia, the plugin's `plugin.yml` needs to state that it is Folia compatible with the `folia-supported: true` tag.
A Look at avas.cc
One server leading the charge in the Folia revolution is avas.cc. This server has not only integrated Folia, but has actively been testing it for the Minecraft Anarchy community. Because it is the first server of its kind to adopt Folia, the development team at avas.cc have been at the forefront of the push to make Minecraft Anarchy truly viable in modern versions of Minecraft. The results have been fantastic - the server has never felt smoother, even with 100 players online.
The Future is Now
Folia is not a sidegrade, but an evolution of Minecraft server technology. It is poised to change the way players experience anarchy servers. The ability to handle a large number of players, along with complex builds and contraptions without causing heavy lag means a server experience unlike any other. As more servers migrate to Folia, it is all but certain that Minecraft Anarchy will become better than ever.