Magma LogoMagma
Guides

Optimization

Improve Magma server performance

Optimization

JVM Flags

Use Java 21+. Set -Xms and -Xmx to the same value.

4-8GB servers:

java -Xms4G -Xmx4G -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 magma-server.jar nogui

server.properties

view-distance=8
simulation-distance=6
network-compression-threshold=256

spigot.yml

world-settings:
  default:
    entity-activation-range:
      animals: 16
      monsters: 24
      misc: 8
    mob-spawn-range: 6
    merge-radius:
      item: 2.5
      exp: 3.0
    item-despawn-rate: 6000

bukkit.yml

settings:
  spawn-limits:
    monsters: 50
    animals: 10
    water-animals: 5
    ambient: 5
  ticks-per:
    animal-spawns: 400
    monster-spawns: 2
    autosave: 6000

Other Tips

  • Remove unused mods and plugins
  • Pre-generate your world with Chunky
  • Set a world border
  • Use Spark to profile and identify lag sources
  • Use an SSD for world storage
Edit on GitHub

On this page