Jump to content

Recommended Posts

Posted (edited)

I’ve heard that while Minecraft is technically multi-threaded, it is a primarily single threaded game because it does most of the work in a single thread. Is this true?

If so, does that go for servers as well as clients? Would a Minecraft server be able to fully utilize a processor with 8 or even 16 threads, or would a few of these threads not be utilized?

Edited by Jipthechip
  • 6 months later...
Posted

I am playing modded 1.12.2, and my w7 taskmanager says that my minecraft javaw.exe uses 46 threads.... and i have a 4core/4 threads  cpu (ItelCore2 QuadCPU Q9400).

Could someone explain what that means?

  • 4 months later...
Posted (edited)
  On 5/31/2020 at 5:43 AM, Kiljaeden053 said:

Specifically everything Mojang coded. so having separate cores for updating entities, blocks, would make the game faster.

Expand  

Except that would break every world interaction as well as cause a ton of concurrency issues.

Adding more threads doesn’t mean the game would be faster and better; threading is not a magical solution to all performance issues.

 

Threading should only be used if the routine to be put on another thread makes sense to be on another thread (i.e. make the checking for update routine separate from the main game thread, or separate the render thread from the game logic thread (not Minecraft specific)). It is not as simple as totalTimeUsed / threadCount = actualTimeUsed.

Edited by DavidM
  • Thanks 1

Some tips:

  Reveal hidden contents

 

Posted
  On 5/31/2020 at 5:58 AM, DavidM said:

Except that would break every world interaction as well as cause a ton of concurrency issues.

Adding more threads doesn’t mean the game would be faster and better; threading is not a magical solution to all performance issues.

 

Threading should only be used if the routine to be put on another thread makes sense to be on another thread (i.e. make the checking for update routine separate from the main game thread, or separate the render thread from the game logic thread (not Minecraft specific)). It is not as simple as totalTimeUsed / threadCount = actualTimeUsed.

Expand  

In your opinion. What would be the best solution to make the game more optimized on large servers?

Posted
  On 5/31/2020 at 6:28 AM, Kiljaeden053 said:

In your opinion. What would be the best solution to make the game more optimized on large servers?

Expand  

Depending on the game type of the server, it may be more up to how server plugins are written rather than the game itself (i.e. mini game servers rely heavily on the performance of the mini game plugins).

 

As for optimizing the game itself, projects like Spigot provide tweaked server jars that might improve server performance.

  • Thanks 1

Some tips:

  Reveal hidden contents

 

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.