Skip to content
Current coupon:10% offUse it in your order

Minecraft server performance: lag, flags, view distance, Chunky and spark

How to find out what slows your server down and how to fix it: TPS and MSPT, startup flags and memory, view distance, Paper settings, pre-generating the world with Chunky and profiling with spark.

  • advanced
  • ~40 min
  • Updated 1 Oct 2026

A server that “lags” usually isn't short on hardware. More often there's one specific cause: a simulation distance that's too large, new terrain being generated, an overcrowded farm or a badly written plugin. We'll show how to measure lag, find its cause and fix it – from quick tweaks to Paper settings and profiling.

What you'll need

  • A Minecraft server at StormHost (we recommend Paper or Purpur; parts of this guide also apply to Fabric and NeoForge)
  • Access to the Console, Server properties, Startup and Files tabs
  • A server backup before you change the configuration (guide)
  • About 40 minutes

How to tell what's lagging#

A Minecraft server runs the game in ticks. It should get through 20 of them per second, which gives it 50 milliseconds per tick. Two numbers you need to know:

ValueWhat it meansGoodProblem
TPS (ticks per second)How many ticks the server actually manages per second.20Below 19 players notice the slowdown; below 15 the game is unpleasant.
MSPT (milliseconds per tick)How many milliseconds one tick takes.Under 50 ms, ideally under 35 msAbove 50 ms the server can't keep up and TPS drops.

MSPT is the more precise indicator: a server with an MSPT of 45 ms still has 20 TPS, but no headroom at all. Once MSPT goes over 50 ms, TPS starts to drop.

You can check the values in the Console (type commands without a slash):

text
tps
mspt
spark tps
  • tps – average TPS over the last 1, 5 and 15 minutes (Paper, Purpur).
  • mspt – average, shortest and longest tick time (Paper, Purpur).
  • spark tps – TPS, MSPT (minimum, median, 95th percentile, maximum) and CPU usage. Works anywhere spark is installed (Paper has it built in).

When the server can't keep up over a longer period, the console shows:

Outputtext
Can't keep up! Is the server overloaded? Running 2500ms or 50 ticks behind

The server is saying it's 2.5 seconds (50 ticks) behind and will skip those ticks. A single message at startup or while generating terrain is fine. If it repeats every few minutes, keep going with this guide.

Server lag or something else?#

What the player seesCauseWhere to look
Blocks come back after being broken, mobs freeze, all players have the same problemServer lag (low TPS)This guide
Low FPS, choppy picture, but other players are fineThe player's computer performanceIn-game graphics settings, client-side mods
The player “rubber-bands” back, high ping only for themThe player's connectionThe player's ping with spark ping --player <NICK>
The server is fine, but new areas load slowlyTerrain generationPre-generating with Chunky

Quick wins#

Sorted from the biggest effect to the smallest. You can do most of them in under ten minutes.

OrderStepWhy it helpsWhere
1Use Paper or Purpur instead of VanillaPaper contains hundreds of optimizations and bug fixes that Vanilla doesn't have.The Software tab, see Server types
2Pre-generate the world and set its borderGenerating new terrain is the most demanding thing a server does.Chunky
3Lower simulation-distance to 6–⁠8 and view-distance to 8Fewer chunks per player = less work in every tick.View and simulation distance
4Find the cause with a profilerShows the specific plugin, farm or entity.spark
5Limit entities and farmsHundreds of animals in one pen or an overcrowded farm will kill TPS.Paper settings
6Keep the default startup flagsThe default preset is tuned to your memory size.Startup flags
7Update the server, plugins and modsNew versions often fix memory leaks and slow code.The Software and Plugins tabs

“Lag clearing” plugins

Plugins that promise miraculous speedups (regularly deleting items on the ground, “clearing RAM”, forcing garbage collection) don't solve the problem. They delete players' items, often cause stutters and only hide the cause. Find the real cause with spark.

Startup flags and memory#

Flags are the parameters Java starts with. They set the memory size for the game (the heap), caps for memory outside the heap, and the behavior of the garbage collector, which clears unneeded data from memory. In the customer area you'll find them in the Startup tab, in the Startup flags section.

The customer area calculates the heap and caps itself based on your plan size, server type, Java version and the number of plugins or mods. It recalculates them when the server is created, after a plan change, after a type or version change, and before a start from the portal if any of these has changed since last time. It doesn't overwrite a startup command you've edited by hand in the panel or set as custom. If such a command has a heap larger than a smaller plan can handle, we won't start the server after the plan change (it would crash right away) and we'll email you.

OptionWhat it doesWhen to use it
Preset – Recommended (G1)The G1 garbage collector with settings from the Paper documentation. The default for all server types.Most servers.
Preset – Low pauses (ZGC)A garbage collector with very short pauses at the cost of higher CPU usage. Java 21 and newer only.Large servers from 16 GB, when spark gc shows long pauses and the CPU has headroom.
Preset – ProxyFlags for Velocity and BungeeCord.Only offered for proxy servers.
Preset – No tuningOnly the heap size and memory caps.Temporarily, when troubleshooting whether the flags cause an error.
Custom flagsAdditional flags. Only -XX:…, -D…=… and --add-modules=… are allowed, up to 30. The heap can't be set. The caps for network buffers (-XX:MaxDirectMemorySize), compiled code (-XX:ReservedCodeCacheSize) and loaded classes (-XX:MaxMetaspaceSize) can, and the heap is then recalculated.When a plugin or mod guide tells you to add a specific -D property, or when a voice chat plugin needs more network buffers.

All presets have the same safeguards: caps on network buffers, compiled code and loaded classes, MALLOC_ARENA_MAX=2 (fewer allocator memory arenas) and, from Java 17, -XX:TrimNativeHeapInterval (returns unused memory to the system). Purpur also automatically gets --add-modules=jdk.incubator.vector (faster calculations that Purpur can use).

Buttons in this section:

  • Save – the settings are used on the next start.
  • Save and restart – the server restarts right away. If it doesn't start with the new flags, the customer area reverts them and you'll see the message The flags are not compatible, reverted to the previous settings.
  • Revert to previous – restores the last working settings.
  • Use recommended – appears when the heap is too large for your plan or the startup command has no memory caps. It sets the recommended command.
  • Recalculate now – recalculates the flags right away, so you don't have to wait for the next start from the portal.

Under Memory breakdown you can see how much goes to the heap and how much is left for everything else. After an automatic recalculation, the customer area shows something like We adjusted the startup to the new RAM size: heap 8.2 → 9.6 GB.

Running a server outside StormHost? The Startup script generator creates a startup script with the same calculation for Docker, Linux and Windows.

Why the heap isn't all of the RAM#

The heap (-Xmx) never grows past its own limit. What grows is memory outside the heap: network buffers, loaded plugin and mod classes, compiled code, threads and the system allocator. Network buffers grow the most – without a cap they can reach the size of the heap, so a server with a 6 GB heap can end up using 12 GB.

The server container has a hard limit 5% higher than the plan (10% for plans up to 4 GB, 15% up to 2 GB) and no swap. When the process goes over the limit, the system kills it. The Console shows Out of memory: true, and the server log has no error at all.

That's why every large part outside the heap has a cap, everything adds up with a margin below the plan size, and the heap gets the rest. When one part hits its cap, the server writes an error to the log (OutOfMemoryError: Direct buffer memory or Metaspace) instead of crashing silently, and that error points to the culprit.

Plan memoryHeap (Paper, 20 plugins)Heap (modpack, 200 mods)Container limit
10 GB7,872 MB7,040 MB10,752 MB
12 GB9,792 MB8,896 MB12,902 MB
16 GB13,504 MB12,672 MB17,203 MB
24 GB21,056 MB20,224 MB25,805 MB

The heap has the same minimum and maximum size (-Xms = -Xmx) and is allocated right at startup. That's why the memory graph in the panel shows a high number from the start. The panel also counts the world file cache, which the system frees when needed. A number close to the limit doesn't mean a crash on its own.

The Paper documentation recommends at least 6–⁠10 GB of heap regardless of player count, and warns that beyond a certain point, more memory doesn't improve performance.

When it's time for a bigger plan

If spark health shows the heap constantly above 90% even after garbage collection (spark gc reports frequent and long pauses), and you've ruled out memory leaks in plugins, the server needs more memory. You can switch to a bigger plan in the Change plan tab (guide). The flags are recalculated automatically after the upgrade and take effect on the next start.

View and simulation distance#

The world is split into chunks (columns of 16 × 16 blocks). The server keeps chunks loaded within a certain radius around each player:

  • view-distance – how many chunks around the player the server sends to the game (what the player sees). Mainly affects memory and network.
  • simulation-distance – the radius within which chunks are “alive”: mobs move, crops grow, redstone and farms work. Mainly affects the CPU, and therefore TPS.

The number of chunks grows with the square of the distance. With view-distance=10 the server keeps 441 chunks around each player, with 8 only 289 (a third fewer). The effect is the same for simulation.

Situationview-distancesimulation-distance
A small server with friends, no lag1010
A public survival, 20+ players8–⁠106–⁠8
The server lags and you don't know why86
Minigames, lobby6–⁠84–⁠6

Set them in the Server properties tab in the World group (all settings). We don't recommend a simulation distance below 5 – larger farms then stop working because part of the farm is outside the simulated area.

Paper and individual worlds

On Paper you can also set the distances for each world separately in spigot.yml (world-settings › default › view-distance and simulation-distance). The value default means “use server.properties”.

Paper settings#

Paper and Purpur have their own configuration in the config folder:

FileWhat it contains
config/paper-global.ymlSettings for the whole server (proxy, chunk loading, spam limits).
config/paper-world-defaults.ymlDefault settings for all worlds. This is where you tune performance.
world/dimensions/minecraft/<dimension>/paper-world.ymlOverrides for one dimension (from version 26.1; <dimension> is overworld, the_nether or the_end). In older versions, a paper-world.yml file in the world folder, for example world_nether/paper-world.yml.

Always edit paper-world-defaults.yml. Open the file in the editor in the Files tab, find the existing section (for example chunks:) and change the value inside it. Don't add the same section a second time – with a duplicate key the server either refuses to load the file or uses only one of them, and your change won't apply.

YAML rules

Indent with spaces only (never tabs), use the same indentation at the same level, and put a space after the colon. Make a backup before editing. Restart the server after editing – we don't recommend the paper reload command, because some values are only loaded on startup.

Selected settings with the biggest impact on performance:

SettingWhat it doesRecommended valueWhen to change
chunks.prevent-moving-into-unloaded-chunksDoesn't let players into a chunk that isn't loaded yet (fast elytra flight, minecart travel). The server then doesn't have to force-load chunks in the middle of a tick.trueDefault false. Turn it on for servers with elytras and fast travel.
chunks.entity-per-chunk-save-limitHow many entities of a given type are saved in one chunk. Protects against chunks flooded with thousands of arrows or experience orbs.arrow: 16, experience_orb: 16, snowball: 8, ender_pearl: 8, fireball: 8, small_fireball: 8Default is no limit (-1). Don't put animals or mobs here – the rest would disappear when saved.
collisions.max-entity-collisionsAfter how many collisions an entity stops calculating further collisions.2Default 8. A lower value greatly relieves places where many mobs are crammed together. Mobs in a crowd then push each other less – if a farm stops working because of it, raise the value again.
environment.optimize-explosionsSpeeds up explosion calculations (TNT, creepers).trueDefault false. Always turn it on; the outcome of explosions doesn't change.
misc.redstone-implementationHow redstone is calculated: VANILLA, EIGENCRAFT, ALTERNATE_CURRENT.ALTERNATE_CURRENTDefault VANILLA. The alternative calculation greatly lightens the load of redstone dust, but in rare cases changes the behavior of circuits that depend on update order. Let players with technical builds know.
hopper.disable-move-eventTurns off the plugin event fired on every item a hopper moves.falsetrue only when no plugin watches hopper transfers (chest protection, filters). Otherwise protections would stop working.
tick-rates.mob-spawnerHow often (in ticks) mob spawners check their surroundings and spawn.2Default 1. The spawner is only checked every other tick. Paper counts down its delay faster, so it spawns mobs about as often. -1 turns off all spawners.
tick-rates.grass-spreadHow often (in ticks) the server tries to spread grass.4Default 1. Grass spreads more slowly; players usually won't notice.
entities.spawning.despawn-rangesThe distance from the player where mobs randomly (soft) or immediately (hard) despawn. Vanilla: 32 and 128 blocks.For example monster: soft: 30, hard: 72On crowded servers. A smaller hard frees up room for new mobs closer to players.
environment.treasure-maps.enabledTreasure maps from villagers and chests. Searching for the nearest structure is very demanding.truefalse when spark shows lag when trading with cartographers or opening chests.
entities.armor-stands.tickWhether armor stands tick (physics, gravity).truefalse on servers with thousands of decorative armor stands. They then don't fall, and some plugins may not work with them.

Here's what the changes look like in the file (only the changed parts; leave the other lines of the file as they are):

config/paper-world-defaults.ymlYAML
chunks:
  entity-per-chunk-save-limit:
    arrow: 16
    experience_orb: 16
    snowball: 8
    ender_pearl: 8
  prevent-moving-into-unloaded-chunks: true
collisions:
  max-entity-collisions: 2
entities:
  spawning:
    despawn-ranges:
      monster:
        hard: 72
        soft: 30
environment:
  optimize-explosions: true
misc:
  redstone-implementation: ALTERNATE_CURRENT
tick-rates:
  grass-spread: 4
  mob-spawner: 2

spigot.yml and bukkit.yml#

Paper also reads the older spigot.yml and bukkit.yml configuration files in the server's main folder.

spigot.yml#

All settings are in the world-settings › default section.

SettingWhat it doesRecommended valueWhen to change
entity-activation-range.animalsWithin what distance (blocks) of a player animals tick fully. Further away they only tick occasionally.16–24Default 32. Lower it on servers with large animal pens.
entity-activation-range.monstersThe same for monsters.24Default 32.
entity-activation-range.villagersThe same for villagers.16Default 32. Villagers are among the most demanding entities. Too low a value slows down villager farms.
entity-activation-range.miscOther entities (items on the ground, minecarts).8–12Default 16.
entity-activation-range.raidersRaiders.48Default 64. Too low a value breaks raids.
merge-radius.itemUp to what distance (blocks) identical items on the ground merge.2.5Default 0.5. A larger value = fewer entities on the ground.
merge-radius.expThe same for experience orbs. -1 = Vanilla behavior.3.0Default -1.
nerf-spawner-mobsMobs from spawners have no AI (they don't move or attack).trueDefault false. Saves performance on XP farms, but spawner mobs then don't attack – let players know.
ticks-per.hopper-transferAfter how many ticks a hopper moves an item.8The default is 8 (Vanilla). A higher value slows down all hoppers – it changes how redstone clocks behave.

bukkit.yml#

SettingWhat it doesRecommended valueWhen to change
spawn-limits.monstersThe maximum number of monsters (per player, if per-player-mob-spawns is on in Paper).50Default 70. Fewer monsters = fewer calculations.
spawn-limits.animalsThe maximum number of animals that spawn naturally.8Default 10.
spawn-limits.water-animals, water-ambient, ambientFish, squid, bats.3, 10, 5Default 5, 20, 15.
ticks-per.monster-spawnsAfter how many ticks the server tries to spawn monsters.2Default 1.
ticks-per.autosaveAfter how many ticks the whole world is saved (6,000 = 5 minutes).6000Don't change it. Paper saves chunks continuously.

Pre-generating the world with Chunky#

When a player reaches a place nobody has been before, the server has to generate the terrain. It's the most demanding operation of all: one player on an elytra can drag down the TPS of the whole server. The fix is to generate the terrain in advance and set the world border so players can't go beyond the prepared area.

The Chunky plugin generates terrain in the background, gradually, and you can pause it. It exists for Paper, Purpur and Folia, and as a mod for Fabric, Forge and NeoForge.

  1. Install Chunky in the Plugins tab (for mods, Mods) › Browse: search for Chunky and click Install. Then restart the server (plugin guide).

  2. In the Console, set the center of the world border:

    text
    worldborder center 0 0
    • worldborder center – sets the center of the world border.
    • 0 0 – the X and Z coordinates of the center. Usually the center of the world, or the spawn coordinates.
  3. Set the border size:

    text
    worldborder set 10000
    • worldborder set – sets the border size.
    • 10000 – the diameter in blocks. The world will be 10,000 × 10,000 blocks, so 5,000 blocks from the center in each direction.
  4. Pass the border to Chunky:

    text
    chunky worldborder

    Chunky sets its center and radius from the world border.

  5. Start generating:

    text
    chunky start

    The console regularly shows the progress as a percentage, the number of generated chunks and an estimate of the remaining time.

Other commands:

CommandWhat it does
chunky pausePauses generation and saves progress. Useful when a lot of players join.
chunky continueResumes paused generation.
chunky cancelCancels the task. Generated chunks stay.
chunky progressPrints the progress (useful in the game).
chunky silentTurns progress messages in the console off or on.
chunky start world square 0 0 5000Starts generation without a world border: world world, square shape, center 0 0, radius 5,000 blocks.
chunky worldSelects a world. In the game, without a name, it selects the world you're standing in.

The Nether and End#

The Nether is eight times smaller than the Overworld (1 block in the Nether = 8 blocks in the Overworld). For a border with a 10,000-⁠block diameter in the Overworld (radius 5,000), a radius of 625 blocks is enough in the Nether. Join the game, go to the Nether and type in chat:

text
/chunky world
/chunky center 0 0
/chunky radius 625
/chunky start
  • /chunky world – without a name, selects the world you're currently in (the Nether).
  • /chunky center 0 0 – the center of generation.
  • /chunky radius 625 – the radius in blocks.
  • /chunky start – starts generation.

Only set a world border in the Nether (/worldborder set 1250 typed in the Nether) on Paper and Purpur, and from version 1.21.9 elsewhere too – only from that version does each dimension have its own border. In older versions of Vanilla, Fabric and NeoForge, the command would also change the border in the Overworld.

The End can be generated smaller (for example a radius of 2,000–⁠3,000 blocks); players move mostly around the islands there.

Disk and CPU

A pre-generated world takes up disk space – the larger the border, the more. Start with a smaller diameter (5,000–⁠10,000 blocks) and watch the free space in the Files tab or in the disk indicator in the Console. Generation uses the CPU fully: run it when there are few players on the server, or pause it in the meantime with chunky pause.

After a server restart, generation doesn't resume on its own. Continue with chunky continue (or set continue-on-restart: true in plugins/Chunky/config.yml).

Diagnostics with spark#

spark is a profiler: while the server runs, it records what the server is doing and shows the result as a clear tree with percentages. Paper has it built in from version 1.21 (so does Purpur); on Fabric and NeoForge, install the spark mod from Modrinth. On a Velocity proxy the command is sparkv.

Quick overview#

Command (in the console)What it shows
spark tpsTPS over the last 5 s, 10 s, 1 min, 5 min and 15 min, tick times and CPU usage. It colors the values green, orange or red depending on how good they are.
spark healthA link to a live overview: TPS, MSPT, CPU, memory, disk. Updates every 10 seconds.
spark gcGarbage collector history: how often and how long it cleaned up memory.
spark pingAverage player ping. With --player <NICK>, the ping of one player.
spark tickmonitor --threshold-tick 50Watches for ticks longer than 50 ms and prints each one. Type spark tickmonitor again to stop watching.

Profiling step by step#

  1. Wait until the server lags (or until it has its usual number of players). A profile of an empty server shows nothing.

  2. In the Console, start the profiler for 10 minutes:

    text
    spark profiler start --timeout 600
    • spark profiler start – starts the profiler.
    • --timeout 600 – stops it automatically after 600 seconds (10 minutes) and uploads the result.
  3. Wait 10 minutes. A link to the profile (spark.lucko.me/…) appears in the console.

  4. Paste the link into the Spark profile analyzer. It shows what's slowing the server down and what to change.

You don't have to upload the profile: with the --save-to-file option (for example spark profiler start --timeout 600 --save-to-file), spark saves it as a .sparkprofile file in the plugins/spark folder (on Fabric and NeoForge config/spark). Download it in the Files tab and upload it to the analyzer.

To stop the profiler early, type spark profiler stop. For short spikes (the server occasionally “freezes” for a second), use:

text
spark profiler start --only-ticks-over 100
  • --only-ticks-over 100 – records only ticks longer than 100 ms. It filters out normal operation and leaves only the “laggy” ticks. Choose a value between 50 and 100.

How to read the result#

If you want to go through the tree yourself, open the profile link in your browser:

  1. In the thread list, expand Server thread – the main game thread. Problems in other threads (chunk loading, networking) are less common.
  2. Click to expand nodes and watch the percentages. Always follow the path with the highest share.
  3. Time spent in Thread.sleep() or “parked” is fine – the server is waiting for the next tick because it has headroom.
  4. Typical findings:
What you see in the profileWhat it meansWhat to do
A large share in tickEntities or entities (Villager, Zombie …)Too many entities.entity-activation-range, spawn limits, check your farms (see How many entities are on the server).
A large share in chunk generationPlayers are exploring new terrain.Chunky and a world border.
A plugin's package name (for example com.example.plugin)A specific plugin.Update it, configure it or replace it.
Redstone, hoppersTechnical builds.redstone-implementation, hopper.disable-move-event (carefully).
  1. In the top bar, switch the view to Sources – it shows a separate tree for each plugin or mod, so you can see right away which one causes the most load.

You can send the profile link to the plugin's author or to our support. It contains no passwords or server files.

How many entities are on the server#

On Paper, the paper entity list command prints entity counts by type. In the console you also need to specify the world:

text
paper entity list * minecraft:overworld
paper entity list minecraft:villager minecraft:overworld
  • paper entity list – lists entities.
  • * – no filter; lists all entity types with counts (the first number is ticking entities, the second non-ticking).
  • minecraft:villager – a filter for one type. The output then shows the coordinates of the chunks with the most of these entities.
  • minecraft:overworld – the world (minecraft:the_nether, minecraft:the_end for the other dimensions). In the game you don't need to specify the world; the one you're standing in is used.

Then go and look at the spot in the game and make the farm or pen smaller.

Performance mods (Fabric and NeoForge)#

Fabric and NeoForge don't have Paper's optimizations, but there are server-side mods with the same goal. You'll find all of them on Modrinth (in the Mods tab › Browse):

ModWhat it doesLoader
LithiumOptimizes physics, mob AI and other parts of the game without changing behavior.Fabric, NeoForge
FerriteCoreReduces memory usage.Fabric, Forge, NeoForge
ModernFixSpeeds up startup and reduces memory usage, especially for large modpacks.Fabric, Forge, NeoForge
C2MEParallel chunk generation and loading. It reaches deep into how the world is handled – make a backup before using it.Fabric
sparkThe profiler described above.Fabric, Forge, NeoForge
ChunkyWorld pre-generation.Fabric, Forge, NeoForge

Always pick the mod for your exact Minecraft and loader version. Details are in Mods and modpacks.

When it's time to upgrade#

Upgrading your plan makes sense when:

  • spark shows that the load is spread evenly (no single plugin or farm dominates) and MSPT stays above 40 ms with your usual number of players,
  • spark health shows memory constantly at the cap and the garbage collector can't keep up,
  • you're adding a large modpack or planning for many more players.

If one plugin or farm takes most of the time, more performance won't fix it – you need to remove the cause.

Verify it works#

  1. After your changes, restart the server and let it run with players for at least 15 minutes.
  2. Type spark tps. MSPT (median) should be under 50 ms, ideally under 35 ms, and TPS 20.
  3. The Can't keep up! message should no longer repeat.
  4. If you're unsure, run another 10-⁠minute profile and compare it with the previous one.

Troubleshooting#

The server won't start after a config change#

Most often it's a YAML error (a tab, wrong indentation, a duplicate section). Look in the console for a line with the file name and line number. Fix it, or delete the file – Paper recreates it with default values on startup (your changes are lost). Alternatively, restore a backup.

The flags are not compatible, reverted to the previous settings.#

The server didn't start with the new flags and the customer area reverted them. Check your custom flags (a typo, a flag for a different Java version) and try the preset without custom flags.

The server suddenly shuts down with no error in the log#

A typical sign of exceeding the memory limit. The Console shows the lines Exit code: 137 and Out of memory: true, and the customer area shows The server ran out of memory and the system stopped it. above the console. The panel starts the server once more; if it crashes again within a minute, it leaves it off.

  1. In the Startup tab, check the warnings next to the startup flags. If the heap is too large for your plan or the command has no memory caps, click Use recommended.
  2. The customer area doesn't overwrite a startup command you've edited by hand or set as custom. Use the recommended preset, or set the heap according to the table in Why the heap isn't all of the RAM.
  3. Look in the log for OutOfMemoryError: Direct buffer memory or OutOfMemoryError: Metaspace. They point to a plugin or mod that fills the network buffers or keeps loading classes over and over.
  4. If the crashes continue even with the recommended settings, look for a memory leak: spark heapsummary shows what takes up the heap, and spark profiler start --alloc --timeout 300 shows what allocates the most memory. Paste the link into the Spark profile analyzer, or send it to our support.

java.lang.OutOfMemoryError: Java heap space#

The heap is full. Either there's more on the server than fits in memory (a modpack, a large number of players), or a plugin or mod is “losing” memory (a memory leak). An upgrade helps, or finding the leak with spark heapsummary. You'll find more errors in Common Minecraft server errors.

Chunky reports an invalid world#

The world name doesn't exist. In the game, use /chunky world without a name (it selects the world you're standing in), or in the console enter the name of the main world from level-name (default world).

A redstone build stopped working after enabling ALTERNATE_CURRENT#

Some circuits rely on Vanilla's update order. Set misc.redstone-implementation back to VANILLA and restart the server.

Summary

  • Measure lag with tps, mspt and spark tps: the goal is 20 TPS and MSPT under 50 ms.
  • The biggest effect: Paper, a pre-generated world with a border (Chunky) and a sensible simulation-distance.
  • The customer area sets the heap and memory caps itself based on your plan. Only change the default Recommended (G1) preset if you have a reason.
  • spark profiler start --timeout 600 finds the cause of lag; paste the link into the Spark profile analyzer.
  • Change Paper settings in config/paper-world-defaults.yml, after a backup and with a restart.

Was this guide helpful?

Applies to

  • Paper, Purpur
  • Fabric, NeoForge
  • Minecraft Java 1.20 and newer
  • Minecraft 26.x

Services

Report a mistake in this guide

Search the guides