Open dennisjenkins75 opened 1 year ago
had to look that up myself because it has been ages i've done something on that part, but it looks like the initial rendering is done in a single thread: https://github.com/minetest-mapserver/mapserver/blob/53689acf531c78d4709165f0b806662460a9beff/tilerendererjob/initial.go#L15-L65
why the hell did i write "for true" there?
from the looks of it the process should be scalable with threading, not really a priority for me right now, PR's welcome though.
Why do you need it to be fast anyway? What are you trying do accomplish? :smirk:
For Minetest servers I think less threads is better in most cases anyway so if implemented I'd suggest at least ability to configure max threads so that it could be locked to one or few.
Hello.
I've been tinkering with a custom C++ map generator that prebuilds a
map.sqlite
file, so that in-game mapgen is just set to "singlenode". As part of my development workflow, I want to run themapserver
on it to be able to view it in the mapserver's HTTP UI. I do this in docker, but that should not matter. My goal is to use all of my CPU cores to complete the initial rendering as fast as possible.The problem is that I am unable to get the mapserver to use more than ~1.3 CPU cores. I have a 16 core (32 thread) AMD CPU, so I have the cores available. I've conducted several experiments (data below). For a sample map of 9095 blocks (~1000 x 1000 x whatever) world, the initial rendering always ranges from 186s and up. During this time, I can verify (htop, xload, other tools) that the mapserver is only using 1, sometimes 1.3 cores. I've tweaked the
renderingfetchlimit
,renderingjobs
, andrenderingqueue
values. At best I can make it perform WORSE, but never better. In fact, as I decreaserenderingjobs
the initial rendering phase completes FASTER (I assume due to decreased internal lock contention??)Please advise. Thank you.
Logs from
renderingjobs = 12
,renderingfetchlimit = 50000
,renderingqueue = 1000