Discussion in 'Technology' started by AmirehGamer, Mar 14, 2019.

  1. Hello,

    In CPUs, to what extent does multithreading help performance? Specifically, does it help in Minecraft server performance? What else can it be used for?

  2. MiniDigger


    minecraft runs on 20 ticks per second. there is only so much you can do in 50ms, thats why you want to do as much work as possible outside of that main tick loop. every event, every sync scheduler task, every command, all mob stuff, some chunk loading etc all needs to fit into those 50ms. so you should do slow stuff in another thread, where that 50ms limitation doesn't apply. thats why you never want to do stuff like database queries or webservice calls on the main thread. your TPS would suffer drastically.

    more generally, multi threading means that you can execute multiple threads (tasks) concurrently. that means, you can do multiple things in parallel without them having to wait for each other. since modern CPUs come with heaps of cores (and funny stuff like SMT/HT), you need to run multiple things in parallel to be able to utilize the full power of your cpu.

Share This Page