Home
Keep Your Minecraft Server Ticking at 20 TPS Without Pausing
The internal clock of a Minecraft server is measured in "ticks." Under ideal conditions, a server processes 20 ticks per second (TPS), meaning each tick occurs every 50 milliseconds. Within this brief window, the server must calculate entity AI, plant growth, redstone logic, fluid physics, and player interactions. When the server fails to complete these calculations within 50 milliseconds, you encounter the dreaded "Can't keep up" warning, leading to lag, rubber-banding, and broken automation.
Ensuring a Minecraft server "keeps ticking" involves two distinct challenges: preventing the server from freezing when no players are present and maintaining a stable 20 TPS under heavy load. This analysis covers the technical configurations, command-line operations, and optimization strategies required to maintain a persistent and performant game world.
Stop Minecraft Server From Pausing When Empty
In recent updates, specifically version 1.21.2 and later, Mojang introduced a power-saving feature that automatically pauses the server's internal clock when no players are online. While efficient for resource management, this is catastrophic for technical players who rely on automated farms, furnace arrays, or long-term growth processes that need to run 24/7.
Modifying server.properties for Persistence
The primary control for this behavior is located in the server.properties file, the core configuration document found in the server's root directory. To disable the auto-pause functionality, locate the following line:
pause-when-empty-seconds=60
The default value is often set to 60 seconds. To ensure the server keeps ticking indefinitely, regardless of player presence, change this value to -1:
pause-when-empty-seconds=-1
After saving the file and restarting the server, the world clock will continue to advance, and entities will remain active even if the player count is zero.
Disabling Third-Party Sleep Plugins
If the server continues to pause despite this change, check for optimization plugins. Popular tools like "ServerPauser" or "Empty Server Stopper" are designed to hibernate the server process to save CPU cycles. In shared hosting environments or Docker containers, look for "Auto-Stop" or "Hibernation" settings in the hosting panel. These must be disabled to maintain a continuous tick state.
Keeping Specific Chunks Active Without Players
Minecraft only processes ticks in areas of the world that are loaded into memory. By default, when a player moves away from an area or logs off, those chunks are unloaded to save RAM. If your goal is to keep a specific iron farm or redstone machine running while you explore other regions, you must force the server to keep those specific chunks "ticking."
Java Edition Force Load Commands
In Minecraft Java Edition, the /forceload command allows administrators to mark specific chunks as persistent. These chunks will remain in memory and continue to process ticks even if no players are nearby.
- To add a ticking area: Stand in the desired chunk and run
/forceload add ~ ~. This keeps the current chunk active. - To add a range: Use coordinates to define a box, such as
/forceload add -100 -100 100 100. - To check active areas: Use
/forceload queryto see a list of all chunks currently set to persist.
Note that forceloaded chunks still follow the rules of "random ticks." For example, crops like wheat or pumpkins require a player to be within a certain radius (usually 128 blocks) for random tick updates to occur, unless you use specific mods like Carpet Mod to simulate player presence. However, redstone, hoppers, and mob spawners (if triggered by other means) will function perfectly in forceloaded chunks.
Bedrock Edition Ticking Areas
Minecraft Bedrock Edition utilizes a slightly different system called "Ticking Areas." This is particularly useful for command block systems or large-scale machines.
- Creating a Ticking Area: Use the command
/tickingarea add <from: x y z> <to: x y z> [name: string]. This defines a volume that the server will always process. - Circle Ticking Areas: You can also create a circular zone using
/tickingarea add circle <center: x y z> <radius: int> [name: string]. The radius is defined in chunks, with a maximum of 4. - Preloading: In Bedrock, you can specify if the ticking area should be preloaded before the rest of the world using the
/tickingarea preloadoverload. This ensures that essential logic systems are online the moment the server starts.
Managing the Can't Keep Up Error
The most common reason a server stops ticking correctly is performance degradation. When the console reports "Can't keep up! Is the server overloaded?", it means the server's Mean Time Per Tick (MSPT) has exceeded 50ms. If the MSPT reaches 100ms, the server is running at only 10 TPS, effectively slowing the game down by half.
Optimized Server Software Selection
The "Vanilla" server software provided by Mojang is notoriously unoptimized for high-ticking demands. To maintain a stable 20 TPS, switching to community-optimized forks is often necessary.
- PaperMC: The industry standard for performance. Paper patches numerous lag-inducing bugs in the Vanilla code and provides detailed configuration files (
paper.yml) to fine-tune how entities and chunks tick. - Purpur: A fork of Paper that offers even more granular control, such as disabling specific entity AI or adjusting how often hoppers check for items.
- Fabric with Lithium: For those who want to keep the game as close to Vanilla as possible, the Fabric mod loader combined with the Lithium mod provides massive optimizations to physics, AI, and block ticking without changing game mechanics.
The Impact of Simulation Distance
Often confused with view distance, "Simulation Distance" is the most critical setting for tick performance. While view distance controls how far a player can see (client-side), simulation distance determines how far away from the player the server will actually process ticks (mobs, crops, redstone).
In server.properties, reducing simulation-distance from 10 to 6 or even 4 can drastically reduce the load. This prevents the server from ticking thousands of unnecessary blocks and entities that the player isn't interacting with, freeing up CPU cycles to maintain a stable 20 TPS in the immediate vicinity.
JVM Tuning for Consistent Ticking
Minecraft runs on the Java Virtual Machine (JVM). One of the primary causes of "stuttering" or "hiccuping" ticks is the JVM's Garbage Collection (GC) process. When the GC runs to clear out unused memory, it can briefly pause the entire server (a "Stop-the-World" event), causing a massive spike in MSPT.
Implementing Aikar's Flags
The community-standard for Minecraft JVM optimization is known as Aikar's Flags. These flags optimize the G1 Garbage Collector to work in small, incremental steps, preventing the long pauses that ruin tick consistency. A recommended startup string for a server with 6GB of RAM would look like this:
java -Xms6G -Xmx6G -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
By setting -Xms (initial RAM) and -Xmx (maximum RAM) to the same value, you prevent the JVM from dynamically resizing the heap, which is a frequent cause of tick lag during memory allocation.
Identifying Ticking Bottlenecks with Profiling
To keep a server ticking like a pro, you must know what is consuming your 50ms budget. Blindly changing settings is less effective than targeted optimization.
Using Spark for Real-Time Analysis
Spark is a powerful profiling plugin available for Paper, Fabric, and Forge. By running /spark profiler start, you can record the server's activity for several minutes. The resulting report provides a breakdown of exactly which processes are eating into your tick time.
- Entity Tick: If this is high, you have too many mobs. Consider reducing spawn rates or using a plugin to nerf mob AI.
- TileEntity Tick: This usually points to hoppers, furnaces, or chests. Replacing long hopper lines with water streams or using optimized hopper plugins can solve this.
- World Generation: If ticks drop when players explore, you should pre-generate your world using the "Chunky" plugin. This allows the server to simply load chunks from the disk rather than calculating new terrain during gameplay.
Redstone and Entity Management
Technical builds are often the primary reason a server fails to "keep ticking." A single unoptimized redstone clock can generate hundreds of block updates per tick.
- Hoppers: Every hopper checks for items above it 20 times per second. Putting a compost bin or a full block on top of a hopper prevents it from searching for item entities, significantly reducing its tick cost.
- Light Updates: Machines that frequently change light levels (like rapid piston movement or redstone lamps) force the server to recalculate lighting in multiple chunks. Minimizing these updates is essential for large-scale builds.
- Mob Density: The server processes AI for every mob. Implementing a hard cap on animals per chunk in
bukkit.ymlorpaper-world-defaults.ymlensures that a player's massive cow farm doesn't crash the server for everyone else.
Resolving Ticking Entity Crashes
Sometimes, a server stops ticking because it has encountered a "Ticking Entity" error, which results in a crash. This happens when a specific entity (like a corrupted horse or a modded item) contains illegal data that the server cannot process during its tick cycle.
To fix this without deleting the entire world:
- Check the Crash Report: Find the coordinates of the "Ticking Entity."
- Enable Auto-Removal: In older Forge versions, you could set
remove-erroring-entities=truein theforge.tomlfile. - External Editors: Use a tool like Amulet or NBTExplorer to manually delete the entity at the specified coordinates.
- Paper/Spigot Settings: Use the
region-file-compressionandkeep-spawn-loadedsettings to prevent data corruption during saves, which is the root cause of most ticking entity issues.
Hardware Selection for Maximum TPS
Ultimately, the Minecraft server process is primarily single-threaded. This means that having a CPU with 64 cores won't help your tick rate as much as a CPU with a very high single-core clock speed.
When choosing hardware to keep your server ticking:
- CPU: Prioritize processors with high boost clocks (e.g., Ryzen 9 7950X or Intel i9-14900K). A 5.0GHz+ clock speed is the gold standard for maintaining 20 TPS on modded or high-player-count servers.
- Storage: Always use NVMe SSDs. Tick lag often occurs during "Synchronous IO" (saving player data or loading chunks). Slow HDDs will cause the server to hang, resulting in skipped ticks.
- RAM: While more RAM doesn't equal more speed, insufficient RAM causes frequent GC pauses. For a modern 1.21+ server with plugins, 6GB to 10GB is the sweet spot.
Summary
Maintaining a Minecraft server that keeps ticking 24/7 requires a multi-layered approach. By disabling the pause-when-empty-seconds feature, administrators can ensure world persistence. To address performance-related tick loss, the focus must shift to simulation distance reduction, JVM flag optimization, and the use of high-performance server forks like Paper or Fabric. Regular profiling with tools like Spark ensures that you can identify and neutralize lag sources before they impact the 20 TPS threshold.
FAQ
Why do my crops stop growing when I leave the area even with /forceload?
Crop growth is tied to "Random Ticks," which occur only within a specific radius of a real player. While /forceload keeps the machines and redstone running, it does not simulate the random tick aura required for plant growth unless specific mods are used.
Will setting max-tick-time to -1 fix my lag?
No. Setting max-tick-time=-1 in server.properties only prevents the server from automatically shutting down (Watchdog crash) when a tick takes too long. It does not fix the underlying lag; it just allows the server to continue running in a laggy state.
How many ticking areas can I have in Bedrock Edition? By default, you can have up to 10 ticking areas per world. This limit is in place to prevent severe performance degradation, as each area adds a constant load to the server's CPU.
Does increasing RAM always improve TPS? No. In fact, allocating too much RAM (e.g., 32GB for a small server) can actually decrease TPS by making the Garbage Collector take much longer to scan the memory, leading to larger "stutter" pauses.
What is the difference between TPS and MSPT? TPS (Ticks Per Second) is the frequency, capped at 20. MSPT (Milliseconds Per Tick) is the actual time the server takes to process a tick. As long as MSPT is below 50ms, the TPS will stay at 20. If MSPT hits 60ms, the TPS will drop to approximately 16.6.
-
Topic: How To Make Minecraft Server Keep Ticking Minecraft? - HTusehttps://www.htuse.com/how-to-make-minecraft-server-keep-ticking-minecraft/
-
Topic: Introduction to the Tickingarea Command | Microsoft Learnhttps://learn.microsoft.com/uk-ua/minecraft/creator/documents/tickingareacommand?view=minecraft-bedrock-stable
-
Topic: Minecraft Server 'Can't Keep Up' Error: Performance Fixes - GameTeam - Bloghttps://gameteam.io/blog/minecraft-server-cant-keep-up-error-performance-fixes/