Folia is an experimental fork of the PaperMC Minecraft server software that introduces regionized multithreading, allowing the server to use multiple CPU cores by dividing the world into independent regions. It aims to significantly improve performance for large servers by preventing localized lag from affecting the entire server.

Follow the Install Oracle Java 25 notes in the menu.

Our daughter loves to build redstone rail systems and other devices.  Redstone eats up CPU cycles. Java Minecraft puts most of the processing on 1 vCPU.  Folia solves this issue with lag from Redstone.    

Our Folia build is for 4 players. Just my wife, son, daughter and myself.

On the Hyper-V Server

Did some research on 8 vCPU setup.  Folia wants 16 vCPUs for ultimate build.

In config/paper-global.yml, adjust these settings
 
chunk-system:
  io-threads: 2      # Keeps world loading fast
  worker-threads: 4  # Reduced for 8 vCPUs to prevent contention
8 vCPU
22 GB RAM
disabled dynamic RAM.

 

It is using 22 GB total ram at the start for full server.

 

In Java 21, the Z Garbage Collector (ZGC) is updated to support Generational ZGC (JEP 439), which improves performance by separating objects into young and old generations. It offers sub-millisecond pauses for heaps from a few hundred MB to 16TB. To use it, use -XX:+UseZGC.

user_jvm_args.txt 

-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Addresses=true
-Xms16G
-Xmx16G
-XX:+UseZGC
-XX:+ParallelRefProcEnabled
-XX:MaxGCPauseMillis=200
-XX:+UnlockExperimentalVMOptions
-XX:+AlwaysPreTouch
-XX:InitiatingHeapOccupancyPercent=20
-XX:SurvivorRatio=32
-XX:+PerfDisableSharedMem
-XX:MaxTenuringThreshold=1
-Dio.netty.transport.noNative=true