We have min-chunk-load-threads, do we need a maximum limit too? I've read alarming reports that some admins have been asked by their server hosts to reduce the amount of CPU power they are using. Having a limiter to the number of threads the async chunkloader uses could help with this.
We actually dont have a min anymore, that setting was removed.
However there is a max currently but it's done by JVM parameter
-Dpaper.maxchunkthreads=2
However, I don't think this will solve the hosts 'concerns'. Hosts never expected a process to use more than 1 - 1.5 cores of processing, but now they can with just world gen threads.
Even if we limit world gen to 1 thread making all worlds share it, that still gets it up to 2-3 cores worth of potential.
I guess I can add options to disable async chunk gen, and limit async chunk gen to a single thread, to put some caps on usage, and expose the load thread as a yaml config instead of system.
I think I'll also add an option for server hosts to set a system environment variable declaring its a shared host to set some defaults too.
But considering mojang is going down this same road, hosts need to prepare for this....
New options have been added to paper.yml
you can disable thread per world and reduce load threads to say 2.
Server hosts: See https://github.com/PaperMC/Paper/commit/a64b0952cb58f950e77167530308bcc3b6234c1b for methods to automatically force settings adjustments for your clients
Most helpful comment
But considering mojang is going down this same road, hosts need to prepare for this....