What is Minecraft TPS?
Introduction
Section titled “Introduction”A server’s TPS, or Ticks Per Second, is used to quantify the overall health of your server’s performance. Like a heartbeat, your server beats at a fixed rate of 20 ticks per second, one tick every 0.05 seconds.
On each tick, various aspects of the server advance a little: mobs move, grass grows, objects change position, mobs check their surroundings and update their behavior, health and hunger tick down, and much more.
Your entire server revolves around the beat of its TPS. At peak performance, 20 TPS, you’ll get smooth gameplay with no server-side lag. But if your server’s TPS drops, even by just a few ticks, you’ll start to notice lag.
As TPS drops, you’ll begin to notice the “rubber-band effect.” Your server skips ticks in an attempt to catch up and correct itself, which often reverts in-game actions by a few seconds. Most players associate this with mobs teleporting, blocks breaking but not dropping their item until a moment later, delayed combat hits, or the sun visibly skipping backward across the sky.
Every action and event on the server is governed by its TPS. As TPS drops, the effective speed of your server slows down with it, time in the server is, in a very real sense, slowed.
What Determines TPS?
Section titled “What Determines TPS?”TPS is primarily determined by the speed and capabilities of the hardware used to host your server. That said, hardware alone isn’t the whole story. Simply running the best hardware available doesn’t guarantee good performance on its own, what’s actually happening on the server plays an equally important role.
Mismanaging your server can be just as damaging to performance as inadequate hardware. TPS drops can happen because of plugins, mods, complex redstone structures, and all kinds of other in-game activity. Pinpointing the exact source of a TPS drop isn’t always easy, but it’s largely avoidable with good server management practices.
What Causes TPS Drops
Section titled “What Causes TPS Drops”When adding mods or plugins, think about the long-term effects of what you’re installing. Many new server owners assume player count is what determines their server’s performance. Before concluding “there are only a couple people online and the server is lagging like crazy,” it’s worth knowing that player count actually plays a relatively small role in overall server performance. The real drivers of TPS drops are what’s going on in your world. This is especially apparent on modded servers, with all the new blocks and functionality they add.
For every modded block that provides some kind of function, the server has to dedicate resources to carrying that function out. On its own, one block barely registers. But when that block is part of a large array, like a bank of solar panels, the server has to dedicate far more resources to keep that whole array running. Break it down, and you start to see just how much is happening in the background at any given moment.
Take an array of 1,000 solar panels as an example. Each panel is constantly checking the time of day, then checking the surrounding blocks for cables to deliver power through. If one cable connects into another array, that mainline updates to reflect the combined power of both. All of this happens every 0.05 seconds, and when you add it to everything else running on the server at the same time, it adds up fast. It’s no surprise this kind of load puts real strain on a game that wasn’t originally built to run this way.
Checking Your Server’s Current TPS
Section titled “Checking Your Server’s Current TPS”Most server software lets you check your current TPS directly from the console or in-game, usually with a command like /tps. On Paper and Spigot-based servers, this also shows your Memory Per Second (MSPT), the average time it takes to process each tick, which can help you catch problems before TPS actually starts dropping. If your server software doesn’t include this by default, plugins like Spark can give you a much more detailed breakdown of exactly what’s consuming your server’s resources, which is often the fastest way to track down the actual cause of a TPS drop rather than guessing.
Preventing TPS Drops & Good TPS Management Practices
Section titled “Preventing TPS Drops & Good TPS Management Practices”- Think ahead before adding anything, whether in-game or from the back end. How you evaluate this depends on your understanding of what you’re adding. For mods and plugins, this means reading up on what they actually do and forming a reasonable idea of their long-term impact before installing them.
- Be mindful of what you build in-game. Some modded blocks demand far more resources than others, and just one poorly placed block or structure can wreak havoc on your server’s TPS all on its own.
- Consolidate where you can. Multiple players each running their own separate bases adds up in resource consumption. Where possible, encourage players to build relatively close together and share machines in a community setting, rather than duplicating the same setups across the map. Build conservatively, only what you actually need, and avoid unnecessary, sprawling builds that strain your server’s resources without adding much value.