|
From: Stuart B. <stu...@gm...> - 2022-12-30 17:40:18
|
Hi Folks, I've been spending a bit of time digging into the OSG DatabasePager as part of the WS3.0 work. It's all a bit complicated, and I behaviour has changed since 2020.3 The OSG_NUM_DATABASE_THREADS and OSG_NUM_HTTP_DATABASE_THREADS environmental can be used to set the number of threads used to load objects, scenery etc. The first is the total number of threads, and the latter is the subset of those threads that are used for HTTP. (I agree that's not at all obvious - see OSG osgDB/DatabasePager.cxx line 1209) (wkitty - setting both to 7 as you have below would result in just one threads being created for general loading, which I don't think was your intention. I think you'd want OSG_NUM_DATABASE_THREADS=7 and OSG_NUM_HTTP_DATABASE_THREADS=0) That said, neither of the variables are relevant on next because FG explicitly sets the number of threads in fg_init (I haven't checked 2020.3). I recently added code to next to support using /sim/rendering/database-pager/threads to set the number of threads. Note that this is again the total threads, and one of those will we still set up a single HTTP thread. I suspect we should simply set the number of HTTP threads to 0, as we don't use them. -Stuart PS: We also have separate threads for TTS, terrasync. /sim/rendering/multithreading-mode can also be set for extra performance and threading related crashes in OSG for the brave/foolhardy ;) |