Performance Tuning
Optimize LilChunks to achieve the best balance between generation speed and server performance.
LilChunks is designed to be highly performant, but proper configuration is essential for optimal results:
CPU Usage Multi-threaded generation with configurable thread count
Memory Management Smart memory usage with optional limits
Server Impact Minimal TPS impact with async processing
Monitor these metrics during chunk generation:
Target : 20 TPS
Acceptable : 18+ TPS
Critical : Below 15 TPS
# Check TPS
/tps
# Typical output during generation
TPS: 19.8, 19.5, 19.2 (1m, 5m, 15m avg )
If TPS drops below 15, reduce generation speed immediately.
Monitor : Heap memory usage
Warning : Above 80% usage
Critical : Above 90% usage
# Check memory
/memory
# Or use system commands
free -h
htop
Measurement : Chunks per second
Typical Range : 5-50 chunks/second
Depends On : Server specs and configuration
# Check generation status
/lc status
# Shows: Speed: 12 chunks/second
Configuration Optimization
Choose a profile based on your server specifications:
High-End Server Mid-Range Server Budget Server Shared Hosting Specs : 8+ cores, 16+ GB RAM, NVMe SSD
chunk-generation :
chunks-per-tick : 8
use-async : true
generate-structures : true
generate-caves : true
generate-features : true
performance :
max-memory-usage : 0
use-parallel : true
thread-count : 0 # Auto-detect
logging :
progress-interval : 3
Expected Performance : 30-50 chunks/second
Specs : 8+ cores, 16+ GB RAM, NVMe SSD
chunk-generation :
chunks-per-tick : 8
use-async : true
generate-structures : true
generate-caves : true
generate-features : true
performance :
max-memory-usage : 0
use-parallel : true
thread-count : 0 # Auto-detect
logging :
progress-interval : 3
Expected Performance : 30-50 chunks/second
Specs : 4-6 cores, 8-12 GB RAM, SSD
chunk-generation :
chunks-per-tick : 4
use-async : true
generate-structures : true
generate-caves : true
generate-features : true
performance :
max-memory-usage : 2048
use-parallel : true
thread-count : 4
logging :
progress-interval : 5
Expected Performance : 15-25 chunks/second
Specs : 2-4 cores, 4-6 GB RAM, HDD/SSD
chunk-generation :
chunks-per-tick : 2
use-async : true
generate-structures : true
generate-caves : true
generate-features : true
performance :
max-memory-usage : 1024
use-parallel : false
thread-count : 2
logging :
progress-interval : 10
Expected Performance : 5-12 chunks/second
Specs : Limited resources, shared CPU
chunk-generation :
chunks-per-tick : 1
use-async : true
generate-structures : false
generate-caves : false
generate-features : false
performance :
max-memory-usage : 512
use-parallel : false
thread-count : 1
logging :
progress-interval : 15
Expected Performance : 2-8 chunks/second
Fine-Tuning Parameters
Impact : Direct effect on generation speed and server load
Tuning Guide :
Start with default (4)
Monitor TPS during generation
Increase if TPS stays above 18
Decrease if TPS drops below 16
# Conservative (minimal lag)
chunks-per-tick : 1-2
# Balanced (recommended)
chunks-per-tick : 3-5
# Aggressive (high-end servers)
chunks-per-tick : 6-12
Impact : CPU utilization and parallel processing
Recommendations :
0
: Auto-detect (CPU cores - 1)
1
: Single-threaded (lowest impact)
2-4
: Good for most servers
6+
: High-end servers only
# Let LilChunks decide (recommended)
thread-count : 0
# Manual control
thread-count : 4 # For 6+ core servers
thread-count : 2 # For 4 core servers
thread-count : 1 # For 2 core servers
Impact : Memory consumption and garbage collection
Guidelines :
0
: No limit (high-end servers)
1024-2048
: Most servers
512-1024
: Budget servers
256-512
: Shared hosting
# No memory limit (if you have plenty)
max-memory-usage : 0
# Conservative limit
max-memory-usage : 1024 # 1GB
# Strict limit
max-memory-usage : 512 # 512MB
Real-Time Optimization
Dynamic Adjustment
Monitor and adjust settings during generation:
Start Generation
Begin with conservative settings:
Monitor Performance
Check TPS and memory every 30 seconds:
Adjust if Needed
If performance is good, increase speed:
# Edit config.yml
chunks-per-tick : 6 # Increase from 4
Continue Monitoring
Keep watching performance and adjust as needed.
Server-Specific Optimizations
Paper Server
Paper provides additional optimizations:
# paper-world-defaults.yml
chunks :
auto-save-interval : 6000 # Increase from default
delay-chunk-unloads-by : 10s
entities :
spawning :
per-player-mob-spawns : true
misc :
use-faster-eigencraft-redstone : true
Spigot Server
Spigot configuration tweaks:
# spigot.yml
world-settings :
default :
mob-spawn-range : 6 # Reduce from 8
entity-activation-range :
animals : 16
monsters : 24
raiders : 48
misc : 8
JVM Optimization
Optimize Java Virtual Machine settings:
# Recommended JVM flags for chunk generation
java -Xms4G -Xmx8G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
-XX:+AlwaysPreTouch \
-XX:G1NewSizePercent=30 \
-XX:G1MaxNewSizePercent=40 \
-XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 \
-XX:G1HeapWastePercent=5 \
-XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 \
-XX:G1MixedGCLiveThresholdPercent=90 \
-XX:G1RSetUpdatingPauseTimePercent=5 \
-XX:SurvivorRatio=32 \
-XX:+PerfDisableSharedMem \
-XX:MaxTenuringThreshold=1 \
-jar server.jar nogui
Built-in Monitoring
Use LilChunks’ built-in monitoring:
# Check generation status
/lc status
# Enable detailed logging temporarily
# Edit config.yml:
debug: true
logging:
detailed-logs: true
# Reload and monitor logs
/lc reload
External Monitoring
Server Plugins System Tools Java Profiling # Install monitoring plugins
- LagMonitor
- Spark
- ServerUtils
- TPS Monitor
# Use commands
/spark profiler start
/lagmonitor
/tps
# Install monitoring plugins
- LagMonitor
- Spark
- ServerUtils
- TPS Monitor
# Use commands
/spark profiler start
/lagmonitor
/tps
# Linux monitoring
htop # CPU and memory usage
iotop # Disk I/O
nethogs # Network usage
# Windows monitoring
Task Manager
Resource Monitor
Performance Monitor
# JVM monitoring
jstat -gc < pi d > # Garbage collection
jmap -histo < pi d > # Memory histogram
jstack < pi d > # Thread dump
# Or use VisualVM, JProfiler
Low TPS During Generation
Symptoms : TPS drops below 15 during chunk generation
Solutions :
Reduce chunks-per-tick
to 1-2
Disable parallel processing
Set memory limits
Reduce thread count
Disable structure/feature generation
chunk-generation :
chunks-per-tick : 1
generate-structures : false
generate-features : false
performance :
use-parallel : false
thread-count : 1
Symptoms : Memory usage above 80%, frequent GC pauses
Solutions :
Set strict memory limits
Reduce generation speed
Increase heap size
Optimize JVM flags
performance :
max-memory-usage : 1024 # 1GB limit
chunk-generation :
chunks-per-tick : 2 # Reduce speed
Symptoms : Very slow chunk generation (< 5 chunks/second)
Solutions :
Check disk I/O performance
Verify async is enabled
Increase thread count
Check for plugin conflicts
chunk-generation :
use-async : true
chunks-per-tick : 4
performance :
use-parallel : true
thread-count : 0 # Auto-detect
Symptoms : Server becomes unresponsive during generation
Solutions :
Stop generation immediately
Use minimal settings
Check for deadlocks
Review server logs
# Emergency stop
/lc stop
# Use minimal settings
chunks-per-tick: 1
use-parallel: false
thread-count: 1
Start Conservative Begin with lower settings and gradually increase based on performance monitoring.
Monitor Continuously Keep an eye on TPS, memory, and generation speed throughout the process.
Off-Peak Generation Run large pregeneration tasks during low-activity periods.
Backup Before Large Tasks Always backup your world before running extensive pregeneration.
Test Configuration Test new configurations on a development server first.
Document Settings Keep notes on what settings work best for your server setup.
Based on server specifications:
Server Type CPU Cores RAM Storage Expected Speed High-End Dedicated 8+ 16+ GB NVMe SSD 30-50 chunks/s Mid-Range VPS 4-6 8-12 GB SSD 15-25 chunks/s Budget VPS 2-4 4-6 GB SSD/HDD 5-12 chunks/s Shared Hosting 1-2 2-4 GB HDD 2-8 chunks/s
Optimization Results
Example of optimization impact:
Before Optimization After Optimization Configuration:
- chunks-per-tick: 4 (default)
- use-parallel: true
- thread-count: 0
- No memory limit
Results:
- TPS: 12-15 (poor)
- Memory: 90% usage
- Speed: 3 chunks/second
Configuration:
- chunks-per-tick: 4 (default)
- use-parallel: true
- thread-count: 0
- No memory limit
Results:
- TPS: 12-15 (poor)
- Memory: 90% usage
- Speed: 3 chunks/second
Configuration:
- chunks-per-tick: 2 (reduced)
- use-parallel: false
- thread-count: 2
- max-memory-usage: 1024
Results:
- TPS: 18-19 (good)
- Memory: 65% usage
- Speed: 8 chunks/second
Next Steps
Responses are generated using AI and may contain mistakes.