On Wed, Oct 15, 2008 at 6:15 PM, Robert Osfield <[EMAIL PROTECTED]> wrote: > Hi Csaba, > > On Wed, Oct 15, 2008 at 5:07 PM, Csaba Halász <[EMAIL PROTECTED]> wrote: >>> So all looks correct in terms of num of processors and cpu number >>> assigned for affinity. >> >> I wonder why OSG assigns threads to cpus by itself and not rely on the >> operating system. > > Because a OS will let that thread move from core to core and destroy > cache coherency and with it most or sometimes all the performance > benefit of going multi-threaded. Setting thread affinity is *crucial* > to getting good multi-threaded performance.
But if OSG happens to force 2 cpu intensive threads to the same core, performance will suffer anyway, and more than a simple cache efficiency issue. I have 3 cameras, two of which are using the same graph and a third that's drawing GUI elements. As such this third one is much less cpu intensive. So depending on what order they get instantiated the two "main" cameras might end up on the same cpu while the other cpu is bored to death with the GUI camera. (I have dual-core machine) As a related question, in the stats display if multiple cpus are used properly, should that manifest itself as overlapping bars? Because I don't see any such, the different phases (draw, cull) for the cameras all appear to be run after each other. I am now building osg with your debug modifications, to see if that tells me something. -- Csaba _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org