TickThreading - concurrent entity/tile entity ticks and other optimisations

Discussion in 'Server Admin Area' started by nallar, Jan 5, 2013.

  1. nallar

    nallar New Member

    This project has been discontinued.

    TickThreading is not 100% stable. Please make sure to keep regular backups if you use it.
    Make sure to check the mod compatibility list on the wiki before installation.

    1.6.4 Testing build: latest very unstable
    1.4.7 Stable build: latest

    1.5.2 Discontinued build: latest

    What it does:

    * Ticks multiple worlds at the same time in different threads
    * Ticks multiple entities and tile entities within worlds at the same time in different threads
    * Performs movement updates in network threads, so players will move smoothly even if TPS is bad
    * Adds profiling tools which allow you to find what's being slow
    * Performs chunk loading and chunk generation asynchronously - no lag spikes from players logging in or teleporting
    * Replacement mob spawning algorithm which is faster than in vanilla, while also fixing a long-standing bug causing mobs from to spawn underground too much during the day preventing any spawning at night
    * Improved collision code which can handle thousands of mobs in a single block space without terrible TPS. Will still break clients.
    * Many more small tweaks to minecraft's internals and other mods, both to improve performance and ensure that multithreading doesn't break everything.

    Installation guide:


    Will this magically fix everything and make your TPS 20 with no CPU load? No. It should improve TPS, but I can give no guarantees. If performance is terrible, follow the guide on the wiki to record a profiling snapshot with jvisualvm so I can fix it.


    See the wiki.

    What to do when everything breaks:

    Make an issue here, paste logs to http://gist.github.com/, pastie or pastebin. Make sure to give the full log - there's not much I can do if you only give me part of the problem!


    See the commit log here: https://github.com/nallar/TickThreading/commits/master


    YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products:YourKit Java Profiler and YourKit .NET Profiler.
    Last edited: Sep 8, 2014
    Kaz!, Trec93, MrBrunty and 6 others like this.
  2. TheLoneWolfling

    TheLoneWolfling New Member


    What percentage of time tends to be spent in entity ticks?
  3. nallar

    nallar New Member

    TileEntity ticks are more important on large servers, although entity ticks can easily become important when players have thousands of passive mobs in farms.

    edit: Or after using mining lasers on scatter...
  4. glasspelican

    glasspelican New Member

    On one system I profiled it was almost 50%
    However that was a vinilla server, and several months ago
  5. nallar

    nallar New Member

    As of about an hour ago, the last major bug we were able to find in testing is fixed - steve's carts doesn't crash clients. This may actually be usable on a non-testing server, I know Dethemium has been running it for a few days now without major issues.
  6. TheLoneWolfling

    TheLoneWolfling New Member

    Is there an SSP version?
  7. nallar

    nallar New Member

    edit: No, there isn't any more, as there's absolutely no need to use it in SSP - it will make no noticeable difference in most cases.

    It works in SSP, following the same instructions. There isn't as much reason to use it in SSP though - most time is normally spent rendering.
  8. lisim

    lisim New Member

    Will chuck this on test server and see hwo we go
  9. Greedseed

    Greedseed New Member

    Looks to be a good idea. Now lts hope its a great implementation :D.

    Il be keeping track on this, and trying it for myself once a more "stable" version is out :)
  10. Sp0nge

    Sp0nge New Member

    The build is starting to get really stable now. Still some "minor issues" to resort. Been testing this for a few days now on a testserver with a few people, and its now almost playable nomatter what you do :)
  11. nallar

    nallar New Member

    Going live on ftb-craft now! Let's see what breaks.
  12. Sp0nge

    Sp0nge New Member

    Ill say, TPS did NOT break!
  13. ncreen_same

    ncreen_same New Member

    This is really interesting, the /tps command alone makes it useful, is it possible to use the same approach on terrain gen?
  14. AliasXNeo

    AliasXNeo New Member

    Will be testing this on our new FTB server. So far it's been working flawlessly, hitting 20 TPS with no problems.
  15. Puremin0rez

    Puremin0rez New Member

    Have been using this for the past week and he was able to very quickly fix any deadlocks or issues I found.

    Highly recommend this! Nallar is a great developer and fixes issues quickly and is willing to work with people to fix them.
  16. NooBxGockeL

    NooBxGockeL New Member

    Im wondering if this fixes our wierd lags, will try this and report afterwards.
  17. nallar

    nallar New Member

    edit: Disregard that, v7 is fine as long as you change the config to get rid of some bugged bees.
  18. NooBxGockeL

    NooBxGockeL New Member

    Well then it was the Tickthreading that caused sooo much problems...
    f.e. Exception in server tick, out of memory(still had ~300 mb free -.-") stuff like that, will pm you tomorow with some logs so you might figure it out...
    For now i sadly had to switch back to v6 without the Tickthreading.
  19. nallar

    nallar New Member

    If it's due to being out of heap space, it means what it says - you're out of memory.

    edit: Oh, you have bad timing. Recent builds are a bit broken. By a bit I mean completely! :(
  20. Puremin0rez

    Puremin0rez New Member

    Hey NoobX,

    Build 289 is a pretty perfect build and you should give it a shot - I have no idea about the newer builds, but since nallar said they're broken - i'll assume that

Share This Page