[osg-users] Processor Affinity and forked processes

Pete Black pete at marchingcubes.com
Sun Nov 29 10:41:49 PST 2015


Hi Robert,

I want to unset the CPU affinity that OSG hardcodes. Currently I achieve this under Linux with sched_set_affinity calls. But this requires platform-specific defines in my code, and just seems ugly.

I have no idea why you would consider applications doing their own threading to be 'niche'. Doesn't every non-trivial application that deals with any kind of streaming data (terrain, video) need to multithread this in order to get acceptable performance where the main thread is blocked by vsynced OpenGL?

Personally my application uses polyvox to continuously update a voxel terrain (it is a basic simulation of a coral reef), run the bullet physics engine on thousands of objects (fish), decode/cache videos using ffmpeg (for informational elements and animated skyboxes), pull frames from a webcam attached to the system and run OpenCV image analysis on them for gesture recognition.

I guess I just do not expect my libraries to be silently making decisions about which CPUs to use, especially when it is done in such an invasive way, with no API provided to 'undo' it. 

- Pete

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65789#65789








More information about the osg-users mailing list