📈 GH Trending Explorer 🎲 Surprise me

← all repos

PaperMC / Folia

git clone https://github.com/PaperMC/Folia.git 🔥 on GitHub Trending today

Fork of Paper which adds regionised multithreading to the dedicated server.

—
stars, 24h
+135
stars, 7 days · #384
—
stars, 30 days
4.6k
★ total · +3% this week
639
forks · 85 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageShell
LicenseGPL-3.0
Created2023-02-20 (3y ago)
Last push6d ago
Watchers92
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-20 — #7 weekly in shell · +135 ★

GitHub topics

Links

README excerpt
===========
 Fork of Paper which adds regionised multithreading to the dedicated server. 
## Overview
Folia groups nearby loaded chunks to form an "independent region."
See the PaperMC documentation for exact details on how Folia
will group nearby chunks.
Each independent region has its own tick loop, which is ticked at the
regular Minecraft tickrate (20TPS). The tick loops are executed
on a thread pool in parallel. There is no main thread anymore, 
as each region effectively has its own "main thread" that executes
the entire tick loop.
For a server with many spread out players, Folia will create many
spread out regions and tick them all in parallel on a configurable sized
threadpool. Thus, Folia should scale well for servers like this.
Folia is also its own project, this will not be merged into Paper
for the foreseeable future. 
A more detailed but abstract overview: Project overview.
## FAQ
### What server types can benefit from Folia?
Server types that naturally spread players out, 
like skyblock or SMP, will benefit the most from Folia. The server
should have a sizeable player count, too.
### What hardware will Folia run best on?
Ideally, at least 16 _cores_ (not threads).
### How to best configure Folia?
First, it is recommended that the world is pre-generated so that the number
of chunk system worker threads required is reduced greatly.
The following is a _very rough_ estimation based off of the testing
done before Folia was released on the test server we ran that
had ~330 players peak. So, it is not exact and will require further tuning - 
just take it as a starting point.
The total number of cores on the machine available should be 
taken into account. Then, allocate threads for: 
- netty IO :~4 per 200-300 players
- chunk system io threads: ~3 per 200-300 players
- chunk system workers if pre-generated, ~2 per 200-300 players
- There is no best guess for chunk system workers if not pre-generated, as
 on the test server we ran we gave 16 threads but chunk generation was still
 slow at ~300 players.
- GC Settings: ???? But, GC settings _do_ allocate concurrent threads, and you need
 to know exactly how many. This is typically through the `-XX:ConcGCThreads=n` flag. Do not
 confuse this flag with `-XX:ParallelGCThreads=n`, as parallel GC threads only run when
 the application is paused by GC and as such should not be taken into account.
After all of that allocation, the remaining cores on the system until 80%
allocation (total threads allocated 
 papermc 
 https://repo.papermc.io/repository/maven-public/ 
 [code] xml
 dev.folia 
 folia-api 
 26.3.build,) 
 provided 
 ```
## License
The PATCHES-LICENSE file describes the license for api & server patches,
found in `./patches` and its subdirectories except when noted otherwise.
The fork is based off of PaperMC's fork example found [here.
As such, it contains modifications to it in this project, please see the repository for license information
of modified files.