This is a fully optimized Minecraft server configuration template for LeafMC with 10GB RAM allocation. Designed to work efficiently on any modern multi-core processor. Can be used as a base for various server types including Survival, Creative, Mini-games, and more.
- LeafMC - High-performance fork of Paper with advanced optimization features
- Based on: Paper MC, Purpur, and Gale optimizations
- CPU: Any modern multi-core processor (4+ cores recommended)
- RAM: 10GB allocated to server (adjustable based on player count)
- Java: JDK 21 (recommended for Virtual Thread support)
Purpose: Launch the Minecraft server on Windows with optimized JVM settings.
Features:
- Allocates 10G initial and maximum heap (
-Xms10G -Xmx10G) - Uses G1GC garbage collector with Aikar's recommended flags for low-latency performance
- Supports custom jar names via command-line argument
- Includes error checking (verifies jar file exists before starting)
- Displays startup information with color-coded errors
- Keeps terminal open on crash for debugging
- Includes DLeaf.enableFMA for LeafMC math optimizations, improving performance on compatible CPUs (If your CPU doesn't support it, worse performance may occur but to be real, who uses CPUs that don't support FMA in 2025?)
Usage:
# Run with default server.jar
start.bat
# Run with custom jar name
start.bat custom-server.jarPurpose: Launch the Minecraft server on Linux/macOS with optimized JVM settings.
Features:
- Allocates 10G initial and maximum heap (
-Xms10G -Xmx10G) - Uses G1GC garbage collector with Aikar's recommended flags for low-latency performance
- Supports custom jar names via command-line argument
- Includes error checking (verifies jar file exists before starting)
- Proper POSIX shell script with safety flags (
set -euo pipefail) - Works from any directory (changes to script directory automatically)
- Includes DLeaf.enableFMA for LeafMC math optimizations, improving performance on compatible CPUs (If your CPU doesn't support it, worse performance may occur but to be real, who uses CPUs that don't support FMA in 2025?)
Usage:
# Make the script executable (first time only)
chmod +x start.sh
# Run with default server.jar
./start.sh
# Run with custom jar name
./start.sh custom-server.jarserver.jar and placed in the same directory as the start scripts.
- Default jar name:
server.jar - Location: Root directory of this configuration (alongside
start.batandstart.sh) - Override: Pass a different jar name as the first argument to either script
Example directory structure:
MC-Optimized-preset/
├── start.bat
├── start.sh
├── server.jar ← Required here
├── server.properties
├── bukkit.yml
├── config/
└── plugins/
If your jar has a different name (e.g., leafmc-1.21.4.jar), either:
- Rename it to
server.jar, or - Pass it as an argument:
./start.sh leafmc-1.21.4.jarorstart.bat leafmc-1.21.4.jar
- allow-flight:
false→true(prevents false kicks on horses/scaffolding) - enforce-secure-profile:
true→false(required for FreedomChat and clients disabling chat signing) - network-compression-threshold:
256(optimal default) - simulation-distance:
10→8(reduces entity load) - view-distance:
10(balanced terrain view)
-
spawn-limits - Balanced for performance:
- monsters:
50(reduced from 70) - animals:
8(reduced from 10) - water-animals:
3(reduced from 5) - water-ambient:
10(reduced from 20) - axolotls:
3(reduced from 5) - ambient:
8(reduced from 15)
- monsters:
-
ticks-per:
- monster-spawns:
10(balanced spawn rate) - autosave:
6000(5-minute intervals)
- monster-spawns:
-
mob-spawn-range:
6(optimized from vanilla 8) -
entity-activation-range - Vanilla parity maintained:
- animals:
32(increased from default 16) - monsters:
32(increased from default 24) - villagers:
32(balanced performance) - misc:
16(default) - water:
16(default)
- animals:
-
merge-radius:
- exp:
4.0(vanilla merging enabled) - item:
3.5(vanilla merging enabled)
- exp:
-
chunk-loading-advanced:
- player-max-concurrent-chunk-generates:
0→8 - player-max-concurrent-chunk-loads:
0→8
- player-max-concurrent-chunk-generates:
-
chunk-loading-basic:
- player-max-chunk-generate-rate:
-1.0→10.0 - player-max-chunk-load-rate:
100.0→200.0 - player-max-chunk-send-rate:
75.0→200.0
- player-max-chunk-generate-rate:
-
chunk-system:
- io-threads:
-1→8 - worker-threads:
-1→12
- io-threads:
-
misc:
- chat-executor-core-size:
-1→8 - chat-executor-max-size:
-1→16 - compression-level:
default→6 - max-joins-per-tick:
5→3 - region-file-cache-size:
256→512
- chat-executor-core-size:
-
packet-limiter:
- max-packet-rate:
500.0→300.0
- max-packet-rate:
-
chunks:
- delay-chunk-unloads-by:
10s(default balanced)
- delay-chunk-unloads-by:
-
entities:
- experience-merge-max-value:
-1(vanilla XP merging preserved) - only-merge-items-horizontally:
false(vanilla behavior)
- experience-merge-max-value:
-
spawning:
- alt-item-despawn-rate:
enabledwith expanded item list:- cobblestone, netherrack, sand, dirt, grass, leaves, bamboo, kelp, sugar_cane, etc. (300 ticks)
- scaffolding (600 ticks)
- alt-item-despawn-rate:
-
environment:
- treasure-maps.villager-trade:
true(prevents lag from treasure map searches)
- treasure-maps.villager-trade:
-
tick-rates:
- All set to vanilla defaults (
-1or1) for maximum compatibility
- All set to vanilla defaults (
-
async improvements (enabled for high-performance):
- async-entity-tracker:
false→true(8 max threads) - async-target-finding:
false→true - async-playerdata-save:
false→true - async-pathfinding:
false→true(6 max threads) - async-locator:
false→true(4 threads) - async-chunk-send:
false→true
- async-entity-tracker:
-
performance optimizations (enabled):
- use-virtual-thread-for-profile-executor:
false→true - use-virtual-thread-for-async-scheduler:
false→true - create-snapshot-on-retrieving-blockstate:
true→false - throttle-mob-spawning:
false→true(20% spawn chance) - throttle-hopper-when-full:
false→true - optimized-powered-rails:
false→true - optimise-random-tick:
false→true - only-tick-items-in-hand:
false→true - cache-biome:
false→true(all modes enabled) - faster-random-generator:
false→true(Xoroshiro128PlusPlus) - use-direct-implementation:
false→true - cache-eye-fluid-status:
false→true - check-survival-before-growth:
false→true(cactus)
- use-virtual-thread-for-profile-executor:
-
network optimizations:
- OptimizeNonFlushPacketSending:
false→true - async-switch-state:
false→true - cache-profile-lookup:
false→true - secure-seed:
false→true
- OptimizeNonFlushPacketSending:
-
lagging-threshold:
19.0(default) -
villager lobotomize (major performance optimization):
- enabled:
true - check-interval:
100ticks - Reduces villager AI when stuck in 1x1 trading halls
- enabled:
-
villager search-radius:
- acquire-poi:
16(reduced from 48 - HUGE performance gain) - nearest-bed-sensor:
16(reduced from 48)
- acquire-poi:
-
zombie:
- aggressive-towards-villager-when-lagging:
false(prevents lag spikes)
- aggressive-towards-villager-when-lagging:
| Setting | Default | Optimized | Reason |
|---|---|---|---|
threads |
4 | 8 | Better multi-core utilization - Adjust based on your CPU core count |
| Setting | Default | Optimized | Impact |
|---|---|---|---|
tracePlacedBlock |
true | false | 🔥 More CPU efficient |
revealStopRaytracing |
false | true | 🔥 CPU savings & better user-experience |
fakeConfig.ores |
0 configs | 16 configs | 🔥 Fake ore generation |
| Setting | Default | Optimized | Impact |
|---|---|---|---|
tracePlacedBlock |
true | false | 🔥 More CPU efficient |
revealStopRaytracing |
false | true | 🔥 CPU savings & better user-experience |
fakeConfig.ores |
0 configs | 3 configs | 🔥 Fake ore generation |
| Setting | Default | Optimized | Impact |
|---|---|---|---|
entityTypes |
13 types | 48+ types | 🔥 Comprehensive ESP blocking |
rotatingRate |
3 | 1 | 🔥 Instant updates on rotation |
| Optimization | Description |
|---|---|
revealStopRaytracing: true |
Stops raytracing legitimately revealed ores |
tracePlacedBlock: false |
Disables intensive block placement tracking |
rotatingRate: 1 |
More efficient but responsive culling |
threads: 8 |
Better load distribution (no savings, better capacity) |
| Total Estimated | Combined CPU reduction vs defaults |
| Protection Type | Default | Optimized | Effectiveness |
|---|---|---|---|
| Ore X-Ray (Overworld) | ✅ Basic | ✅ + 16 Fake Ores | ⭐⭐⭐⭐⭐ |
| Ore X-Ray (Nether) | ✅ Basic | ✅ + 3 Fake Ores | ⭐⭐⭐⭐⭐ |
| Player ESP | ✅ Basic (13 entities) | ✅ 48+ Entities | ⭐⭐⭐⭐⭐ |
| Mob ESP | ✅ Limited | ✅ All Mobs + Variants | ⭐⭐⭐⭐⭐ |
| Chest ESP | ✅ 44 types | ✅ 43 Vanilla Types | ⭐⭐⭐⭐⭐ |
For compatibility with both anticheats we set "disable-pong-cancelling" to true in GrimAC config, as Vulcan relies on pong responses for some of its checks.
If you aren't using Vulcan, consider disabling this option for slightly better detection accuracy.
- RayTracedAntiXray - Ray-traced ore protection (8 threads allocated)
- Addon:
raytraced-entity-culling- Hides hidden entities - Addon:
raytraced-tile-culling- Hides hidden tile entities - Configuration Included: ✅
plugins/raytraced-antixray/andplugins/raytraced-entity-culling/
- Addon:
-
Lightning GrimAC - Free, open-source anticheat (recommended)
- Modern prediction-based anticheat with excellent accuracy
- Works perfectly with default configuration
- Compatible with other anticheats for layered protection
-
Vulcan AntiCheat - Premium anticheat (paid)
- Professional-grade cheat detection based on packet analysis
- Works alongside GrimAC for comprehensive protection
- Default config works well with this server configuration
Both together provide robust cheat detection with minimal false positives, cause Lighting GrimAC handles prediction checks while Vulcan focuses on packet anomalies, but remember, the best anticheat is a well-informed community and vigilant staff, just add this anticheat layer in servers where cheating is a real concern.
- FreedomChat - disables chat signing server-side and improves compatibility with clients that disable chat signing
- Out of the box FreedomChat rewrites outgoing messages and disables server-side reporting, making chat unreportable (works for 1.19+)
- Tradeoffs: Disabling chat signing prevents client-side reports and reduces reporting-related moderation tools from microsoft, but improves privacy (and microsoft isnt who should be reading your chat messages anyway, its your server admins job to moderate chat, not some big corporation)
- Spark - Server profiler and performance analyzer
- Configuration Included: ❌ (default config is sufficient)
Depends on your server hardware, player count and use case. Adjust settings as needed.
# Use Spark for real-time profiling
/spark profiler start
/spark profiler stop
/spark viewer- Backup your worlds before using this configuration
- Test with few players first to verify performance
- Monitor TPS using
/tpscommand (should stay 20 TPS) - Check RAM usage - aim for 60-80% of allocated heap
Varies based on player count, activity, and environment.
- Use SSD for world storage
- Limit view-distance to 8-10 per player
- Use Spark to identify lag sources
- Consider async-safe plugins only
Low TPS?
- Check Spark profiler for lag sources
- Reduce spawn limits further
- Increase entity-activation-range reduction
- Check for plugin conflicts
High RAM Usage?
- Reduce max-players
- Decrease chunk-loading rates
- Enable more aggressive chunk unloading
Crashed/Unstable?
- Revert async features one by one
- Use vanilla Leaf defaults and re-apply optimizations gradually
- LeafMC: Latest stable (1.21.4+)
- Paper Version: Latest compatible
- Purpur Version: Latest compatible
- Configuration Date: October 20, 2025
Optimizations based on:
✅ Vanilla Parity Maintained - No gameplay-breaking changes ✅ Performance Optimized - Balanced for modern multi-core processors ✅ Professional Setup - Based on paper-chan.moe, PurpurMC, and LeafMC official docs
Last Updated: October 23, 2025 Optimized For: Any modern CPU / 10GB RAM / LeafMC 1.21.4+