Hi Yon, I've just review your changes and feel that re-ordering the of the setting of priority code in DatabasePager so it's done after the creation of threads is the best fix, and removal the affinity code in ViewerBase.cpp is probably most appropriate. I've now checked these changes into svn/trunk. Could you please try it out to how you get on.
Cheers, Robert. On Sat, Mar 27, 2010 at 11:07 PM, Yon Uriarte <[email protected]> wrote: > Hi, > > been playing with flightgear a bit, trying to get it to page tiles on more > than one thread. > The patch does 2 things: > > First, the database pager respects the environment variable to set DB pager > threads' priority. It makes quite a difference in minimum and average frame > rates. > > Second, viewerbase is helpfully (?!) setting the affinity of all DB pager > threads' to CPU1 (the 2nd CPU). The graphics thread is ALSO affinity'd to > this cpu, resulting in the hilarious situation where only that cpu is used > (on a quad core). I commented the line and it works as expected, no idea how > affinity is gonna help here. > > I start 8 threads on a quad-core, with MIN priority, works nicely. Haven't > checked what is the minimum number of threads needed for 100% utilization, > but i guess it depends on the system (#cores, IO speed, V-sync, hot disk > caches, ...) and varies wildly. > > 8 threads give me 95+% CPU utilization and with the priority patch 50+fps > while eating thru tiles like crazy :) > > > Thank you! > > Cheers, > Yon > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=26228#26228 > > > > > Attachments: > http://forum.openscenegraph.org//files/threadingpatch_140.txt > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
