• 0

    posted a message on [1.15/16] MCMT - Multithreading ticks

    MCMT - Multithreading ticks


    This is forge mod that enables the parallel execution of minecraft ticks, reducing the time per tick, and theoretically allowing for larger servers and/or constructions.


    This is a very beta attempt at parallelisation using forge coremods, and has been mostly stable under the >10 hours of testing I've given it (but given the state space of minecraft that's nothing). Under testing it appears to drop tick times 10-50% enabled vs disabled (which is what I can easily measure; disabled vs uninstalled doesn't seem to change much)


    Note: it is highly unlikely that this will do do anything positive to framerates, as this is only parallelising server side (either dedicated or integrated) updates.


    This mod allows for vanilla clients to connect with it installed on a server should you wish to do that.


    Download:


    From github

    (Curseforge coming soontm)


    Features:

      • Multithreads ticking of:
        • Worlds (i.e. overworld, nether, end, etc.)
        • Tile entities (Blocks like furnaces, hoppers, etc.)
        • Entities
        • Environmental updates (grass growth, leaf decay, etc.)

      • On the fly config toggling
        • A lot of early game performance is gained simply by parallelising entities; with TE and environment parallelisation actually potentially being of detrement

      • Stats about the current thread utilisation
        • It also provides logging commands to log current config and performance
        • Note that these are only generated in the run directory and there is currently no way to remotely access them
        • Also note: the stats system for counting running threads is "a bit derpy", and probably underestimating by a good bit

    • Approximately stable
    • Appears to work acceptably with mods
    • Fully open source

    Warnings


    This mod is messing around with the internal execution loop of minecraft in new and interesting ways (I assume; I've not found anyone else doing anything like this). it is entirely possible it could result in world corruption or the like (I've not encountered it but it's worth warning about) so make backups.


    While this does support mods (and one of my main testing environments is a forge 1.16.1 modded one), DO NOT REPORT BUGS TO MOD AUTHORS (Unless the explicitly claim to support it). They are not designing to support concurrent execution, and while this mod guarentees local seraility for modded tile entities, it will have it's limits.


    Operating principal


    The default minecraft tick execution loop is just for each world, for each thing to be ticked, tick it. This is suboptimal.


    This mod utilises the concept of chunk locking; the easiest way to think about this is to take a piston. Pistons are more complicated than I have dealt with yet, so they need to operate in a way that the pistons think isn't multithreaded, as if they do, they break. However, pistons can only interact with stuff within 12 blocks of themselves (push limit); so by saying that no other locking entities execute within a 1 chunk radius of the chunk the piston is in, local seriality is achieved.


    The above is also how modded tile entities are handled. Note: if modded entities do concurrent access to some centralised resource; they will also break. This can be fixed using the same infrastructure but this isn't currently implemented as I've yet to encounter the need for it

    Posted in: WIP Mods
  • To post a comment, please .