- Mods
- 608,085
Description
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 not currently SpongeForge compatible.
The original project was by wildex999, and never posted to Curse, as far as I know. Here is a link to the original mod, where downloads for 1.8 and 1.7.10 can be found. Here is where he gives permission for me to update it, in addition to the fact that it is licensed under the MIT License.
Description
On a Minecraft server, the world will update 20 times each second. This means that the server has 50 milliseconds to go through every active world and update the Entities, TileEntities and other things such as lighting and terrain generation.
Once your server has a lot of players, and large active bases, the server might start having problems updating everything within the given time.
This is especially true on modded servers with Chunk loaders, large bases with a lot of TileEntities, and many new Monsters and other Entities.
With Tick Dynamic on your server, you will be able to define how much time each world is allowed to use, and within each world, how much time Entities and TileEntities are allowed to use.
Whenever these limits are hit, Tick Dynamic will limit the number of Entities and/or TileEntities that update each tick for the given groups.
You essentially have a separate TPS for Entities and TileEntities in each world.
So what do you gain by maintaining a server TPS of 20, by allowing Entities and TileEntities to update slower?
- Little to no Block lag
- Interact with TileEntities(Chests, Machines etc.) without delays
- Chunk loading and teleporting without long pauses
- No player lag when moving around
- No disconnects due to long ticks
- Generally lower ping and a more responsive server
Note however, that Tick Dynamic will not help for every case, certain events will still cause the TPS to drop, or cause noticeable lag.
Some examples for this are:
- World Generation taking a significant amount of time for a tick.
- Rapid change in time usage for a world
- One mod, or a combination of mobs, using a large amount of time on a single operation during a tick.
- World backup
However, Tick Dynamic should be able to smooth out the spikes by quite a bit.
Tick Dynamic allows a lot of control in how it will maintain that 20 TPS.
If you would have Entities run at a full 20 TPS, but you don't care about TileEntities, you can provide a larger slice of time for Entities.
If you want to give Overworld more time, you can also give it a larger slice of time than the other worlds.
Installation
Multiplayer Server installation
Tick Dynamic is a Minecraft Forge mod, and therefore requires a Forge server to run.
You can download the latest Forge installer here. Remember to choose the correction version according to which Minecraft version you run.
Then you just install the server and start the server to let it do the initial setup.
Once you have a Forge server running, you just download Tick Dynamic from the download page, and put into the mods folder on your Forge server.
Then you need to restart the server, and it will create a default config for you, and place it in the "config" folder, with the name "tickdynamic.cfg".
Read the "Configuration" section beneath this for more information about how to configure the mod.
Single-player Client installation
The client installation if pretty much the same as for the server
Just download the Forge installer, run it, and then place Tick Dynamic in the 'mods' folder.
Configuration
When you first start up a world with this mod installed, it will create a new default configuration file.
It is commented, and should be pretty easy to understand, but there are some concepts we will go into more detail on.
The default config file will look something like this.
The configuration is structured such that you have a main group, called 'worlds'.
Within this 'worlds' group, you have one group for each of the dimensions/worlds.
And then within each world, you have 'entity' and 'tileentity' groups.
There is always only ONE of each, and Tick Dynamic will automatically create the groups for new worlds as they are created or loaded on the server.
It's recommended that you do a first run, allowing the mod to automatically create the groups, go in to the config and adjust the settings you want, and then do the command 'tickdynamic reload' as op on the server.
In the future there will be a command to adjust the settings directly without doing a reload or editing the config.
slicesMax
One of the config options you'll see repeated over the config is 'slicesMax'.
Slices are the way you control the time allotment to each world, and within each world, to Entities and TileEntities.
Each tick the time(By default 50ms) will be distributed among all the worlds, according to how many slices they have.
If you have 3 worlds, each with 100 slices, then each world will get 100/300 = ~33% of the time.
So you can thus give the Overworld a maxSlices of 300, while giving the other two 100 each. This way the Overworld will get 60% of the time.
Of the time given to the world, this is further distributed to TileEntities and Entities according to their slices, the same way.
TileEntities and Entities are given a portion of the time first given to the world, so their slices are only relative to each other within that world.
If any group has unused time, then that time will be distributed to the remaining groups.
So even if you give 1000 slices to TileEntities and 100 to Entities, as long as as TileEntities aren't using it's full time, Entities will be able to use more than 100 slices of time.
So the formula for slices to time percentage is: (self.maxSlices/allSiblings.maxSlices)*100
Note: maxSlices = 0 has a special meaning. It means that the group's time usage is accounted for, but not limited.
Basically it can take all the time it needs, even if it goes above the parent maxTime, pushing its siblings down to minimumObjects.
minimumObjects
As the server goes more and more over the given 50ms tick time, it will reduce the number of updating Entities and TileEntites more and more.
Eventually it will get to a point where it just stops updating them, which is not always what you want.
Using minimumObjects you can set point below which it will not go, no matter how low TPS the server has.
Commands
/tickdynamic list [dimnames, time, entitiesrun, tps, maxslices, minimumentities] [page]
The list command will list all the world, and the requested data for them and the Entities & TileEntities in them.
If this list is longer than 6 rows, it will be put into multiple pages. By default it will show page one, but you can provide a page number as the last argument.
list dimnames
List the names of the dimensions and their dimension id.
Everything else in the list currently uses the dimension numbers(Like DIM0, DIM-1 etc.) so using 'list dimnames' you can get a list of the actual name bound to those numbers.
This is currently temporary, and will only list the names of dimension currently loaded and ticking.
The reason for only using DIM numbers to start with, is that the names often are so long that they cause the table to wrap around to multiple lines in chat.
list time [page]
List the average used, and average given time in milliseconds.
At the start of each tick, Tick Dynamic will take the average time used and slicesMax for each group, and redistribute the time. This command will show you this data, allowing you to see which world, and which group within that world is using the time.
This list also shows an 'World Data' column, which is the combined time used for Entities and TileEntities in that world.
One special entry here is '(Other)'.
This indicates any time used outside Entities and TileEntities, and when Tick Dynamic calculates the time distribution, it will have to remove this time from the pool.
Starting from version 0.1.3 there is also an "External" group.
This group will show the time used between Ticks, that causes the next tick to start late. You will notice this show a lot of time used if you have other things running on the same machine as the minecraft server.
If this uses a significant amount of time, it can indicate that you have something else using up a lot of CPU time.
list entitiesrun [page]
List the number of Entities/TileEntities which run on average each tick.
This gives you an overview of the number of Entities or TileEntities which run each tick, and can in combination with 'list time' give an good indication of what can be done to reduce time used in the different worlds.
list tps [page]
List the current Ticks Per Second of Entities and TileEntities in each world.
This gives you and indication of how much the specific group has been slowed down. For example, if Entities have a TPS of 10, that means only half of the Entities will update each server Tick.
Note: Some worlds may show the TPS as ',00'. This means that the world currently is not loaded and/or running.
list maxslices [page]
Essentially just lists the current slicesMax value from the configuration file.
Check out the slicesMax documentation for the config for more information.
list minimumentities [page]
Essentially just lists the current minimumObjects value from the configuration file.
Check out the minimumObjects documentation for the config for more information.
/tickdynamic tps
Print the current average server TPS
/tickdynamic value
This command is currently not implemented, but in the future it will allow you to directly change the configuration entries without having to manually edit the config file and running reload.
/tickdynamic reload
Reloads the configuration file, and applies the new configuration.
/tickdynamic enabled [yes, y, no, n]
Enabled or disabled Tick Dynamic. Note it will still in some cases gather data, but will no longer apply any limits.
Note: It does not write this change to the configuration file!
/tickdynamic help
For now it just prints the URL of this page.
Check out my other mods:
Server-Side Mods:
Client-Side Mods:
Other Mods: