Category: Optimization

Minecraft servers are heavy to run, so knowing how to squeeze just that tiny bit of performance is useful. Here are all the blog posts related to the optimization of Minecraft Servers.

  • How to Pre-Generate Your Minecraft World with Chunky

    How to Pre-Generate Your Minecraft World with Chunky

    Every survival server owner knows the moment. A player bolts for the horizon, the world has to build terrain it has never seen before, and the whole server hitches. Mobs freeze mid-swing, redstone clocks stutter, and chat fills up with questions about lag. That single player is not the problem. The world generation they just triggered is. This guide exists to help you remove that hitch for good by pre-generating your world with Chunky before your players ever reach the edge.

    This article is written for server owners, admins, and staff who want smoother gameplay without renting a bigger machine. Everything below was tested on a Paper 1.21 server running on a mid-range VPS, with Spark profiles captured before and after pre-generation so the tick-time and disk-growth numbers reflect real hardware. We cover the commands, the radius math, and the tuning that keeps pre-generation from becoming its own lag spike.

    If you already tune your server, treat this as the missing piece next to your JVM work. Pre-generation and garbage collection solve different problems, and together they are what separate a server that feels acceptable from one that feels instant. For the memory side of that equation, read our guides on [Aikar’s Flags Explained: The 2026 JVM Tuning Guide] and [ZGC vs G1GC: The Best Java Garbage Collector for Minecraft Servers].

    What Is a Chunk, and Why Does New Terrain Cause Lag?

    Before we talk about tools, it helps to know exactly what your server is doing when it feels slow. Minecraft never loads an entire world at once. It divides terrain into chunks: 16 by 16 block columns that run from the bottom of the world to the top. In a modern version that is 384 blocks tall, split into 24 sections of 16 blocks each, for roughly 98,000 blocks per chunk. The server only keeps the chunks around each player in memory, streaming them in and out of disk as players move. The Minecraft Wiki entry on chunks documents this system in detail.

    Why loading a new chunk is expensive

    Loading a chunk that already exists on disk is cheap. One that has never been created is expensive, because the server has to build it from scratch. That work runs on the main server thread, the same thread that moves mobs and ticks your redstone. Every new chunk can trigger:

    • Terrain and biome noise sampling
    • Cave, ore, and structure placement
    • Feature population such as trees, grass, and flowers
    • Lighting recalculation for every one of the chunk’s sections

    When a group of players sprints into fresh terrain at once, those jobs stack up. The main thread falls behind, the server reports rising MSPT (milliseconds per tick), and everyone feels a spike. That is exactly the cost pre-generation moves off your players’ backs and into a scheduled job that you control.

    What Pre-Generation Actually Is (and When It Pays Off)

    Pre-generation means creating chunks ahead of time so they already exist on disk before any player visits them. Once a chunk is generated, the server only has to load and tick it, which is dramatically cheaper than building it on the fly. Chunky does that generating quietly in the background while nobody is standing in the area.

    Pre-generation pays off most when:

    • Your SMP players explore far from spawn
    • You run a public survival or anarchy server where travel never stops
    • You use a fixed world border and want every reachable chunk ready in advance
    • You are launching soon and want a smooth day-one experience
    • You host events or world tours that send crowds into new terrain
    • You run hardcore worlds where a lag spike can cost a player their life

    It pays off less when your world is already fully generated, your play area is tiny, or your players famously never leave spawn. In those cases the chunk database is already warm and there is nothing left to build. The decision is simple: if players will ever cross the edge of the generated world, pre-generate before they do.

    Meet Chunky: The Pre-Generation Tool

    Chunky is a free, open-source pre-generation tool that has been the community standard for years. It ships as a plugin for Paper and Spigot servers and as a standalone mod for Fabric. It needs no configuration file to run. Chunky generates chunks at a rate you can throttle, so the server keeps breathing while the job runs, and it stores its progress on disk so you can stop and resume across restarts.

    You can download the plugin build from its Modrinth project page, grab the mod variant from the same listing, and track releases on the Chunky GitHub repository. The plugin also has a long-standing Spigot resource page. Because Paper optimizes terrain generation heavily, it is worth understanding how your server handles that pipeline; the PaperMC documentation is the place to start.

    Why admins keep coming back to Chunky:

    • No config required, with sane defaults out of the box
    • A small command set you can learn in five minutes
    • Progress survives restarts and crashes
    • Works across Paper, Spigot, and Fabric
    • Output is a normal world, so nothing downstream changes

    Step-by-Step: Pre-Generating with Chunky

    1. Install the plugin

    Drop the Chunky jar into your plugins folder on Paper or Spigot, or the mods folder on Fabric. Restart the server completely so it loads. Confirm it is active by running /chunky help in console or as an operator in game.

    2. Define the area

    Chunky generates in a circle by default, centered wherever you point it. Choose the world you want to fill, then set a center and a radius in blocks. Run these as an operator or from the server console:

    /chunky world world
    /chunky center 0 0
    /chunky shape circle
    /chunky radius 2000

    The /chunky world command targets a specific dimension, so you can pre-generate the overworld, then repeat for the nether and the end. The /chunky center command sets the middle of your circle, usually 0 0 at world spawn.

    3. Start, monitor, and pause

    /chunky start
    /chunky progress
    /chunky pause
    /chunky resume
    /chunky cancel
    /chunky confirm

    /chunky progress reports a completion percentage and an estimated time remaining. /chunky pause stops generation so you can run a backup or a resource-heavy event, and /chunky resume picks it back up. The /chunky confirm step guards destructive actions such as canceling a running job, which is why you sometimes have to confirm before Chunky changes course. On large radii, always check progress before assuming a job has stalled.

    Command reference

    CommandWhat it does
    /chunky world <name>Selects the world or dimension to pre-generate
    /chunky center <x> <z>Sets the center of the generation area
    /chunky radius <blocks>Sets the radius in blocks from the center
    /chunky shape <circle|square>Chooses a circular or square area
    /chunky startBegins a new generation task
    /chunky progressShows percentage and estimated time left
    /chunky pause / resumeHalts and continues the current task
    /chunky confirmConfirms a destructive or cancel action

    How to Calculate the Right Radius

    Radius and diameter are the classic trap. A command like /chunky radius 1000 generates a circle 2,000 blocks across, meaning players can travel 1,000 blocks from your center in every direction before hitting ungenerated land. The generated area is pi times the radius squared, and each chunk covers 256 blocks (16 by 16), so the chunk count is the area divided by 256. For a circle that is:

    chunks ≈ 3.14159 x radius x radius / 256

    Worked example: a 1,000-block radius gives pi times 1,000,000, or about 3.14 million blocks, divided by 256, giving roughly 12,270 chunks. That is around 245 MB of region files on a typical overworld and, on a healthy server, somewhere in the range of 10 to 30 minutes to generate. Double the radius to 2,000 and you quadruple the work to roughly 49,000 chunks, so always increase the radius in steps and watch progress before committing to a larger circle.

    Radius (blocks)DiameterApprox. chunksApprox. area
    5001,0003,0700.8M blocks
    1,0002,00012,2703.1M blocks
    2,0004,00049,00012.6M blocks
    3,0006,000110,00028.3M blocks

    Comparing Pre-Generation Approaches

    Pre-generation is not the only option for dealing with fresh terrain. Here is how the three common strategies compare so you can pick the one that fits your server.

    ApproachHow it worksProsCons
    Chunky pre-generationBuild chunks ahead of time on a scheduleNo player-facing spikes, resumable, predictableSpends disk and time up front; needs setup
    Let players exploreGenerate on demand as players wanderZero setup, only builds what is visitedLag spikes, unpredictable, worst during peak
    World border edgeRestrict travel so new chunks stop appearingCheap and permanent once generatedLimits players; an artificial edge breaks immersion

    In practice the strongest setups combine two of these: a world border defines the maximum reachable area, and Chunky fills everything inside it. That way no player ever finds ungenerated terrain, and you never generate a chunk nobody can reach.

    Performance Tuning During Pre-Generation

    Pre-generation still costs CPU, memory, and disk. The goal is to make it feel like a background chore rather than a second lag source. These are the settings and habits that matter most:

    • Run it at off-hours. Start large jobs late at night or during a maintenance window when few players are online.
    • Lower the generation rate. Reduce chunks processed per tick in Chunky so the main thread keeps headroom for gameplay.
    • Pause for backups. Use /chunky pause before a world backup so disk I/O is not split between two heavy jobs.
    • Keep players out of the generation area. A player standing inside the circle forces live loading on top of the generation work.
    • Monitor with Spark. Profile the server and watch MSPT while generation runs.
    • Leave headroom in RAM. More loaded chunks means more memory pressure, so do not run pre-generation and a memory-hungry event at once.

    To read those tick-time numbers properly, see our guide to [A Beginner’s Guide to Spark Reports]. If MSPT climbs steadily while generation runs, your rate is too high for the hardware, so throttle it down rather than letting the tick loop struggle.

    Storage and Time Costs

    Two resources get spent: disk and time. A normal overworld chunk compresses to roughly 10 to 30 KB inside your region files, and complex biomes or entity-heavy areas can push higher. That means a 2,000-block radius, at about 49,000 chunks, often lands between 0.5 GB and 1.5 GB depending on terrain. Plan disk space before you start, not during.

    Time is harder to predict because it depends on CPU, world type, and your throttled rate. As a rough guide, expect a fast dedicated machine to chew through tens of thousands of chunks in under an hour, while a busy shared VPS at a conservative rate may take several hours for the same job. Always judge by the estimate in /chunky progress rather than a fixed rule. If you cannot afford downtime at all, pre-generating alongside a standby world, as described in [How to Set Up a “Fallback” Server: Prevent Downtime], keeps the main world reachable while the new one is prepared.

    Pros and Cons of Pre-Generating with Chunky

    The upsides

    • Eliminates new-terrain lag spikes for players
    • Predictable performance because generation happens when you choose
    • Jobs survive restarts, so long tasks are not lost
    • Free, open-source, and widely documented
    • Pairs naturally with a world border for a fully generated play area
    • Improves the experience for exploration-heavy gameplay modes

    The downsides

    • Uses disk and CPU up front for terrain that may never be visited
    • Large radii can take hours on modest hardware
    • Needs a maintenance window or careful throttling to stay invisible
    • Does nothing for worlds that are already fully generated
    • Forgotten settings can generate far more than intended

    Common Mistakes and Expert Tips

    Most pre-generation problems come from a handful of repeated slip-ups. Avoid these and you will save yourself hours.

    1. Setting the radius far too large. Generating a 10,000-block radius because it sounds safe wastes days of CPU and gigabytes of disk. Match the radius to your world border, not to a feeling.
    2. Running during peak hours. Starting the job at prime time turns a background task into a visible one. Schedule it for your quiet window.
    3. Forgetting to trim old chunks. If your map has shifted over the years, prune stale regions with a region tool so you are not paying disk for terrain nobody visits.
    4. Ignoring the world border. Without a border, players can always walk past your generated circle and trigger the very lag you tried to prevent.
    5. Not backing up first. Any tool that writes large amounts of terrain should be preceded by a full backup. Pause generation before you back up.

    Expert tips that make the process smoother:

    • Set the world border first, then generate exactly to the border.
    • Pre-generate before launch, when no players are watching and downtime is free.
    • Generate the nether and end too, since players travel there just as far.
    • Re-run Chunky after a big terrain-mod change that alters generation.
    • Keep a copy of your settings so a future admin can repeat the job exactly.

    Frequently Asked Questions

    What does Chunky do?

    Chunky generates Minecraft chunks ahead of time so they exist on disk before players reach them. Rather than building terrain on the main thread when a player explores, it processes chunks at a controlled rate in the background, which removes the lag spikes that fresh terrain normally causes.

    How long does pre-generation take?

    It depends on your radius, hardware, and the rate you allow. A 1,000-block radius is about 12,000 chunks and often finishes in 10 to 30 minutes on a healthy server. A 2,000-block radius is roughly four times that work. Always trust the estimate shown by /chunky progress rather than a fixed number.

    Is pre-generation worth it for a small server?

    If players explore beyond the already-generated area, yes, even on a small server, because the CPU saved during exploration is the same CPU that keeps your tick rate healthy. If your players stay near spawn in a tiny, fully generated world, pre-generation adds cost with no benefit, so skip it.

    Does Chunky reduce lag?

    It reduces the lag caused by generating new terrain. It does not reduce lag from other sources such as too many entities, inefficient plugins, or poor JVM settings. Think of it as removing one specific, very common cause of spikes, not as a universal performance fix.

    Conclusion: Generate Once, Play Smoothly Forever

    New terrain is the most predictable lag source on a survival server, and it is also one of the easiest to eliminate. Pre-generating your world with Chunky moves that cost to a scheduled job you control, so players never feel the hitch. Pair it with a world border set to your intended play area, run it off-hours, and check /chunky progress before you sleep on it.

    Your next steps: set your border, pick a radius based on the math above, back up first, and start a job tonight. Then keep tuning the rest of the stack with our guides on [Aikar’s Flags Explained: The 2026 JVM Tuning Guide] and [ZGC vs G1GC: The Best Java Garbage Collector for Minecraft Servers]. A smooth server is the sum of small, deliberate choices, and pre-generation is one of the highest-impact ones you can make today.

  • Aikar’s Flags Explained: The 2026 JVM Tuning Guide

    Aikar’s Flags Explained: The 2026 JVM Tuning Guide

    Aikar’s Flags are the single most-copied line of Java settings in the Minecraft server community, and for good reason: they turn an ordinary Paper or Purpur server into a smoother one by making the Java garbage collector behave the way a tick-based game actually needs. If your players complain about stutter every few seconds, or your MSPT graph jitters without an obvious cause, the JVM is very often the culprit. This guide exists to help you fix that.

    This article is written for server owners, admins, and staff who run Paper, Purpur, or a fork of either. That covers everything from a five-player survival world on a budget VPS to a fifty-player SMP on dedicated hardware. You do not need to be a Java developer to use these flags. You do need to understand what you are pasting, because copying a command line onto the wrong RAM size is one of the fastest ways to make a server worse instead of better.

    We assembled this guide by re-reading the original Aikar gist and the official PaperMC documentation on Aikar’s Flags, then cross-checking every flag against Oracle’s Java documentation on G1 GC ergonomics. We ran the profile on Paper 1.21 servers with 8 GB and 16 GB of RAM and compared MSPT and garbage-collection logs before and after. The numbers below come from those readings, not from guesswork.

    What the JVM Garbage Collector Does for a Minecraft Server

    Minecraft’s server is a Java program, and Java manages memory automatically. A component called the garbage collector (GC) watches objects the code no longer references and reclaims that memory so the heap does not fill up. On a Minecraft server that reclaim work is constant and heavy, because a running world is a factory of short-lived objects:

    • Every game tick builds packet objects for each player online.
    • Chunk sections are loaded, modified, and unloaded as players move around.
    • Entities and block entities such as mobs, hoppers, and furnaces churn through temporary updates.
    • Plugins create event objects for every block break, chat message, and movement packet.

    Why GC pauses cause lag spikes

    When the collector runs, it can briefly stop every application thread inside the JVM. That moment is called a stop-the-world pause, and for those milliseconds no game tick executes. A healthy stop-the-world pause lasts a few milliseconds; a stressed or badly tuned collector can pause for tens or even hundreds of milliseconds, which players feel as a rubber-band, a frozen mob, or a burst of block lag. Before you tune anything, learn to measure lag: our guide to [A Beginner’s Guide to Spark Reports] walks through reading TPS and MSPT directly from a profiling report.

    The key metric is MSPT, or milliseconds per tick. A server has 50 ms of budget per tick to stay at 20 TPS. If garbage collection steals 150 ms once every ten seconds, four ticks are late and players see a spike even though the average tick time looks fine. Aikar’s Flags do not eliminate garbage; they shape how the collector behaves so those pauses stay short and predictable.

    The Full Aikar’s Flags Command Line, Explained Flag by Flag

    The exact Aikar’s Flags line

    This is the canonical profile Aikar published and that PaperMC still documents. Copy it exactly, then adjust only the -Xms and -Xmx values to match your RAM:

    java -Xms10G -Xmx10G -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 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui

    Memory and ramp-up flags

    • -Xms and -Xmx set the initial and maximum heap size. Setting both to the same value tells the JVM to reserve that much memory up front and never resize, which removes resizing pauses.
    • -XX:+AlwaysPreTouch forces the JVM to commit every heap page at startup instead of on demand, so the operating system does not fault pages in during gameplay.
    • -Daikars.new.flags=true and -Dusing.aikars.flags are marker properties. Hosts and support threads use them to confirm which profile is actually loaded.

    The core G1GC flags

    • -XX:+UseG1GC selects the G1 garbage collector, which splits the heap into regions and cleans the most garbage-heavy regions first.
    • -XX:MaxGCPauseMillis=200 tells G1 to aim for pauses under 200 ms. It is a goal, not a guarantee, and it is deliberately generous so G1 does not over-collect.
    • -XX:G1HeapRegionSize=8M sets the region size. The community-tested value keeps region counts in G1’s sweet spot for typical Minecraft heaps.
    • -XX:G1NewSizePercent=30 and -XX:G1MaxNewSizePercent=40 give the young generation a large, stable size so short-lived objects die young without promotion.
    • -XX:G1ReservePercent=20 holds back heap as a safety cushion, reducing the risk of an evacuation failure that would trigger a full GC.
    • -XX:G1HeapWastePercent=5 lets G1 stop mixed collections once reclaimable waste drops to five percent.
    • -XX:G1MixedGCCountTarget=4 spreads old-generation cleanup across four mixed collections instead of one long pause.
    • -XX:InitiatingHeapOccupancyPercent=15 starts a concurrent collection cycle early, when the heap is only 15 percent full, so cleanup keeps pace with allocation.
    • -XX:G1MixedGCLiveThresholdPercent=90 and -XX:G1RSetUpdatingPauseTimePercent=5 fine-tune which regions get collected and how much pause budget goes to remembered-set bookkeeping.

    Housekeeping and diagnostic flags

    • -XX:+ParallelRefProcEnabled processes reference objects (weak references and the like) in parallel, which shortens pauses for plugin-heavy servers.
    • -XX:+UnlockExperimentalVMOptions unlocks flags Oracle flags as experimental, including some G1 tuning options here.
    • -XX:+DisableExplicitGC ignores System.gc() calls, so a careless plugin cannot force a full stop-the-world collection.
    • -XX:SurvivorRatio=32 sizes the survivor spaces so most young objects are reclaimed in Eden before they are ever copied.
    • -XX:MaxTenuringThreshold=1 promotes surviving objects quickly, keeping the young generation small and fast to collect.
    • -XX:+PerfDisableSharedMem stops the JVM from writing perf data to shared memory, eliminating a known micro-pause source.

    Aikar’s Flags Reference Table

    Use this table as a quick lookup while you edit your startup command. Values are the community-tested defaults; only the heap size should change per server.

    FlagPurposeRecommended value
    -Xms / -XmxHolds the heap at a fixed size so it never resizesSame value for both
    -XX:+UseG1GCSelects the G1 garbage collectorEnabled
    -XX:+ParallelRefProcEnabledParallelizes reference processing to shorten pausesEnabled
    -XX:MaxGCPauseMillisTarget pause ceiling G1 works toward200
    -XX:+UnlockExperimentalVMOptionsUnlocks flags Oracle labels experimentalEnabled
    -XX:+DisableExplicitGCIgnores System.gc() that would force a full pauseEnabled
    -XX:+AlwaysPreTouchCommits all heap pages at startupEnabled
    -XX:G1NewSizePercentMinimum young-generation size30
    -XX:G1MaxNewSizePercentMaximum young-generation size40
    -XX:G1HeapRegionSizeG1 heap region size8M
    -XX:G1ReservePercentHeap kept aside to avoid evacuation failure20
    -XX:G1HeapWastePercentWaste allowed before mixed GC stops5
    -XX:G1MixedGCCountTargetNumber of mixed collections for old-gen cleanup4
    -XX:InitiatingHeapOccupancyPercentHeap fullness that starts a concurrent GC15
    -XX:G1MixedGCLiveThresholdPercentLive threshold for mixed GC regions90
    -XX:G1RSetUpdatingPauseTimePercentPause budget for remembered-set updates5
    -XX:SurvivorRatioEden-to-survivor ratio in the young generation32
    -XX:MaxTenuringThresholdPromotions before objects reach old gen1
    -XX:+PerfDisableSharedMemAvoids pausing to write the perf memory fileEnabled
    -Dusing.aikars.flagsMarker confirming the profile is appliedhttps://mcflags.emc.gs

    How to Size -Xmx for Your RAM

    The single most important number in the whole profile is the heap size, and it is also the one people get wrong. Aikar’s own guidance is to leave roughly 25 percent of your system RAM free for the operating system, the JVM outside the heap, and off-heap work such as Netty buffers and thread stacks. That means a machine with 16 GB of RAM should run a 10 to 12 GB heap, not 16 GB.

    Allocating all your RAM to -Xmx is the classic mistake. When the heap consumes every byte, the operating system has nothing left for its page cache and background processes, and it may start swapping. Swap on a Minecraft server is catastrophic: the disk cannot feed the JVM anywhere near as fast as RAM, so tick times explode. If you want to confirm how much disk speed actually matters once swapping starts, read [Does Disk Speed Actually Matter for Minecraft?].

    A simple sizing rule of thumb:

    • 8 GB of system RAM: run a 6 GB heap.
    • 16 GB of system RAM: run a 10 to 12 GB heap.
    • 32 GB of system RAM: run a 24 GB heap and consider whether one server should be that large.
    • Over 32 GB: think about splitting into multiple servers behind a proxy rather than one huge heap.

    Heap size should also match your player count and world size. A tiny survival server with a 12 GB heap will spend more time on garbage collection than on gameplay, because G1 has a larger area to scan. Bigger is not automatically better.

    How to Apply Aikar’s Flags

    How you apply the profile depends on how your server starts. The flags always go on the Java command line, before the -jar argument.

    Pterodactyl panel

    In a Pterodactyl container, the panel controls memory with its own limits. Open the server’s Startup tab and edit the variables, or add the flags to the additional Java arguments field. Keep -Xmx at or below the memory limit you assigned to the server in the panel; do not exceed it, or the container will be killed by the host. Many Pterodactyl eggs expose an interface loader for this reason, which lets you paste flags without touching the container memory limits.

    systemd unit

    If you run your own service, the flags belong in the ExecStart line of the unit file. After editing, reload and restart:

    ExecStart=/usr/bin/java -Xms10G -Xmx10G -XX:+UseG1GC ... -jar server.jar nogui
    
    systemctl daemon-reload
    systemctl restart minecraft

    Start scripts and control panels

    For a plain start.sh or start.bat, replace the java line with the full profile. If you use a hosting provider’s panel, look for a field labeled JVM arguments, Java flags, or Additional Java options. If the provider injects its own -Xmx, put your heap flags in the additional options field rather than duplicating them, and double-check the panel does not silently override you. Confirm the applied flags by checking the Aikar marker with the server’s process list or a startup log line.

    How to Verify Your Results

    Never assume the flags helped. Measure before and after on the same world with the same player load.

    Measure MSPT with /mspt or Spark

    Paper ships a /mspt command that reports recent tick durations. For a deeper look, install Spark and run a profiler while your server is under load. Watch the maximum tick time and the count of ticks over 50 ms, not just the average. A good result is a lower maximum and far fewer long ticks, even if the average barely moves. The Spark guide linked above shows exactly which numbers to compare.

    Read the GC log with Xlog:gc

    Add a GC log flag to your command line so you can see pauses directly:

    -Xlog:gc*:file=gc.log:time,uptime,level,tags

    Open gc.log and look at the pause entries. You want short pauses, ideally under 50 ms, and no long “Full GC” events. When you can also see how to compare collectors, our breakdown of [ZGC vs G1GC: The Best Java Garbage Collector for Minecraft Servers] puts those pause numbers in context.

    When Aikar’s Flags Are NOT the Fix

    Aikar’s Flags tune the JVM. They cannot fix slow plugin code, sync chunk loads, or bad entity handling. If your server still spikes after applying them, the bottleneck is elsewhere. Common culprits include:

    • A plugin doing heavy synchronous work on the main thread every tick.
    • Massive chunk generation during world exploration, which loads the CPU independently of GC.
    • Async tasks that accidentally touch the world on the main thread, causing bursts.
    • A host that oversells CPU, so your ticks are simply starved of processor time.

    Confirm your hardware is not the limit first; our roundup of the [Best CPUs for Minecraft Servers 2026] explains which single-thread performance numbers matter for Minecraft. If you are also trying to keep costs down, [How to Run a large Minecraft Server for Under $50 a Month] shows how to get that performance on a budget.

    How Aikar’s Flags relate to ZGC

    G1, which Aikar’s Flags tune, is the right choice for most servers because it balances throughput and pause time. ZGC is a newer low-pause collector that can hold pauses under a millisecond, but it needs more heap headroom and is best on machines with many cores and lots of RAM. The two are alternatives: Aikar’s Flags configure G1, so if you switch to ZGC you drop most of the G1-specific flags and keep only the memory and housekeeping ones. For a full comparison of when to make that jump, read the ZGC vs G1GC article above.

    Pros and Cons of Aikar’s Flags

    Aikar’s Flags are not a magic switch. Here is an honest look at what they do and do not give you.

    • Pros: they are free, widely tested, and dramatically reduce GC-induced lag spikes on Paper and Purpur.
    • Pros: they are documented and maintained by PaperMC, so they stay current with new Java versions.
    • Pros: they require no plugin and no code changes, only a startup flag edit.
    • Cons: they do nothing for plugin bugs, chunk generation, or CPU starvation.
    • Cons: applied with the wrong heap size, they can hurt performance instead of helping.
    • Cons: they are specific to G1, so they are redundant if you migrate to ZGC.

    Common Mistakes and Expert Tips

    We see the same errors repeatedly in support threads. Avoiding them is worth more than any single flag.

    1. Setting -Xmx to all available RAM. Leave around 25 percent for the OS and off-heap work.
    2. Letting -Xms differ from -Xmx. Set them equal so the JVM never resizes the heap mid-game.
    3. Pasting the flags into the wrong field on a panel that already injects its own heap flags, so the heap size is applied twice.
    4. Tuning flags before fixing a broken plugin. Profile first, then tune.
    5. Changing five things at once. Change the flags, measure, then adjust.
    6. Forgetting the marker flag, then being unable to prove which profile is running.

    Expert tip: keep a note of your before-and-after MSPT and GC-log pauses in the same file. When a new plugin or Minecraft version regresses performance months later, that baseline tells you instantly whether the JVM or something else changed.

    Frequently Asked Questions

    What are Aikar’s Flags?

    Aikar’s Flags are a tested set of Java Virtual Machine options, published by developer Aikar, that tune the G1 garbage collector for the way Minecraft servers allocate memory. They reduce the frequency and length of stop-the-world pauses that cause lag spikes.

    How much RAM should I give a Minecraft server with Aikar’s Flags?

    Leave roughly 25 percent of system RAM free, then assign the rest to the heap. A 16 GB machine should run a 10 to 12 GB heap, and an 8 GB machine a 6 GB heap. Never allocate all available RAM to -Xmx, because the operating system needs room to work and to avoid swapping.

    Are Aikar’s Flags still recommended in 2026?

    Yes. PaperMC continues to document them, and they remain the default starting point for Paper and Purpur servers of every size. Unless you have a very large, multi-core machine and a specific reason to use ZGC, Aikar’s Flags are the right baseline.

    Do Aikar’s Flags work with ZGC?

    Only partly. Most flags in the profile tune G1 specifically, so they have no effect under ZGC. If you switch to ZGC, keep the memory and housekeeping flags such as -Xms, -Xmx, -XX:+AlwaysPreTouch, and -XX:+DisableExplicitGC, and drop the G1 tuning options.

    Conclusion: Tune, Measure, Then Tune Again

    Aikar’s Flags are the rare piece of Minecraft advice that is both free and genuinely effective. They will not turn a misconfigured server into a perfect one, but they reliably cut the garbage-collection pauses behind those mysterious lag spikes. Start by sizing your heap with about 25 percent headroom, paste the canonical line, confirm the marker flag is present, and then prove the improvement with MSPT and a GC log.

    If you are still chasing spikes after that, the problem is almost never the JVM. Read our Spark guide to find the real bottleneck, and keep the CPU and hosting guides handy when it is time to scale. Apply the flags today, take a baseline, and check back in a week. Your players will notice the difference.

  • ZGC vs G1GC: The Best Java Garbage Collector for Minecraft Servers

    ZGC vs G1GC: The Best Java Garbage Collector for Minecraft Servers

    Ask ten Minecraft server owners what causes lag and most will blame plugins, players, or “the host.” In reality, a huge share of mysterious freezes, tick spikes, and “server not responding” complaints come from one place: the Java garbage collector. Every time the JVM pauses to clean up memory, your server stops ticking. Choose the wrong collector and those pauses can stretch into hundreds of milliseconds, exactly when your world is busiest.

    This guide is written to help server owners, admins, and plugin developers settle the 2026 question of ZGC vs G1GC for Minecraft servers. It is built from the official JVM documentation, the well-known Aikar’s flags community standard, and hands-on testing on Java 21 and Java 24 with Paper 1.21. If you already run Minecraft server hosting and want to squeeze out the last few TPS, this is the missing piece.

    Why the Garbage Collector Matters More Than You Think

    Minecraft allocates memory constantly: chunks, entities, block updates, packets. The JVM occasionally stops all application threads to reclaim unused objects. That stop-the-world pause is invisible on a laptop but brutal on a server, because the main thread has a hard 50 millisecond budget per tick. Cross that line consistently and players see rubber-banding, hit-registration failures, and mob lag.

    This is why [A Deep Dive into Aikar’s Flags: The Science of JVM Optimization] exists. Those flags tune one specific collector, G1GC, for Minecraft’s allocation pattern. But since Java 21 shipped generational ZGC, there is a serious alternative. Understanding both lets you choose deliberately instead of copying flags you found in a Discord message.

    What Is G1GC?

    G1 (Garbage First) has been the JVM default collector since Java 9. It divides the heap into regions and collects the ones with the most garbage first, aiming for a user-defined pause target (default 200 ms). It balances throughput and latency well for a general-purpose workload, which is why it has been the backbone of Minecraft optimization for years.

    Reference: Oracle G1 Tuning Guide.

    What Is ZGC?

    ZGC is a low-latency collector designed to keep pauses under a millisecond, even on multi-terabyte heaps. It does almost all its work concurrently, while your threads keep running. The catch is higher CPU and memory overhead because of the concurrent barriers it relies on.

    Generational ZGC (JEP 439) arrived in Java 21 and split the heap into young and old generations, fixing ZGC’s biggest weakness: it previously had to scan the entire heap for every collection cycle. Because most objects die young, generational ZGC does dramatically less work per cycle. Java 23 made generational ZGC the default (JEP 474), and Java 24 removed the non-generational mode entirely (JEP 490).

    References: JEP 439: Generational ZGC | JEP 474 | Oracle ZGC Guide.

    ZGC vs G1GC: Side-by-Side Comparison

    MetricG1GCZGC (generational)
    Typical pause time10-100 ms (target 200 ms)Well under 1-5 ms
    ThroughputHighSlightly lower (concurrent overhead)
    CPU overheadLowModerate to high
    Heap headroom neededModerateHigher
    Best heap range2-16 GB16 GB and up
    Default sinceJava 9Generational: Java 23
    Minecraft requirementJava 17+Java 21+ (1.20.5+)

    These are representative ranges from community and JVM benchmarking, not guarantees. Your plugin load, entity count, and CPU matter more than any single number. See the [Best CPUs for Minecraft Servers 2026] to understand how CPU headroom changes the math.

    The Exact JVM Flags for Each Collector

    Option A: G1GC (Aikar’s Flags)

    java -Xms10G -Xmx10G -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

    Set -Xms and -Xmx equal to avoid heap resizing. Always leave 1-2 GB of system RAM free for the OS and off-heap work. Source: PaperMC Aikar’s Flags.

    Option B: Generational ZGC

    java -Xms24G -Xmx24G -XX:+UseZGC -XX:+ZGenerational 
      -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -jar server.jar nogui

    On Java 23 and later, drop -XX:+ZGenerational because it is the default, and on Java 24 the flag is gone because non-generational ZGC was removed. Keep the heap large enough that ZGC rarely needs to fall back to a stop-the-world cycle. Source: OpenJDK JEP 474.

    So Which Should You Use in 2026?

    • Use G1GC (Aikar’s flags) if you run 2-16 GB of heap on a typical VPS or dedicated box. It is battle-tested, light on CPU, and handles classic SMP loads beautifully.
    • Use generational ZGC if you run 24 GB or more, host hundreds of players, run heavy modpacks, or see recurring pauses that survive G1 tuning and spark profiling.
    • Measure before switching. A collector change without before-and-after data is just superstition.

    For context on how the collector interacts with your CPU and RAM budget, see [CPU vs RAM: What Actually Stops Minecraft Lag in 2026?] and [Minecraft Server Hosting: Performance, RAM, and TPS Explained].

    How to Benchmark a Garbage Collector Change Properly

    1. Record a baseline TPS and tick-duration graph with spark for at least 24 hours of normal play.
    2. Note peak MSPT (milliseconds per tick) and the frequency of spikes above 50 ms.
    3. Enable GC logging with -Xlog:gc*:file=gc.log:time,uptime to see pause lengths directly.
    4. Change exactly one thing: the collector, not the heap size and collector at once.
    5. Run the same window again and compare pause distribution, not just averages.

    Pros and Cons Summary

    G1GC

    • Pros: Default and well documented, low CPU cost, predictable performance on small and mid-size heaps, huge community knowledge base.
    • Cons: Pauses can spike on large heaps or when the heap fills quickly; needs regular tuning as your server grows.

    Generational ZGC

    • Pros: Near-zero pause times, scales to very large heaps, ideal for big communities and heavy modpacks.
    • Cons: More CPU and memory overhead, requires Java 21 or newer, less community tuning data for Minecraft specifically.

    Common Mistakes to Avoid

    • Setting -Xmx higher than -Xms. Heap resizing causes avoidable pauses. Make them equal.
    • Using non-generational ZGC on Java 24. It no longer exists. Let generational be the default.
    • Leaving zero RAM for the OS. ZGC’s concurrency needs breathing room, not a fully committed machine.
    • Mixing modded and vanilla assumptions. Heavy modpacks allocate far more, so they benefit from ZGC sooner.
    • Blaming the collector for plugin lag. Profile first with spark; a bad plugin will lag on any collector.

    Frequently Asked Questions

    Is ZGC better than G1 for Minecraft?

    It depends on heap size and CPU budget. ZGC gives far lower pause times but costs more CPU and memory. For small and mid-size servers G1GC with Aikar’s flags is usually the smarter choice.

    Can I use ZGC on a 4 GB Minecraft server?

    You can, but you generally should not. ZGC’s overhead is a poor trade at small heap sizes. Stick with G1GC until you are comfortably above 16 GB.

    Which Java version do I need for generational ZGC?

    Java 21 introduced generational ZGC, Java 23 made it the default, and Java 24 removed the old mode. Minecraft 1.20.5 and newer ship with Java 21, so most current servers qualify.

    Do Aikar’s flags still work in 2026?

    Yes. They remain the recommended G1GC configuration for most Minecraft servers and are maintained on the PaperMC documentation .

    Conclusion: Tune for Your Server, Not for Twitter

    G1GC is still the pragmatic default for most Minecraft servers in 2026, and generational ZGC is a genuine upgrade once your heap and player count grow large. The winning move is not picking a side, it is measuring. Record a baseline, change one variable, and let your own GC logs decide.

    Your next step: run /spark profiler start, capture 24 hours of tick data, then compare your current collector against the alternative using the flags above. If you are still on an old JVM, upgrading Java is the single biggest TPS win available. Then read [Aikar’s Flags Explained: The Secret to Perfect Garbage Collection] to complete the picture.

    Tuning ZGC for Minecraft: Heap and CPU Guidelines

    Switching the collector is only half the job. ZGC needs a different mindset than G1. Because it does its work concurrently, it rewards generous heap headroom and punishes a machine that is already CPU-saturated. As a rule of thumb, give ZGC at least 25 percent more heap than you would give G1, and make sure the host still has 2 GB of RAM and a free CPU core for the operating system and off-heap work.

    • Keep -Xms and -Xmx equal so the heap never resizes mid-session.
    • Leave at least one physical core with nothing else pinned to it; ZGC uses background threads.
    • Do not over-allocate: an oversized heap with a weak CPU just moves the bottleneck.
    • On modded servers, expect higher allocation rates and give ZGC even more headroom.

    If your host is CPU constrained, G1GC will usually serve you better no matter how large the heap, because it spends fewer cycles on concurrent bookkeeping.

    How to Read Your GC Logs

    The GC log is the ground truth for any collector debate. Enable it, then look for pause length and frequency rather than raw totals.

    • On G1, focus on events labeled Pause Young and Pause Full; a growing count of long full pauses is your signal to switch.
    • On ZGC, watch for any stop-the-world cycle at all; the goal is to keep them rare.
    • Correlate each long pause with a TPS dip in your spark timeline to confirm the collector is the cause.

    Does ZGC use more RAM than G1?

    Yes. ZGC trades memory and CPU for lower latency, so plan for a larger heap and more headroom on the host.

    Will changing the collector fix laggy plugins?

    No. A collector change only removes garbage-collection pauses. If spark shows a plugin hogging the main thread, fix the plugin first.

  • A Beginner’s Guide to Spark Reports

    A Beginner’s Guide to Spark Reports

    There is nothing that kills the momentum of a great session faster than lag. You’re deep in a cave, about to land a critical hit on a Creeper, when suddenly—the world freezes. Blocks don’t break, mobs stop moving, and the “rubber-banding” begins. For players, it’s frustrating. For owners of Minecraft servers, it’s an existential threat to player retention.

    In the past, diagnosing these issues was a dark art. You had to guess which plugin was acting up or blindly upgrade your Minecraft server hosting plan, hoping more RAM would solve the problem (spoiler: it usually doesn’t).

    Enter Spark. In 2026, Spark has become the gold standard for performance profiling. This guide will take you from a confused beginner to a lag-hunting expert, showing you exactly how to read a Spark report and reclaim your 20 TPS.


    What is Spark (and Why Do You Need It)?

    Spark is a performance profiling plugin and mod for Minecraft. Unlike basic commands like /tps, Spark doesn’t just tell you that your server is lagging; it tells you why. It acts like a high-speed camera for your server’s CPU, taking “snapshots” of what the code is doing thousands of times per second.

    Spark vs. Aikar’s Timings

    While many veterans are used to Aikar’s Timings (built into Paper/Spigot), Spark is more detailed and works across more platforms, including Fabric and Forge. As we discussed in [Java vs Bedrock Servers: Key Differences Explained], the underlying architecture of your server determines your optimization path, and Spark is the most versatile tool for the job.


    Step 1: Generating Your First Report

    To start a Minecraft server diagnosis, you first need data. If you have Spark installed, follow these steps to generate a profiler link.

    1. Start the Profiler: Run /spark profiler start in-game or via console.
    2. Wait: Let it run for at least 3–5 minutes. To find a “hot spot,” you need the server to be active with players.
    3. Stop and Upload: Run /spark profiler stop.
    4. Open the Link: Spark will provide a URL (e.g., spark.lucko.me/ABC123XYZ). This is your Spark Report.

    Expert Tip: If you are experiencing sudden lag spikes rather than constant sluggishness, use the command /spark profiler start --only-ticks-over 100. This tells Spark to only record data when a tick takes longer than 100ms, filtering out the “noise” of healthy performance.


    Step 2: Understanding the Vital Signs (TPS and MSPT)

    When you open the report, the first thing you see is the “Summary” dashboard. Before diving into the complex “call tree,” look at these two metrics.

    TPS (Ticks Per Second)

    • What it is: The “heartbeat” of the server. Minecraft is designed to run at 20 ticks per second.
    • The Goal: 20.0.
    • The Warning Sign: If this is below 18.0, your players will start to notice “server lag.”

    MSPT (Milliseconds Per Tick)

    • What it is: The actual time it takes for the server to calculate a single tick.
    • The Math: Since there are 1,000ms in a second, and the server wants 20 ticks, you have a “budget” of 50ms per tick.
    • The Goal: Anything under 40ms is healthy.
    • The Warning Sign: If your MSPT is 50.1ms, your TPS will drop below 20.
    MSPT ValueServer Health Status
    0 – 30msExcellent: Plenty of “headroom” for more players.
    30 – 45msGood: Stable, but getting close to the limit.
    45 – 50msStrained: Any sudden event (like world gen) will cause lag.
    50ms+Lagging: The server is officially “skipping” ticks.

    Step 3: Navigating the Call Tree (Finding the Culprit)

    This is where beginners usually get intimidated. The “Call Tree” is a list of every function the server ran during the profile.

    How to Read the Hierarchy

    The list starts with the “Server Thread.” As you click the plus (+) icons, you are digging deeper into the code. The percentages on the right tell you how much of the CPU’s total time was spent on that specific task.

    The Golden Rule of Debugging: Follow the biggest percentage. If Server Level Tick is taking up 90% of the thread, click into it. If inside that, Entities is taking up 80%, you’ve found your problem: it’s an entity issue.

    Common “Red Flags” in the Call Tree

    • entity.EntityAnimal.aiStep: This means you have too many animals (likely a massive cow or chicken farm) calculations taking up CPU time.
    • block.entity.Hopper: Hoppers are notorious for lag because they “search” for items above them every tick.
    • world.chunk.ChunkProvider: This points to “World Generation” lag. If players are exploring new terrain too fast, the CPU can’t keep up. This is a common issue even on the best Minecraft servers.
    • plugin.[Name]: If you see a specific plugin name at the top of the list, that plugin is poorly optimized or misconfigured.

    Step 4: The “World” Tab – Tracking Entities and Chunks

    One of Spark’s best features is the World Tab. Instead of reading code, you can see a literal list of what is currently loaded in your world.

    • Entity Count: Look for any entity with a count over 500–1,000. If you see 2,000 “Item” entities, someone likely blew up a chest or has a farm overflowing onto the floor.
    • Chunk Count: High chunk counts usually mean your view-distance is too high in server.properties.

    As we mentioned in [Minecraft Server Hosting: Performance, RAM, and TPS Explained], high entity counts aren’t just a RAM issue; they are a CPU bottleneck. Every single zombie needs to “think” (AI) and “check for collisions” every 50ms.


    Common Lag Sources and How to Fix Them

    Once you’ve identified the source in your Spark report, use this table to find the solution.

    Identified CauseRecommended Action
    Entity AI LagInstall an optimization mod like EntityCulling or reduce mob caps.
    Hopper LagPlace composters on top of hoppers to stop them from searching for item entities.
    World GenerationPre-generate your world using the Chunky plugin.
    Plugin OverheadCheck for updates or replace the plugin with a more efficient alternative.
    GC (Garbage Collection)This is a RAM/Java issue. See [A Deep Dive into Aikar’s Flags: The Science of JVM Optimization].

    Common Mistakes Beginners Make

    1. Profiling an Empty Server: If you run Spark when no one is online, the report will look “perfect,” but it won’t help you find why the server lags during peak hours.
    2. Focusing on 1% Tasks: Don’t waste time trying to optimize a task that only takes up 1.2% of your CPU. Go for the “Big Fish” (anything over 15–20%).
    3. Assuming it’s Always RAM: Beginners often think lag means they need more RAM. If your Spark report shows high MSPT but your RAM usage is only 50%, more RAM will not help. You likely need a faster CPU with better single-core performance.

    FAQ: People Also Ask

    My TPS is 20, but my players are still lagging. Why?

    This is likely “Network Lag” or “Client-side Lag.” Check your ping in the Spark report. If TPS is 20 but ping is 300ms, the issue is the player’s connection or the server’s location.

    Can I run Spark on a Bedrock server?

    Spark is primarily for Java Edition (including Geyser setups). For native Bedrock, you are limited to the built-in performance toggles, as discussed in [ Mastering the Bedrock Dedicated Server: Advanced Configuration Tips ].

    How long should a Spark profile last?

    For general debugging, 5 minutes is perfect. For specific lag spikes, let it run until the spike occurs, then stop it immediately.

    Conclusion

    A low lag Minecraft server isn’t a matter of luck; it’s a matter of data. By learning to read Spark reports, you move from “guessing” to “knowing.” You can pinpoint exactly which player’s illegal gold farm is crashing the server or which outdated plugin is hogging the CPU.

    If your Spark reports consistently show high “System CPU” usage even when your server isn’t doing much, it might be time to move away from oversold “budget” hosts. Check out our list of [The best Minecraft Hosting Providers] to find a host that gives you the dedicated power your community deserves.

  • How to Set Up a “Fallback” Server:  Prevent Downtime

    How to Set Up a “Fallback” Server: Prevent Downtime

    In the competitive landscape of 2026, the best Minecraft servers share one common trait: reliability. For a server owner, there is no nightmare quite like “Connection Refused.” Whether you are upgrading your hardware, migrating to a new data center, or performing essential maintenance, downtime is the silent killer of player retention. When players see a server is offline, they don’t wait; they move to the next entry on the server list.

    To compete with the top networks, you must move beyond the “single instance” mindset. Professional Minecraft server hosting strategies now revolve around the proxy—specifically BungeeCord or its modern successor, Velocity. By implementing a “Fallback” server system, you can ensure that even if your main survival or factions world is undergoing a massive migration, your players stay connected to your brand.

    This guide provides a comprehensive, technical walkthrough on how to how to run a Minecraft server network that never truly goes offline. We will explore the architecture of proxies, the configuration of fallback priorities, and the strategic use of “Lobby” servers to mask backend migrations.


    The Proxy Architecture: Why You Need a Bridge

    Before you start a Minecraft server, you must decide if it will be a standalone instance or part of a network. A standalone server is a single JAR file running on a specific port. If that JAR stops, the connection closes.

    A proxy-based network (using BungeeCord or Velocity) acts as a gateway. The players connect to the proxy, and the proxy “tunnels” them to the actual game server. This abstraction is what allows for the “Fallback” mechanic. If the destination server is unavailable, the proxy can catch the player before they are kicked and redirect them to a secondary “Fallback” or “Maintenance” instance.

    BungeeCord vs. Velocity in 2026

    While BungeeCord has been the industry standard for a decade, many public Minecraft server owners have moved to Velocity. Velocity is built from the ground up for high performance and better DDoS resilience. Both support fallback configurations, but Velocity offers more robust “Reconnect” handlers.

    FeatureBungeeCordVelocity
    PerformanceModerate (Legacy)High (Modern)
    Plugin SupportMassiveGrowing (Most major plugins ported)
    ConfigurationYAMLTOML
    StabilityOccasional “ghost” playersExtremely Stable

    For those looking for the ultimate low lag Minecraft server experience, Velocity is highly recommended, though the logic for fallback servers remains the same across both platforms.


    Step 1: Setting Up the Proxy Foundation

    To implement a fallback system, you need at least two backend Minecraft servers and one proxy instance.

    1. The Proxy: The gateway (BungeeCord/Velocity).
    2. The Main Server: Your primary game mode (e.g., Survival).
    3. The Fallback/Lobby: A lightweight server designed to hold players during downtime.

    If you are currently evaluating providers for this setup, refer to our analysis of [The best Minecraft Hosting Providers] to ensure you have the multi-instance support required.

    Proxy Configuration (config.yml for Bungee)

    In your BungeeCord config.yml, the priorities section is where the magic happens. This list tells the proxy which server to try first when a player joins, and where to send them if their current server crashes.

    YAML

    listeners:
    - query_port: 25577
      motd: '&1Another Bungee server'
      priorities:
      - Lobby
      - Fallback
      - Survival
      bind_local_address: true
      host: 0.0.0.0:25565
      max_players: 1000
      tab_size: 60
      force_default_server: true
    

    By setting force_default_server: true, you ensure that every time a player joins, they start at the Lobby. If the Lobby is down, BungeeCord moves to the next name in the priorities list.


    Step 2: Configuring the Fallback Logic

    A true fallback system doesn’t just work on login; it works during a “kick” event. If your Survival server restarts for a [Linux Distro…] update or a hardware move, you don’t want the player to see a “Server Closed” message and be sent to their multiplayer menu. You want them “fell back” to the Lobby.

    Utilizing BungeeCord Plugins

    Standard BungeeCord is somewhat limited in its “on-the-fly” redirection. To make this seamless, you should utilize Minecraft server plugins specifically designed for redirection:

    • MoveMeNow: A classic plugin that moves players to a specific server if they are kicked from their current one with a specific message.
    • BungeeReconnect: This allows players to automatically reconnect to the last server they were on once it becomes available again.
    • VelocityLobby (for Velocity): A streamlined way to manage fallback and lobby load balancing.

    Expert Tip: Set your fallback server to a “Maintenance Mode” instance during moves. This server should have a tiny resource footprint (1-2GB RAM) and contain NPCs or holograms explaining the move and providing an estimated time of return.


    Step 3: Zero-Downtime Migrations (The “Move” Strategy)

    When you are scaling and realize it’s time for [Scaling from 10 to 100 Players: When Should You Upgrade to a Dedicated Server?], the physical migration of files can take time. Here is the professional workflow for a zero-downtime move:

    The Migration Workflow

    1. The Preparation: Sync your world files to the new Minecraft server hosting environment using rsync while the old server is still live. This does the “heavy lifting” of data transfer without affecting the current game.
    2. The Maintenance Lobby: Update your Proxy to point a new “Maintenance” server as the priority.
    3. The Kick: Send a global alert: “Migrating to faster hardware! Moving you to the holding area…”
    4. The Switch: Use a command to move all players from the Survival server to the Maintenance server.
    5. Final Sync: Shut down the old Survival server. Perform a final rsync to capture the last few minutes of player data and world changes.
    6. The Re-route: Update the IP address of the Survival server in your Proxy’s config.yml.
    7. The Welcome Back: Use /send all Survival to move the players from the Maintenance lobby back to their world.

    This process ensures that players never leave your network. They stay in the “Holding” server, chatting with each other, while you perform the technical heavy lifting in the background.


    Technical Optimization for Proxies

    A proxy is a bottleneck. Every packet sent from a player to the game server must pass through the proxy. If your proxy is laggy, your best Minecraft servers will feel slow, regardless of their backend hardware.

    Memory and CPU Allocation

    Proxies do not need much RAM, but they need high-speed RAM.

    • BungeeCord: 1GB to 2GB is usually sufficient for up to 500 players.
    • Velocity: Can often handle 1,000+ players on just 1GB of RAM due to its superior threading.

    For the backend servers, ensure you are using [Aikar’s Flags Explained: The Secret to Perfect Garbage Collection]. The proxy itself should also use optimized flags to ensure that the packet processing is never delayed by a “Stop-the-World” garbage collection event.

    Network Latency

    If possible, host your Proxy and your Game Servers in the same data center. If your Proxy is in New York and your Game Server is in London, you are adding significant “round-trip” time to every action a player takes. To maintain a low lag Minecraft server, keep the internal network “hop” between proxy and game server under 2ms.


    Pros and Cons of Fallback Systems

    While fallbacks are essential for professional networks, they do introduce complexity.

    Pros

    • Player Retention: Players stay on your IP, reducing the chance they go elsewhere.
    • Professionalism: Shows your community that you invest in high-end infrastructure.
    • Staff Utility: Allows staff to test the new server environment while players are safely tucked away in a lobby.
    • Centralized Branding: One IP for all your game modes.

    Cons

    • Central Point of Failure: If the Proxy itself goes down, the entire network is unreachable.
    • Complex Troubleshooting: Issues with “IP Forwarding” or “BungeeGuard” can be difficult for beginners to debug.
    • Resource Overhead: You are paying for an additional instance (the proxy) that doesn’t actually host a “game.”

    Common Mistakes and Expert Tips

    Mistake 1: Forgetting IP Forwarding

    If you don’t enable ip_forward: true in BungeeCord and online-mode: false in your spigot.yml, every player will appear to have the IP address of the proxy. This breaks bans, ranks, and anti-cheat.

    Mistake 2: Security Vulnerabilities

    Never run a backend server in online-mode: false without a firewall or a plugin like BungeeGuard. Without it, players can bypass your proxy and join your game server directly as any user (including an Administrator) by spoofing their UUID. Refer to [Minecraft Server Security: Anti-Cheat, Backups, and DDoS Protection] for a full security audit.

    Expert Tip: The “Shadow” Migration

    Before moving your main community, set up a “Shadow” server on the new host. Use a proxy command to send only yourself and a few trusted beta testers to the new hardware. Monitor the TPS using /spark for 30 minutes. Only if the performance is stable should you move the rest of the community.


    FAQ: Prevnting Downtime with Proxies

    How many servers can I link to one BungeeCord?

    Technically, there is no hard limit. Some of the best Minecraft servers link dozens of instances (Lobbies, Minigames, Survival, Creative) to a single Velocity proxy. The only limit is the CPU power of the proxy instance itself.

    Does BungeeCord work with Bedrock players?

    Yes, but you need GeyserMC. You can install Geyser as a plugin on the BungeeCord or Velocity proxy itself, allowing Bedrock players to join the network and be moved between servers just like Java players. For more, read [A Guide to GeyserMC: Bridging the Gap Between Java and Bedrock].

    Can I set up a fallback server on a shared host?

    It depends on the host. Many shared Minecraft server hosting providers allow you to “link” servers if you own multiple plans. However, for a professional network, a VPS or Dedicated server is far superior as it gives you control over the internal networking.

    What happens if the Lobby server is full?

    If the Lobby is full and it is your only fallback, the player will be kicked. It is best practice to have a “Lobby-1,” “Lobby-2,” and “Lobby-3” in your priority list to load balance during massive spikes, such as an influencer join. To prepare for this, see [Influencer Marketing 101: How to Get Large YouTubers to Play on Your Server].


    Conclusion: The Zero-Downtime Standard

    In 2026, players have zero tolerance for downtime. If you want to start a Minecraft server that grows into a thriving community, you must treat your infrastructure with the same care as your gameplay. Implementing a BungeeCord or Velocity proxy with a robust fallback system is the “insurance policy” your server needs.

    By masking your moves and maintenance behind a polished Lobby or a Fallback server, you maintain the illusion of a 24/7, unbreakable world. This builds trust, encourages donations, and solidifies your place among the best Minecraft servers in the industry.

    Ready to secure your network? Start by migrating your standalone server to a Velocity proxy today—your players will thank you the next time you need to perform an update.

  • The Science of Server Resets: When, Why, and How to Wipe Your World

    The Science of Server Resets: When, Why, and How to Wipe Your World

    In the lifecycle of every successful multiplayer project, there comes a moment of reckoning. The economy is inflated, the world map is a Swiss cheese of abandoned bases, and the “new player experience” has become a mountain of unattainable goals. As an administrator, you face the most controversial decision in Minecraft server hosting: the world reset.

    A world wipe is not just a technical task; it is a social and psychological event. When handled correctly, it can propel you to the top of the best Minecraft servers lists, sparking a massive surge in player activity. When handled poorly, it can permanently kill a community.

    To start a Minecraft server that lasts for years, you must master the “Science of the Reset.” This guide covers the data-driven reasons to wipe, the psychological impact on your community, and the professional technical steps to ensure a flawless transition.


    Why Reset? The Three Pillars of the World Wipe

    There are three primary reasons why a professional public Minecraft server chooses to reset its world. Each pillar represents a different technical or social bottleneck that eventually makes a “legacy” world unplayable.

    1. The Economy and Progression Ceiling

    In game modes like Skyblock, Factions, or Economy-based Survival, there is an eventual “end state.” Once a core group of players becomes “trillionaires,” new players have zero chance of competing. This creates an elitist environment that stifles growth. A reset “levels the playing field,” allowing the next generation of players to compete for the top spots on the leaderboard.

    2. Technical Debt and Performance

    As a world stays active, it accumulates “technical debt.” This includes:

    • Region File Bloat: World folders can swell to hundreds of gigabytes, making backups slow and expensive.
    • Entity Lag: Thousands of forgotten hoppers, item frames, and massive redstone farms across the map eventually drag down the TPS (Ticks Per Second).
    • Chunk Corruption: Older worlds that have survived multiple version updates (e.g., from 1.19 to 1.21) often suffer from “broken” chunks that can cause a low lag Minecraft server to suddenly crash.

    3. Version Parity and “Terrain Envy”

    Minecraft updates are the lifeblood of the game. When Mojang releases a massive update like 1.21 or the future “End Update,” players want the new features. While you can expand your world border to find new terrain, the most engaging way to experience an update is to start a fresh world with the new generation mechanics.


    When to Reset: Signs Your World is Dying

    Timing is everything. Resetting too early frustrates builders; resetting too late leads to a “ghost town” effect. Use the following metrics—which we discussed in [Analytics for Admins: Using Plan to Grow Your Player Base]—to determine your timing.

    MetricThe “Reset Needed” Signal
    New Player RetentionDrops below 10% because the map is “picked over.”
    Active EconomyTop 1% of players own 90% of the total server currency.
    Average TPSConsistently below 18.0 due to legacy entity load.
    Player SentimentConstant chat questions like “When is the next reset?”

    The Professional Standard: Most competitive servers (Factions/Prison) reset every 3–6 months. Survival (SMP) servers usually reset every 12–18 months or whenever a major terrain-altering Minecraft update is released.


    The Psychological Reset: Managing Your Community

    The biggest mistake you can make when you start a Minecraft server reset is surprising your players. A “Surprise Wipe” is seen as a betrayal of trust. Instead, treat the reset as a Season Finale.

    1. Give 30 Days Notice

    Announce the reset date a month in advance. This gives players time to finish their projects, take screenshots, and say “goodbye” to their builds.

    2. Provide a World Download

    For many players, their builds are a labor of love. Always provide a public link to download the old world files. This ensures their work isn’t “gone”—it’s just moved to single-player.

    3. The “End of World” Event

    The final 48 hours before a reset should be a celebration.

    • Enable “Creative Mode” for everyone.
    • Host massive “Griefing” events where players can TNT their own bases.
    • Run a “Boss Rush” event where admins spawn 100 Withers at spawn.
    • The Goal: Make the end of the world more memorable than the world itself.

    Technical Guide: How to Properly Wipe Your Server

    When you are ready to pull the trigger, follow this checklist to ensure you don’t accidentally leave behind “ghost data” that can cause issues in the new world.

    Step 1: The Final Backup

    Never delete anything until you have a verified, zipped backup on external storage.

    Step 2: Clearing the Folders

    Connect to your Minecraft server hosting via SFTP. You must delete (or rename) the following folders:

    • /world
    • /world_nether
    • /world_the_end
    • /playerdata (This resets inventories and locations).
    • /stats and /advancements (Essential for a true fresh start).

    Step 3: Cleaning Plugin Databases

    If you use a global economy (Vault) or permissions (LuckPerms), you must decide if you are doing a “Hard Reset” or a “Soft Reset.”

    • Soft Reset: New map, but players keep their Ranks and Balance.
    • Hard Reset: Everyone starts at $0. (Recommended for health)

    Step 4: Setting the New Seed

    If you have a specific “God Seed” for your new world, update your server.properties file:

    Properties

    level-seed=40127456991643
    level-name=world_season_2
    

    Changing the level-name is the cleanest way to reset, as the server will generate a brand new folder and keep the old one as a backup.


    Common Mistakes During a Reset

    • Forgetting the End/Nether: Many admins forget to delete the dimension folders. Players will spawn in a new Overworld but travel to a “pre-looted” End.
    • Broken Holograms: If you have holograms at spawn that display “Top Kills,” they will be empty and look broken. Reset your plugin data before you open the doors.
    • Ignoring the “Join Rush”: A reset brings back EVERYONE at once. If your Minecraft server hosting isn’t prepared for 100+ people logging in simultaneously, your server will crash. Pre-generate your chunks using Chunky before the whitelist is removed.

    FAQ: People Also Ask

    Can I keep my players’ inventories but reset the world?

    Yes. Simply do not delete the playerdata folder inside your world directory. However, be warned: players will spawn in the “new” world at their “old” coordinates, which might be inside a mountain or over an ocean.

    Does a reset fix server lag?

    Temporarily, yes. It removes entities and tile-entities (like chests and furnaces). However, if your lag is caused by poor hardware or bad Minecraft server hosting, it will return as soon as players start building again.

    What is a “Map Trim” vs. a “Reset”?

    A Map Trim is where you use a tool like MCASelector to delete chunks where no one has built, but keep the bases. This is great for adding new biomes to an existing world without a full wipe.

    How do I announce a reset without losing players immediately?

    The “Pre-Reset Slump” is real. To keep players active after an announcement, offer “Legacy Rewards.” For example: “Any player with 100 hours this season gets a ‘Veteran’ tag in the next season.”


    Conclusion: The Lifecycle of a Great Server

    Resets are the heartbeat of the best Minecraft servers. They provide the “New World” smell that drives player excitement and the technical clean-up that keeps your low lag Minecraft server running smoothly. By treating the reset as a calculated, scientific event rather than a random act of destruction, you ensure that your community sees every “End” as an even better “Beginning.”

    Is your server ready for Season 2?

  • Folia Deep Dive: How to Run a 500-Player Survival Server

    Folia Deep Dive: How to Run a 500-Player Survival Server

    For over a decade, the “Holy Grail” of Minecraft server hosting has been the same: hosting hundreds of players in a single, unified survival world without the server turning into a slideshow. Until recently, the “Main Thread” was an unbreakable ceiling. No matter how many CPU cores you had, Minecraft could only use one for its main game logic.

    Enter Folia.

    Developed by the team behind PaperMC, Folia is not just another fork; it is a total rewrite of how Minecraft processes the world. By implementing regionized multithreading, Folia allows Minecraft servers to break free from the single-thread bottleneck. If you want to start a Minecraft server that supports 500 players in one Overworld, you are no longer dreaming—you are looking at Folia.


    What is Folia? Understanding Regionized Multithreading

    Traditional server software like Paper or Spigot ticks the entire world on one thread. If one player builds a massive lag machine at coordinates (100, 100), the player 20,000 blocks away at (-10,000, -10,000) feels that lag too.

    Folia changes the rules. It groups nearby loaded chunks into “independent regions.” Each region has its own tick loop running on its own thread.

    • Localized Lag: If a lag machine exists in Region A, it has zero impact on the TPS (Ticks Per Second) of Region B.
    • Parallel Processing: Instead of one core doing all the work, Folia spreads the load across your entire CPU.
    • Infinite Scalability: Theoretically, as long as your players stay spread out, you can keep adding players as long as you can add CPU cores.

    Hardware Requirements for a 500-Player Folia Server

    Because Folia is designed to use every bit of your hardware, you cannot run a high-capacity server on a budget VPS. To host a low lag Minecraft server of this scale, you need a high-thread-count dedicated machine.

    The 500-Player Spec Sheet

    ComponentMinimum for FoliaRecommended for 500 Players
    CPU16 Cores (Physical)32+ Cores (e.g., AMD EPYC or Threadripper)
    RAM16 GB64 GB – 128 GB (DDR5)
    StorageNVMe SSDEnterprise Gen4 NVMe (RAID 1)
    Network500 Mbps1 Gbps+ Dedicated Uplink

    Critical Note: Folia requires many cores. While a standard Paper server benefits from high single-core speed (like an i9-14900K), a 500-player Folia server thrives on high core counts found in server-grade hardware.


    Step-by-Step: How to Start a Minecraft Server with Folia

    Setting up Folia is slightly different than setting up a standard Paper server. Because it breaks many conventional plugins, you must be surgical with your configuration.

    1. Environment Preparation

    Ensure you are running Java 21 or higher. Folia leverages modern JVM features that older versions simply don’t support. We recommend a Linux environment—see [The Best Linux Distros for Hosting a Minecraft Server in 2026] for the top choices.

    2. Downloading and Initial Boot

    Download the latest Folia build from the PaperMC Downloads page.

    Bash

    java -Xms32G -Xmx32G -jar folia-paper-1.21.jar nogui
    

    Note: We recommend allocating at least 32GB of RAM for a 500-player target.

    3. Configuring the Regionizer

    In your folia.yml (or paper-global.yml in newer builds), you will find settings for how regions are managed.

    • thread-pool-size: This should match your physical core count.
    • merge-radius: This determines how close players need to be before their regions “merge” into one thread. For a public Minecraft server, a value of 3 or 4 is standard.

    The Plugin Problem: Why Your Favorites Might Not Work

    The biggest hurdle for Folia adoption is plugin compatibility. Because Folia has no “Main Thread,” any plugin that uses the standard BukkitScheduler will crash the server.

    Folia-Compatible Essentials

    To run a successful survival server, you need these updated versions:

    • LuckPerms: Fully supports Folia for permissions.
    • WorldEdit-Folia: A specialized fork of WorldEdit designed for multithreading.
    • Chunky: Essential for pre-generating your world to prevent chunk-loading lag.
    • LibertyBans: A modern punishment system that works with Folia’s architecture.

    For a full list of what works, check out [The Best Minecraft Plugins for High-Performance Servers].


    Pros and Cons of the Folia Architecture

    FeatureFolia (Multithreaded)Paper (Single-threaded)
    Max Player Count500+ (Hardware dependent)~100-150 (Hard ceiling)
    Plugin SupportLimited (Specific Folia builds)Universal
    Technical SkillHighLow to Medium
    Redstone ParityHigh (mostly identical)High
    StabilityExperimental/Production-ReadyGold Standard

    Expert Tips for Managing 500 Players

    1. Pre-Generate Everything: Use Chunky to pre-generate at least a 20,000-block radius. Chunk generation is one of the few things that can still spike a Folia server.
    2. Spread the Spawn: Use a “Random Teleport” (RTP) plugin on first join. If 500 players are all at (0,0), they will all be in the same “region bubble,” forcing them onto a single thread and defeating the purpose of Folia.
    3. Monitor Your Thread Pool: Use tools like top or htop in Linux to ensure your load is actually spreading across all cores.
    4. Avoid Mob Clumping: Limit mob spawns per region. Even with multithreading, 10,000 chickens in one region will still cause that specific region to lag.

    FAQ: People Also Ask

    Is Folia a drop-in replacement for Paper?

    No. You cannot simply swap your paper.jar for folia.jar. You will need to replace almost all of your plugins with Folia-supported versions, and some older plugins may never be compatible.

    Does Folia support BungeeCord or Velocity?

    Yes. Folia works perfectly with proxies like Velocity. In fact, using Velocity is recommended to handle the initial player authentication before sending them to the Folia world.

    Can I use Folia for a Minigame server?

    It depends. If the minigame happens in one small area (like a BedWars map), you won’t see much benefit from Folia because everyone will be in one region. Folia is best for Survival, Skyblock, and Anarchy servers where players are spread out.

    How do I fix “Illegal Thread Access” errors?

    This happens when a plugin tries to access data from the wrong thread. You cannot fix this via config; the plugin developer must update the code to use Folia’s RegionScheduler.


    Conclusion: The New Frontier of Minecraft Hosting

    Folia represents the most significant leap in Minecraft server hosting technology in a decade. While it requires more specialized knowledge and hardware, the reward is a public Minecraft server that feels truly infinite. By moving away from the single-thread bottleneck, you can finally provide a massive, 500-player survival experience that remains a low lag Minecraft server even at peak hours.

    Ready to push your server to the limit?

  • The Ultimate Guide to Pre-Generating Your World with Chunky

    The Ultimate Guide to Pre-Generating Your World with Chunky

    If you have ever tried to start a Minecraft server, you have likely encountered the “exploration lag” phenomenon. As players sprint across the landscape or fly with Elytra, the server’s CPU works overtime to generate new terrain, place structures, and calculate lighting for every single chunk. This intensive process is the number one cause of TPS drops on even the best Minecraft servers.

    To run a high-performance, low lag minecraft server, you need to stop generating the world in real-time and start pre-generating it. This guide will teach you how to use Chunky, the industry-standard tool for pre-generation, to ensure your players enjoy a smooth, professional experience from day one.


    What is Pre-Generation (And Why Does It Matter?)

    Minecraft generates its infinite world in 16×16 sections called “chunks.” By default, these chunks are created only when a player moves close to an unexplored area. This “on-demand” generation is incredibly resource-heavy.

    Pre-generation is the process of forcing the server to create and save these chunks to the disk before players ever set foot in them. When you pre-generate with Chunky, you are effectively trading storage space for CPU performance. Instead of the CPU “calculating” the world, it simply “reads” it from your minecraft server hosting storage.

    The Benefits of Using Chunky

    • Eliminate Stutter: No more block-lag or “rubber-banding” while exploring.
    • Stable TPS: Keep your server at a constant 20 TPS, even with multiple explorers.
    • Custom World Gen Support: Essential if you use complex terrain generators like Terraforged or Iris.
    • World Border Integration: Perfectly define your playable area to keep file sizes manageable.

    Step-by-Step Guide: How to Pre-Generate Your World

    Before you begin, ensure you have a backup of your world. While Chunky is extremely stable, it is best practice to always have a recovery point when performing major world operations.

    1. Installation

    Chunky is available as both a plugin (for Paper, Spigot, and Purpur) and a mod (for Fabric and Forge).

    • For Plugins: Download the .jar from SpigotMC and place it in your /plugins folder.
    • For Mods: Download the version for your loader from Modrinth and place it in the /mods folder.
    • Restart: Restart your server to generate the configuration files.

    2. Selecting the World

    By default, Chunky will target the world you are currently standing in. If you are running the commands from the console, you must specify the world name.

    /chunky world world

    (Replace “world” with “world_nether” or “world_the_end” for other dimensions.)

    3. Setting the Center and Radius

    Next, you need to tell Chunky where to start and how far to go. Usually, you will want the center to be your spawn point ($0, 0$).

    • Set Center: /chunky center 0 0
    • Set Radius: /chunky radius 10000 (This will generate a 20,000 x 20,000 block area).

    4. Choosing the Shape

    You can generate in various shapes depending on your needs. A square is the default and most efficient for storage, while a circle provides a more natural boundary.

    • Command: /chunky shape square

    5. Starting the Task

    Once configured, initiate the process:

    • Command: /chunky start

    Understanding World Size and Storage Requirements

    One common mistake when you start a Minecraft server is over-generating. Chunks take up physical space on your drive. If your minecraft server hosting plan has limited NVMe/SSD space, you must choose your radius carefully.

    Radius (Blocks)Total Area (Blocks)Approx. Disk Space (Vanilla)Estimated Time (Fast CPU)
    1,0002,000 x 2,000~200 MB10 Minutes
    5,00010,000 x 10,000~4 GB2 – 4 Hours
    10,00020,000 x 20,000~17 GB12 – 24 Hours
    20,00040,000 x 40,000~65+ GB2 – 4 Days

    Pro Tip: Always leave at least 20% of your disk space free for logs, backups, and player data. If you fill your disk to 100%, your world may become corrupted.


    Advanced Chunky Commands and Tips

    To truly master your public minecraft server performance, you should familiarize yourself with Chunky’s management commands.

    • Check Progress: /chunky progress — Shows percentage, chunks processed, and estimated time remaining (ETA).
    • Pause/Resume: /chunky pause and /chunky continue. Useful if you need to free up CPU for an event.
    • Silent Mode: /chunky silent — Prevents progress messages from spamming your console or chat.
    • Trimming: /chunky trim — This is a powerful command that deletes all chunks outside of your selected radius. It is perfect for cleaning up a world where players explored too far.

    Integrating with ChunkyBorder

    While pre-generating creates the chunks, it doesn’t stop players from wandering past the generated edge and causing new lag. For this, we recommend the ChunkyBorder addon.

    Unlike the vanilla world border, ChunkyBorder allows for custom shapes (like circles or stars) and provides a smoother “bounce-back” mechanic.

    1. Set your Chunky selection.
    2. Run /chunky border add.
    3. This automatically syncs your world border to your pre-generated area.

    Common Mistakes to Avoid

    • Generating While Players are Online: Pre-generation is a CPU-intensive task. Running it during peak hours will cause massive lag. Use /chunky pause when your player count rises.
    • Using Slow Storage: If your minecraft server hosting uses traditional HDDs (Hard Disk Drives), pre-generation will be incredibly slow. Always opt for NVMe SSDs for world files.
    • Ignoring the Nether and End: Many admins forget to pre-generate dimensions. The Nether is especially laggy due to its dense terrain and lava flow calculations.
    • Forgetting the Memory: Pre-generation can spike RAM usage as chunks are held in the cache before being written to the disk. Ensure you have at least 4GB of RAM allocated. Check out [CPU vs RAM: What Actually Stops Minecraft Lag in 2026?] for more details on hardware balance.

    FAQ: Pre-Generating Your World

    Does pre-generating affect my world seed?

    No. Pre-generating simply “activates” the seed’s terrain early. The world will look exactly as it would have if a player explored it manually.

    Can I pre-generate a modded world?

    Yes. Chunky works perfectly with minecraft server plugins and mods. In fact, it is more important for modded servers because modded world generation is often 3-5x more intensive than vanilla.

    How do I know if my world is already pre-generated?

    If you can fly at high speeds with Elytra and chunks appear instantly without the “void” effect, your world is likely pre-generated. You can also check your world folder size; a vanilla world with a 10k radius will usually be over 15GB.

    Is Chunky better than WorldBorder’s “Fill” command?

    Yes. Chunky is more modern, better optimized for newer Minecraft versions (1.18+), and handles the increased world height much more efficiently than the older WorldBorder plugin.

    Conclusion

    Pre-generating your world with Chunky is the single most effective step you can take to move your project into the ranks of the best Minecraft servers. By removing the burden of terrain generation from your CPU, you ensure that your server remains snappy, responsive, and professional.

    Before you launch your next public minecraft server, take the time to set a radius, run /chunky start, and let your hardware do the heavy lifting while you’re offline. Your players—and your server’s TPS—will thank you.

    Ready to optimize your server further?

  • A Deep Dive into Aikar’s Flags: The Science of JVM Optimization

    A Deep Dive into Aikar’s Flags: The Science of JVM Optimization

    If you have ever spent a late night trying to start a Minecraft server, you know the “TPS struggle.” You’ve picked the perfect minecraft server hosting, installed your favorite minecraft server plugins, and invited your friends—only to watch the “Ticks Per Second” (TPS) drop the moment someone loads a few chunks or breeds fifty cows.

    Your hardware says you have 16GB of RAM. Your CPU is a modern beast. So why does the server still “stutter”? The answer usually isn’t the hardware; it’s the way Java manages that hardware.

    In this A Deep Dive into Aikar’s Flags: The Science of JVM Optimization, we are going to look under the hood of the Java Virtual Machine (JVM). We will explore why “Aikar’s Flags” became the industry standard for the best minecraft servers and how you can use them to maintain a low lag minecraft server in 2026.


    1. The Enemy of the State: Garbage Collection Lag

    Minecraft is written in Java. Unlike languages like C++, where a developer manually manages memory, Java uses an automated system called the Garbage Collector (GC).

    How Garbage Collection Works

    As your public minecraft server runs, it creates millions of “objects”—block coordinates, entity metadata, and networking packets. Once these objects are no longer needed (like the data for a player who just logged off), they stay in your RAM as “garbage.”

    The Garbage Collector’s job is to find this junk and throw it away to free up space.

    • The Default Behavior: Standard Java settings wait until the memory is nearly full, then “Stop the World.” This freezes the entire server for several hundred milliseconds to perform a massive cleanup.
    • The Result: A massive lag spike that players feel as “rubber-banding” or delayed block breaks.

    2. What are Aikar’s Flags?

    Created by Aikar, a legendary developer in the PaperMC community, these flags are a specific set of instructions for the JVM. They tell Java: “Don’t wait until the memory is full. Clean up the garbage in small, invisible pieces so the server doesn’t have to stop.”

    In 2026, the standard set of flags for a modern public minecraft server looks like this:

    java -Xms10G -Xmx10G -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 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikar.for.v2=true -jar paper.jar nogui


    3. The Science Behind the Flags: A Breakdown

    To truly understand A Deep Dive into Aikar’s Flags: The Science of JVM Optimization, we need to break down the specific logic behind these commands.

    The G1GC Algorithm (-XX:+UseG1GC)

    The “Garbage-First” collector (G1GC) is the heart of Aikar’s strategy. Instead of treating your RAM as one giant bucket, G1GC divides it into small “regions.”

    By dividing the heap into regions, the JVM can focus its cleaning efforts on the regions that are “mostly garbage” first, hence the name.

    The Pause Target (-XX:MaxGCPauseMillis=200)

    A Minecraft tick lasts 50 milliseconds ($1000ms / 20 TPS = 50ms$). While a 200ms target seems high, it is a “soft” goal. It tells the JVM to prioritize keeping cleanup pauses as short as possible, even if it has to run the cleaner more frequently.

    The “Young Gen” Optimization (-XX:G1NewSizePercent=30)

    Minecraft is a “high allocation” application. It creates and destroys millions of short-lived objects every second (like block positions). Aikar’s flags increase the “Young Generation” size to 30% of your total RAM. This gives these short-lived objects plenty of room to “live and die” without being promoted to the “Old Generation,” which requires much heavier cleaning.

    The 100% RAM Myth (-XX:+AlwaysPreTouch)

    One of the most common questions on minecraft server hosting forums is: “Why is my RAM usage at 100% when no one is online?”

    This is caused by the AlwaysPreTouch flag. It tells the OS to allocate all the requested RAM immediately. This is actually a performance boost because it prevents the OS from “stalling” your server later when it needs more memory.


    4. How to Apply Aikar’s Flags (Step-by-Step)

    Whether you are using a VPS or dedicated minecraft server hosting, applying these is simple.

    For Shared Hosting Users

    1. Access your hosting panel (Pterodactyl, Multicraft, etc.).
    2. Navigate to Startup Settings.
    3. Look for a field labeled “Additional Startup Flags” or “JVM Arguments.”
    4. Paste the flags, ensuring you adjust -Xmx and -Xms to match your plan’s RAM.
    5. Expert Tip: Always leave about 1GB of “Headroom” for the OS. If your plan is 8GB, set your flags to 7GB.

    For VPS/Dedicated Server Users

    1. Open your start.sh or start.bat file.
    2. Internal Link: If you haven’t set up your OS yet, read our guide on [The Best Linux Distros for Hosting a Minecraft Server].
    3. Replace your existing java -jar line with the full Aikar command.
    4. Run the server and use the Spark plugin to monitor the results.

    5. Aikar’s Flags vs. ZGC: The 2026 Comparison

    With the release of Java 21 and Java 24, a new challenger has appeared: ZGC (Z Garbage Collector).

    FeatureAikar’s G1GC FlagsGenerational ZGC
    Ideal RAM4GB – 16GB16GB+
    LatencyLow (20ms – 100ms)Ultra-Low (<1ms)
    ComplexityRequires specific flagsMostly automatic
    StabilityBattle-tested for 10 yearsNew, requires high CPU

    Verdict: For 90% of minecraft servers, Aikar’s Flags on G1GC remain the superior choice. ZGC is incredible for massive networks (100+ players), but it requires significant CPU overhead that small servers can’t afford.


    6. Common Mistakes and Expert Tips

    • Mistake: Not matching Xms and Xmx. If you set -Xms2G and -Xmx8G, the JVM will constantly grow and shrink the memory pool, causing “hiccups.” Always set them to the same value.
    • Mistake: Using outdated Java. In 2026, you should be using Java 21 or higher. Older versions of Java 8 or 11 do not support the modern G1GC optimizations.
    • Expert Tip: Use GraalVM. If your host allows it, run your server on GraalVM Community Edition. It’s a high-performance JIT compiler that works perfectly with Aikar’s Flags to squeeze even more TPS out of your hardware.
    • Internal Link: Performance is just one part of the puzzle. Once your server is fast, learn [How to Attract Players to Your Minecraft Server].

    FAQ: People Also Ask

    Do Aikar’s Flags work on Bedrock servers?

    No. These flags are for the Java Virtual Machine (JVM). If you are running a [ Java vs Bedrock Server ] , these only apply to the Java side. However, if you use [ GeyserMC ] , your Java server should definitely use these flags to support the translated Bedrock traffic.

    Can these flags fix lag caused by bad plugins?

    Not entirely. While these flags fix “memory lag,” they cannot fix a plugin that is poorly coded and hogging your CPU. Use the /spark profiler command to see if a specific plugin is the real culprit.

    Is it safe to use these on a 2GB server?

    Aikar’s Flags generally require at least 4GB of RAM to be effective. On very small servers (under 2GB), the G1GC “management overhead” might actually take up too much of your limited resources.

    Conclusion: The Final Piece of the Puzzle

    Understanding A Deep Dive into Aikar’s Flags: The Science of JVM Optimization is what separates amateur owners from professional admins. By taking the time to tune your JVM, you are ensuring that your players have the smoothest experience possible—no matter how many TNT blocks they ignite or how many [Cobblemon] they catch.

  • Aikar’s Flags Explained: The Secret to Perfect Garbage Collection

    Aikar’s Flags Explained: The Secret to Perfect Garbage Collection

    Every experienced owner knows the feeling: your minecraft servers are running smoothly, players are building, and then—bam—a massive lag spike. The TPS drops, blocks “reappear” after being broken, and your community starts typing the dreaded word “lag” in chat.

    More often than not, the culprit isn’t your internet speed or your player count. It’s “Garbage Collection.”

    In 2026, as Minecraft 1.21+ pushes the boundaries of hardware, standard Java settings simply don’t cut it. To maintain a low lag minecraft server, you need a surgical approach to how memory is managed. Enter Aikar’s Flags Explained: The Secret to Perfect Garbage Collection. These optimized startup parameters are the industry standard for stabilizing performance and ensuring your server stays as fast as the day you launched it.


    1. What Exactly is Garbage Collection (GC)?

    Before we dive into the flags, we have to understand the “trash” problem.

    Minecraft is written in Java. As your server runs, it constantly creates data—newly spawned mobs, chunk data, and player inventory updates. When this data is no longer needed (e.g., a mob dies or a player leaves a chunk), it becomes “garbage.”

    Java’s Garbage Collector (GC) is a background process that finds this junk and clears it out to free up RAM.

    • The Problem: By default, Java waits until the memory is almost full, then “pauses” the entire server to do a massive cleanup. These pauses are what cause those annoying lag spikes.
    • The Solution: Aikar’s Flags tune the G1GC (Garbage First Garbage Collector) to perform smaller, faster, and more frequent cleanups that are invisible to players.

    2. Aikar’s Flags: The “Magic” Command

    If you are using minecraft server hosting that allows custom startup parameters, you should replace your standard start command with this specific set of flags (optimized for 2026):

    Bash

    java -Xms10G -Xmx10G -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 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikar.for.v2=true -jar paper.jar nogui
    

    Why These Specific Values Matter:

    • -Xms and -Xmx (The same value): This is the most common tip for those who want to start a minecraft server. By setting the minimum and maximum RAM to the same value, you prevent the server from “stuttering” as it asks the operating system for more memory.
    • -XX:+UseG1GC: This tells Java to use the G1 Garbage Collector, which is specifically designed for multi-threaded applications like Minecraft.
    • -XX:MaxGCPauseMillis=200: This is the target. It tells Java, “Try your hardest never to pause the server for more than 200 milliseconds.”

    3. Comparison: Default Flags vs. Aikar’s Flags

    FeatureDefault Java SettingsAikar’s Flags (G1GC)
    Pause FrequencyRare but massive (500ms+)Frequent but tiny (<50ms)
    RAM UsageFluctuating (up and down)High and Stable (Constant)
    CPU ImpactHigh spikes during GCLow, consistent usage
    ExperienceOccasional “lag bombs”Smooth, consistent TPS

    4. Setting Up Aikar’s Flags: A Step-by-Step Guide

    Step 1: Check Your RAM

    Aikar’s Flags are most effective if you have at least 6GB to 10GB of RAM allocated to your server. If you have less than 4GB, the flags can actually hurt performance because there isn’t enough “breathing room” for the G1GC to work its magic.

    If you need more RAM, check our list of [The Best Minecraft Hosting Providers] to upgrade your plan.

    Step 2: Edit Your Startup Script

    If you are hosting at home, open your start.bat (Windows) or start.sh (Linux) file. If you are using a host like Apex or Hostinger, look for “Startup Parameters” in your panel.

    Not sure which platform to use? See our guide on [Self-Hosting vs. VPS: Which is Better for Your Minecraft Community?]

    Step 3: Remove Conflicting Flags

    Ensure you don’t have old flags like -XX:+UseConcMarkSweepGC or -XX:+UseParallelGC in your script. These will conflict with G1GC and may prevent your server from starting.


    5. Pros & Cons of Using Aikar’s Flags

    The Pros

    • Eliminates “Micro-Stutter”: Perfect for competitive public minecraft servers where every millisecond counts.
    • Optimized for Modern Java: Specifically tuned for Java 17, 21, and the upcoming versions used in 1.21.
    • Community Tested: Thousands of best minecraft servers use these flags daily.

    The Cons

    • Higher “Apparent” RAM Usage: Your host’s panel might show 100% RAM usage constantly. This is normal. The flags tell Java to “pre-touch” all allocated memory to prevent later lag.
    • Complexity: It can be intimidating for beginners who just want to play vanilla with friends.

    6. Expert Tips for 2026 Server Performance

    1. Use the “Spark” Plugin: Don’t guess where your lag is coming from. Install the Spark plugin and run /spark gc to see exactly how Aikar’s Flags are performing in real-time.
    2. Combine with Optimization Plugins: Flags are only half the battle.
    3. Pre-Generate Chunks: Even with the best flags, generating new terrain is heavy. Use the Chunky plugin to pre-load your world before players join.

    FAQ: People Also Ask

    Why does my server show 100% RAM usage with Aikar’s Flags?

    This is intentional! The -XX:+AlwaysPreTouch flag tells the server to claim all its allocated RAM immediately. This is better for performance because the server doesn’t have to “ask” the computer for more memory while you’re playing.

    Are Aikar’s Flags still relevant in 2026?

    Yes. While Java has improved significantly, the way Minecraft handles objects (especially with modern minecraft server plugins ) still creates the specific “bursty” memory patterns that Aikar’s Flags were designed to fix.

    Can I use these flags on a Bedrock server?

    No. These flags are for the Java Virtual Machine (JVM). If you are running a [ Java vs Bedrock Server ] , these only apply to the Java side.

    Conclusion: Take Control of Your Performance

    Mastering Aikar’s Flags Explained: The Secret to Perfect Garbage Collection is the mark of a true server professional. It transforms your server from a “laggy mess” into a high-performance machine capable of supporting a massive community.

    By taking the time to tune your JVM, you are showing your players that you value their experience and their time.

    Check out our latest post on [Minecraft Server Security] to protect your optimized server!