[1.7.10][Cauldron][1.8] Tick Dynamic - Keep your server running at 20 TPS

Discussion in 'Mod Discussion' started by wildex999, Jan 30, 2015.

  1. wildex999

    wildex999 New Member

    Tick Dynamic

    [​IMG]
    Tick Dynamic is a Minecraft Forge CoreMod, which will attempt to maintain a server Ticks Per Second at 20. It does this by individually controlling how many Entities and TileEntities update each tick. As the server TPS goes down, the number of Entities and TileEntities that update each tick also goes down, to maintain a high server TPS.
    Note: This is server side, so players/clients do not need to have it installed!
    Detailed description:
    Example use cases:
    Planned further development:
    The mod is currently a Minecraft Forge CoreMod, and is built for Minecraft 1.7.10, 1.7.10 Cauldron and Minecraft 1.8
    Download & Documentation: Tick Dynamic Project Page

    If you have any questions or problems, you can post them here, or on our GitHub Repository, and I will try to answer them =)
     
    Last edited: Jan 31, 2015
    1SDAN, axzxc1236, CaptPanda and 10 others like this.
  2. jonny4547

    jonny4547 New Member

    This would be good for ForgeCraft :p
     
  3. Zaflis

    Zaflis New Member

    Are you able to report what entities or tile-entities would lag most? Opis isn't reliable on 1.7.10 and we lack the tools to debug. If we knew, we could get to the bottom of the core issues and report lag problems to mod authors.
     
  4. wildex999

    wildex999 New Member

    That is what I plan to have my next mod be.
    It will be able to sample to get the time used by Chunks, Entity/TIleEntity types etc.
    It will not be able to tell you exactly how much time each single Entity/TileEntity is using, but it will be able to tell you how much time is used by for example "EntityCow" in the world, and within a chunk.
    So you can list chunks in a world by the time they use, then list the time used by Entity/TileEntity types within that chunk to get to what is using the time.
    That is how my mod worked when I wrote it for my own server back in the 1.5 days xD
     
    Geometry likes this.
  5. GreenZombie

    GreenZombie New Member

    Crikey.
    For a deep-in-alpha mod this has "sorted" out my servers performance problems.
    By "sorted" I mean, of course, something, somewhere, is not getting ticks.

    Question: How "fair" is it - if tick processing is cut off, on the next tick it will restart processing where it left off ?
     
  6. wildex999

    wildex999 New Member

    Glad it's working out for you =D

    As for how fair... it depends.
    Whenever it cut's off, it stores the current index into the list of Entities/TileEntities, and on the next tick it will continue at that index.
    However, Entities and TileEntities can be removed from the list between updates, which means the index may have shifted. This means that on the next tick it might start further back, or further forward in the list depending on how it changed, thus ticking certain entities twice, and maybe skipping others.
    But, over time it should average out to a "fair" distribution =)

    EDIT: Correction: The index should never go backwards, as items can be remove from before the index(Thus pushing the index forward in the list), but all new items are added at the end of the list(Not affecting the index)
    So, an Entity/TileEntity can be skipped for a tick, but will never be "double ticked".
     
    Last edited: Jan 31, 2015
    Geometry likes this.
  7. Jörmungandr

    Jörmungandr New Member

    Is this server side only, or will users have to install it?
     
  8. wildex999

    wildex999 New Member

    This is server side, so player do not need to have it =)
    You'd only run it on client if running a Single-player world.
     
    Geometry likes this.
  9. Jörmungandr

    Jörmungandr New Member

    Cool, thanks!
     
  10. wildex999

    wildex999 New Member

    A quick update for you guys:
    - Updated to version 0.1.3, which does some bugfixes, makes it more compatible with the patching.
    It will also now take into account time spent between ticks. So if you are running multiple Minecraft servers, and the other one starts hogging the CPU, Tick Dynamic will now notice it and lower the Entity/TE TPS to maintain a 20 TPS Server =)

    Also for those who have not yet been able to use this, because they are using a Cauldron server, or are running Minecraft 1.8:
    - Released a Cauldron compatible version
    - Released a MC 1.8 version
     
    Geometry likes this.
  11. kallope

    kallope New Member

    I really like the idea of this mod.

    I have tried it on my dw20 server, however it seems to break big reactors :(
     
  12. wildex999

    wildex999 New Member

    How so?
     
  13. kallope

    kallope New Member

    this is an image of an activly cooled reactor before adding your mod
    [​IMG]

    and this is after adding your mod

    [​IMG]
     
  14. wildex999

    wildex999 New Member

    Seems it's not getting water pumped in =/
    If the world is getting slowed, both the reactor and any water pipes should be running at the same tickrate.

    EDIT: I'll try setting up a reactor on my own server, and try it out. What are you using to cool it(Water source, pipes etc?)?
     
  15. kallope

    kallope New Member

    Was using extra utilities liquid transfer pipes into an ender tank and then tried both exporting the ender tank directly, by a liquid conduit and by putting it into a tesseracts and inputting it that way but didn't give me any success.


    Sent from my iPhone using Tapatalk
     
  16. wildex999

    wildex999 New Member

    Ok, I have confirmed that this happens.
    It seems that "Big Reactors" does the energy calculations based on the server TPS, rather than how often the reactor Tile Entities actually updates.
    So, as the reactor is ticking less often(Low Tile Entities TPS) it actually uses more water per tick, until eventually it's using more than you can provide to it.

    In the next version I will provide a method of avoiding this problem, by allowing you set TileEntities that are not slowed down. So you can set the Big Reactors and Water supply to not be slowed down, and thus allowing it to work normally.
     
  17. kallope

    kallope New Member

    That would be great. Thanks for looking into this.


    Sent from my iPhone using Tapatalk
     
  18. fusty

    fusty New Member

    Have you considered limiting things by chunk? This would be a neat way of not having to keep track of players, but rather throttling offending chunks. This could have some annoying chunk-boundary effects but overall things might run more smoothly than now.
     
  19. keybounce

    keybounce New Member

    Let me see if I understand the mod/goal here:

    If it takes a long time to tick everything, then you might get 5 tps, and each entity/tile entity gets ticked 5 times, once per server tick.

    With this installed, you will get (best case) 20 tps. During each tick, 1/4th of the entities in the loaded chunks get ticked. Each still gets 5 ticks per second, but only gets updated once every 4 server ticks.

    That about sum it up?

    So I assume this means that the sun/moon will move properly, at 20 real minutes per cycle, even when the server is loaded, and I won't see the client's idea of "Game time" jump around.

    Will things like furnaces ... actually, will a smelt take 10 seconds like it does now, or will it take time based on how many ticks it sees?
     
  20. keybounce

    keybounce New Member

    Ohh ... speaking of reactors, how will this work with rotarycraft/reactorcraft machines/engines/reactors?
     

Share This Page