Introduction
Folia emerges as a promising fork of Paper, boasting an innovative implementation of regionalized multithreading on the server. Traditional Minecraft servers have always faced limitations when it came to player capacity, often struggling to support more than a few hundred players at a time. This is because Minecraft servers primarily rely on a single thread to handle all game logic and player interactions.
Myself, Spottedleaf, and Michael conducted this test to evaluate and analyze Folia’s performance and stability under various conditions. We would like to thank Tubbo for streaming this test event.
Our Test
We wanted to conduct a test with Folia and see how it can perform on “regular” hardware and configurations. The previous public test ran on absurdly powerful hardware, which would not be realistic in many of the use cases. However, it’s important to note that this test only provides a glimpse into the potential of Folia and its regionalized multithreading capabilities.
The purpose of this test was to gather as much data as possible, while testing different game configurations and seeing how they performed.
Configuration
Hardware
Neofetch on our test machine.
Our test was conducted on Hetzner’s AX102 with the following configuration:
- CPU: AMD Ryzen 9 7950X3D
- RAM: 128GB DDR5
- Storage: 2 x 1.92 TB NVMe SSD in RAID 1
- Networking: 10Gbps NIC and uplink
Software
- Distribution: Debian Bookworm (12)
- Kernel:
6.1.0-9-amd64
- Java:
21-testing
$ uname -a Linux test-fsn1-game01 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux $ java -version openjdk version "21-testing" 2023-09-19 OpenJDK Runtime Environment (build 21-testing-builds.shipilev.net-openjdk-jdk-shenandoah-b110-20230615) OpenJDK 64-Bit Server VM (build 21-testing-builds.shipilev.net-openjdk-jdk-shenandoah-b110-20230615, mixed mode, sharing)
Minecraft
Our Minecraft server was running Minecraft 1.20.1 on Folia build 09d8e7d
(Oops). The server ran with a 100 GiB heap allocated, and Shenandoah GC was used as the garbage collector. Furthermore, Spottedleaf and Michael decided that we should try generational Shenandoah GC in OpenJDK 21.
Our conversation about Java 21.
Paper Configuration
config/paper-global.yml:
chunk-loading-basic: player-max-chunk-generate-rate: 40.0 player-max-chunk-load-rate: 40.0 player-max-chunk-send-rate: 40.0 chunk-system: io-threads: 2 worker-threads: 1 misc: region-file-cache-size: 512 proxies: proxy-protocol: true thread-regions: threads: 6
config/paper-world-defaults.yml:
environment: treasure-maps: enabled: false
Spigot Configuration
settings: netty-threads: 6
Bukkit Configuration
spawn-limits: monsters: 9 animals: 7 water-animals: 4 water-ambient: 7 water-underground-creature: 3 axolotls: 3 ambient: 4 ticks-per: monster-spawns: 30 water-spawns: 30 water-ambient-spawns: 30 water-underground-creature-spawns: 30 axolotl-spawns: 30 ambient-spawns: 30
Minecraft Configuration
allow-nether=false hide-online-players=true max-players=1001 network-compression-threshold=-1 spawn-protection=0 simulation-distance=5 view-distance=8
JVM Flags
-Xms100G -Xmx100G -XX:+AlwaysPreTouch -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+UseLargePages -XX:LargePageSizeInBytes=2M -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -XX:-ShenandoahPacing -XX:+ParallelRefProcEnabled -XX:ShenandoahGCHeuristics=adaptive -XX:ShenandoahInitFreeThreshold=55 -XX:ShenandoahGarbageThreshold=30 -XX:ShenandoahMinFreeThreshold=20 -XX:ShenandoahAllocSpikeFactor=10 -XX:ParallelGCThreads=10 -XX:ConcGCThreads=3 -Xlog:gc*:logs/gc.log:time,uptime:filecount=15,filesize=1M -Dchunky.maxWorkingCount=600
JMX flags were stripped.
Initial Thread Allocations
- GC: 3 concurrent
- Chunk System IO: 2
- Chunk System Worker: 1
- Netty: 6
- Region Threads: 6
Total: 18
Tools
- UnifiedMetrics: Plugin used to export Minecraft server metrics.
- Chunky: Plugin used to pre-generate chunks.
- node_exporter: Used to export machine metrics.
- VictoriaMetrics: Used to scrape and store metrics data (Prometheus compatible).
- Grafana: Observability platform used t