Reduce max threads used by JMT-MCMT
See original GitHub issueWhen doing a stress test to see how the mod would behave when the maximum amount of threads are being used, I noticed an issue with framerate. I believe this is due to too many threads being spawned, causing the render thread to have trouble running often enough and therefore tanking framerates.
A possible solution could be to set the max amount of threads to be something like this (psuedocode):
if (integratedServer) {
Math.max(availableThreads - 2, 2);
// use a minimum of 2 threads but a maximum of (CPU threads - 2) so that the
// render thread, OS, JVM's JIT and GC have room to breathe.
} else {
Math.max(availableThreads - 1, 2);
// servers don't have a render thread and not many cores, they also usually have
// a headless OS, so only deduct 1 from the available CPU threads to make better
// use of the HW while still giving GC, OS, JIT and plugins room to breathe.
}
Entity MT enabled:
Entity MT disabled:
By the way, thank you for your efforts on this mod - it’s impressive how this mod manages to achieve so much more server-side performance compared to Vanilla with a decent amount of cores!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
java - How to reduce the number of threads used by the jvm
Apart from -XX:+UseSerialGC which disables Parallel or Concurrent GC, there are the following options to reduce the number of JVM threads:.
Read more >MCMT - Mods - Minecraft - CurseForge
This is a mod, that multithreads minecraft's tick execution. ... which I released broken; on the off chance you have one of these,...
Read more >Why Too Many Threads Hurts Performance, and What to do ...
Because the most efficient number of compute threads depends upon the particular hardware, programming in terms of threads can be a poor way...
Read more >site:self.admincraft - Reddit post and comment search
Hello,. I am trying to set up a minecraft server with 27 plugins, and an average of 10 players. The server is running...
Read more >Spottedleaf/Starlight Alternatives and Reviews (Aug 2021)
A Fabric mod designed to improve frame rates and reduce micro-stutter ... Hence, a higher number means a better Starlight alternative or higher...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll look into it
I’ve currently been deep diving into trying to make patching away fast util less of a pain
And I think I’ve finally done it, which is good
Capping the threadcount is super easy so I’ll try doing that next week
And thanks for the positive feedback
This functionality is implemented with paraMaxMode; so I’m closing this issue
Unless I’ve goof’d in which case someone re-open this or open a new one