Skip to content

WeThink25/optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›  Minecraft Server Optimization Guide

Trouble with lag, low TPS, or choppy gameplay? This guide will help you optimize your server using ready-to-use config files, JVM flags, optimized forks, and profiling tools.


๐Ÿ”น Step 1: Use an Optimized Server Fork

Fork Benefits
Purpur Compatible with Paper, extra performance and config options.
Pufferfish Lightweight fork with better mob handling, optimized ticking, and lower CPU usage.
Leaf Minimal overhead and fast tick performance.

Switching to one of these forks instantly improves server performance.


๐Ÿ”น Step 2: Identify the Problem

Use Spark Profiler to see what is causing lag:

/spark profiler start
/spark profiler stop
/spark profiler start --timeout 120
# it will stop spark after 2min
/spark profiler start --thread *
# it will give you all thread information 
  • Check TPS, memory usage, and plugin impact.
  • Identify entity overload or chunk generation lag.

๐Ÿ”น Step 3: Apply Pre-Optimized Config Files

The repo contains ready-to-use configs:

  • server.properties โ€“ optimized view distance & simulation distance
  • paper-global.yml โ€“ server-wide Paper optimizations
  • paper-world.yml โ€“ per-world overrides
  • spigot.yml โ€“ entity tracking and activation ranges
  • Other files โ€“ tuned for best TPS

How to use:

  1. Download the config files (ZIP or direct).
  2. Copy them into your server directory.
  3. Restart the server.

No need to clone the repo unless you want version control updates โ€” just download the files and replace your old configs.


๐Ÿ”น Step 4: Apply Aikarโ€™s JVM Flags

java -Xms{RAM}M -Xmx{RAM}M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -jar paper.jar --nogui
  • {RAM} = RAM in MB
  • Keep Xms = Xmx for stable memory usage

Reduces memory spikes and GC lag, stabilizing TPS.


๐Ÿ”น Step 5: Pre-Generate Chunks with Chunky

/chunky generate <radius> <center_x> <center_z>

Reduces lag caused by on-the-fly chunk generation.


๐Ÿ”น Step 6: Monitor & Adjust with Spark

  • Check plugin performance, entity overload, or chunk generation bottlenecks.
  • Adjust settings in paper-global.yml, paper-world.yml, or spigot.yml based on Spark reports.

๐Ÿ”น Step 7: Additional Tips

  • Keep server forks updated.
  • Avoid excessive farms, mobs, and redstone.
  • Backup server and configs before making changes.
  • Combine optimized configs, JVM flags, chunk pre-generation, and Spark monitoring for best results.

About

an optimization guide

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published