What is TPS?

Discussion in 'Performance Tweaking' started by the3rdnumber, Aug 7, 2013.

  1. I used to think that TPS is the capacity the CPU is handling the actual server activity. For example if the CPU is used 100% but the server needs around 120% from it the tps will be around 18.

    But someone from a hosting company told me the TPS shows the internet connection ping. I'm not sure what to think now. When I search on google what TPS is it gives me some plugins, or ways to increase my TPS.

    Also does RAM affect TPS?
    • Useful Useful x 1
  2. joehot200


    TPS = Ticks per second, RAM usually does not effect TPS, if you run out of RAM your server will just usually crash without any lag.
    20 TPS is the maximum TPS, and thats what you should aim for. If its below 15, you will notice lag.

    Your ping latency and your TPS have got NOTHING TO DO WITH EACH OTHER. On my old host i had 120 people online with a 4Mb/s internet, laggy as hell, but the server was still at 20 TPS.
    #2 joehot200, Aug 7, 2013
    Last edited: Aug 7, 2013
    • Creative Creative x 2
    • Useful Useful x 1
    • Optimistic Optimistic x 1
  3. joshwenke

    Wiki Team

    The ticks per second is how fast your CPU can keep up with the server. If you're doing a lot of things, like saving a map and handling lots of plugins, the computer will lag behind because it can't keep up. Instead of running smoothly at 20 TPS, it will slow down and only be able to have 10 ticks per second because it has a load placed on it. Either the server will catch up with itself or continue to drop TPS and crash.
    • Optimistic Optimistic x 1
    • Creative Creative x 1
  4. vemacs


    ITT: Wrong. TPS has nothing to do with CPU usage. I can do something like this:

    Code (Text):
            BukkitRunnable r = new BukkitRunnable() {
                public void run() {
                    try {
                    } catch (Exception e) {
            getServer().getScheduler().scheduleSyncRepeatingTask(this, r, 0, 20);
    No CPU usage, hardly any RAM taken, but very low (almost 0, thanks ammar2) TPS. Some plugins which do network in main thread can cause it as well.

    joehot200: Bandwidth has nothing to do with latency.

    joshwenke "only be able to have 10 ticks per second"

    #4 vemacs, Aug 7, 2013
    Last edited: Aug 7, 2013
    • Agree Agree x 3
  5. ammar2

    ammar2 Retired Developer

    Ok kids, listen up. I'll explain TPS with an analogy.

    Imagine you have an alarm which rings every minute. Every time the alarm goes off its a "tick". Now during each minute you have to do some work. Sometimes this can be simple stuff like picking up books from your desk and placing them on your bed and sometimes it can be very difficult stuff like cleaning your desk completely. Similarly your server has a concept of ticks, and during each tick it does stuff like spawn mobs, load chunks, perform physics checks etc.

    So when you have small amounts of work to do, you can finish it in less than a minute and spend the rest of the time relaxing but when you get too much work and can't finish it in a minute you need to delay the alarm clock meaning now a tick isn't once every minute, its taking more than a minute. Similarly your server also relaxes when it finishes in less than its ticking interval and when it can't finish its work in time it has to extend the tick time too.

    Normally your server ticks 20 times a second, like how you were ticking once a minute.
    When you can't keep up with your work, you degrade to less than 1 tick per minute, similarly your server degrades to less than 20 ticks per second.

    Usually this will be met by an increase in cpu usage because the server is constantly doing work (not in all cases though!)
    • Informative x 10
    • Like x 8
    • Winner x 4
    • Agree x 3
    • Creative x 3
    • Funny x 2
  6. Can we get more than 20TPS anyhow? Would it be useful?
  7. ammar2

    ammar2 Retired Developer

    No, it'd actually screw up plugins reliant on your tps being 20 and make growth and make some aspects of the server way faster.
    • Informative Informative x 1
    • Useful Useful x 1
  8. joehot200


    More than 20 TPS would make your server do the same things, but more times every second, basically the server is moving your monsters, growing your grass, timing your potion effects, etc, by doing X amount per X tick. If you had double the ticks mobs would move twice as fast, crops would grow twice the speed. potion effects would wear out twice as fast, etc.

    If you have less than 20 TPS, your mobs will move slower, crops grow slower, etc, after about 17TPS, it becomes noticeable. If you are above that amount, you are doing well :)
    • Like Like x 1
    • Useful Useful x 1
  9. ok. (lmao your signature, is this real? xD)
  10. joehot200


    Uh. Yeah. We had an error where everyone kinda got banned :{
    Well, the signature is not 100% real, i faked the IP, however the MOTD and the PlayerCount are the same as my server.
    I decided i did not just want any skiddie knowing my IP from this forum.

    My real IP is endcraft.net
    • Like Like x 1
    • Funny Funny x 1
  11. 20TPS is hardwired into Minecraft as the universal speed. That is to say the smallest amount of time possible that is distinguishable from the games perspective. Each "Tick" causes the game to recalculate directions of mobs, as well as other things as mentioned above such as growing crops etc. It works similar to the absolute figures within our universe such as the planck length, absolute zero etc. I find it best to compare it to the speed of light; you can't go faster, you can match it (almost) but you can defiantly go slower. Just to get an idea of how long it is, each redstone tick is equivalent to 2 game ticks. This is incidentally also the reason redstone "half" ticks exist, being 1 game tick. Remember that TPS and FPS are different, on servers they are separated, TPS on the server side FPS on the players computer however on single player TPS and FPS are both affected by your computer.
    • Informative Informative x 3
  12. joehot200


    Just to add onto that, each tick entities are moved, Etc. But if the Ticks Per Second (TPS) is lower, mobs start to move slower, crops grow slower, etc.
    Then lets say that we have somehow broke the minecraft limit and have a TPS of 40. Then mobs would move twice the speed, and crops would grow twice the rate. Also hoppers would transfer items quicker, as well as things like spawners spawning mobs quicker. The servers day and night would go quicker, and more mobs would spawn.
  13. the maximum is 20 TPS ? :D

    Attached Files:

  14. That's a miscalculation.

    Also, please refrain from posting in old, dead threads.
    The reply before yours is over a year old.
    • Agree Agree x 2
  15. joehot200


    Yes, the maximum is 20 TPS.
    • Agree Agree x 1
    • Informative Informative x 1
  16. Well we just did it..
  17. Why do we all spam an thread which is more than 1year old?
  18. *You just did it