Concurrent Chunk Management Engine (Fabric)
A Fabric mod designed to improve the chunk performance of Minecraft.
Looking for NeoForge versions?
Benchmarks for 1.21.3 (Nov 24, 2024)
2t-80t | 1t-10t |
---|---|
So what is C2ME?
C^2M-Engine, or C2ME for short, is a Fabric mod designed to improve the performance of chunk generation, I/O, and loading. This is done by taking advantage of multiple CPU cores in parallel. For the best performance it is recommended to use C2ME with Lithium and ScalableLux.
What does C2ME stand for?
Concurrent chunk management engine, it's about making the game better threaded and more scalable in regard to world gen and chunk io performance.
Vanilla parity
C2ME does not sacrifice vanilla functionality or behavior, or alter the vanilla world generation in the name of raw speed by default. However, due to the non-determinism of vanilla world generation, worlds will vary significantly run-to-run even with the same seed. This is not a bug on our side.
While we carefully check that we do not modify any vanilla behavior, bugs are unavoidable after all. So, if you do encounter an issue where C2ME deviates from the intended vanilla behavior, don't hesitate to open an issue.
Mod and Datapack compatibility
World generation datapacks that can run on vanilla Minecraft are fully supported.
Custom world generators implemented in mods usually runs well, but may cause compatibility issues due to certain
design assumption used by mod authors being broken for further speedups of world generation.
As a world generation mod author, if you find your mod broken, don't hesitate to look for help in our discord server (linked below).
We are willing to help mod authors to embrace scalable world generation.
Undefined behavior sanitization
C2ME includes CheckedThreadLocalRandom
for world random (included in UWRAD) plus a few others.
These detections exist to prevent mods from screwing up Minecraft internals and causing undebuggable problems.
The detection should almost never produce false positives, and should be taken seriously and reported
to corresponding mod authors instead.
Usage notice
Backup your worlds and practice good game modding skills.
Support status for Minecraft versions
Only the latest Minecraft release and the latest Minecraft snapshot are fully supported. Older Minecraft releases are in long-term support and will receive critical bug fixes. Older Minecraft snapshots are not supported.
Support
Our issue tracker: link
Our discord server: link
More information
Check out the README.md
here: https://github.com/RelativityMC/C2ME-fabric
Footnotes
Footnotes for benchmarks
Benchmark setup
All benchmark done with dual-socket Intel(R) Xeon(R) Gold 5218R
limited to 2GHz max, on Debian 12.
openjdk version "23.0.1" 2024-10-15
OpenJDK Runtime Environment Temurin-23.0.1+11 (build 23.0.1+11)
OpenJDK 64-Bit Server VM Temurin-23.0.1+11 (build 23.0.1+11, mixed mode)
C2ME benchmark
Fabric mods used for C2ME benchmark:
c2me-fabric-mc1.21.3-0.3.0+rc.1.0.jar
Chunky-Fabric-1.4.24.jar
fabric-api-0.109.0+1.21.3.jar
lithium-fabric-0.14.2-snapshot+mc1.21.3-build.91.jar
ScalableLux-0.1.1+rc.1+fabric.dac63da-all.jar
spark-1.10.113-fabric.jar
vmp-fabric-mc1.21.3-0.2.0+beta.7.180-all.jar
Changed settings (c2me.toml
):
globalExecutorParallelism
set to thread count
Paper benchmark
Paper used: paper-1.21.3-60.jar
Paper plugin used: Chunky-Bukkit-1.4.28.jar
Changed settings (paper-global.yml
):
chunk-system.population-gen-parallelism = true
worker-pool.io-threads = 4
worker-pool.worker-threads
set to thread count
Vanilla benchmark
Fabric mods used for vanilla benchmark:
Chunky-Fabric-1.4.24.jar
fabric-api-0.109.0+1.21.3.jar
spark-1.10.113-fabric.jar
Extra JVM flags: -Dmax.bg.threads=
set to thread count
All benchmarks are run on tmpfs, on overworld, with world folder emptied before each JVM execution.
Seed: 114862964781274189
force-load-existing-chunks
is turned on in Chunky config.
2-80 threads benchmark
JVM flags: -Xms32G -Xmx32G -Xss4m -Xshare:off -XX:+DisableExplicitGC -XX:+UseNUMA -XX:+UseZGC -XX:-ZUncommit -XX:+UseLargePages -XX:+UseTransparentHugePages -XX:+UnlockExperimentalVMOptions -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -Dchunky.maxWorkingCount=768
Warmup phase: 1536 block radius with 0 0
as center (data discarded)
Measurement phase: 3072 block radius with 1000000 1000000
as center (148225 chunks in total)
Thread count | C2ME cps | Paper cps | Vanilla cps |
---|---|---|---|
2 | 27.05 | 21.00 | 16.46 |
4 | 53.61 | 41.12 | 22.91 |
6 | 80.69 | 61.48 | 27.42 |
8 | 108.75 | 81.67 | 29.57 |
10 | 137.37 | 96.56 | 30.31 |
12 | 159.90 | 107.41 | |
14 | 190.77 | 113.32 | |
16 | 219.11 | 113.93 | 33.04 |
18 | 244.80 | 113.67 | |
20 | 274.49 | 113.41 | |
22 | 299.14 | 112.89 | |
24 | 327.21 | 112.89 | |
26 | 353.34 | 113.41 | |
28 | 377.64 | 111.62 | |
30 | 410.60 | 112.46 | |
32 | 427.16 | 113.67 | |
34 | 453.75 | 111.87 | |
36 | 476.10 | 112.98 | |
38 | 499.07 | 111.78 | |
40 | 505.31 | 113.06 | |
42 | 511.12 | 112.21 | |
44 | 523.15 | 110.70 | |
46 | 523.76 | 110.95 | |
48 | 534.47 | 111.95 | |
50 | 537.70 | 111.28 | |
52 | 537.70 | 110.95 | |
54 | 548.98 | 111.20 | |
56 | 546.96 | 110.78 | |
58 | 550.34 | 112.04 | |
60 | 547.63 | 111.62 | |
62 | 542.95 | 110.62 | |
64 | 556.54 | 110.53 | |
66 | 555.15 | 109.72 | |
68 | 560.75 | 110.29 | |
70 | 557.94 | 110.04 | |
72 | 565.03 | 111.28 | |
74 | 568.64 | 110.62 | |
76 | 567.19 | 110.78 | |
78 | 557.94 | 110.29 | |
80 | 565.03 | 110.45 | 33.96 |
1-10 threads benchmark
JVM flags: -Xms16G -Xmx16G -Xss4m -Xshare:off -XX:+DisableExplicitGC -XX:+UseNUMA -XX:+UseZGC -XX:-ZUncommit -XX:+UseLargePages -XX:+UseTransparentHugePages -XX:+UnlockExperimentalVMOptions -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -Dchunky.maxWorkingCount=128
Warmup phase: 512 block radius with 0 0
as center (data discarded)
Measurement phase: 1024 block radius with 1000000 1000000
as center (16641 chunks in total)
Thread count | C2ME cps | Paper cps | Vanilla cps |
---|---|---|---|
1 | 11.96 | 9.07 | 9.96 |
2 | 23.41 | 18.43 | 16.08 |
3 | 35.71 | 27.46 | 20.47 |
4 | 48.10 | 36.49 | 23.14 |
5 | 60.51 | 45.59 | 25.33 |
6 | 71.12 | 54.38 | 26.80 |
7 | 84.90 | 62.80 | 28.30 |
8 | 96.19 | 69.34 | 29.19 |
9 | 107.36 | 75.30 | 29.66 |
10 | 120.59 | 77.40 | 30.42 |