Xonotic Forums
Engine: thread handling - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12)
+--- Thread: Engine: thread handling (/showthread.php?tid=5881)



Engine: thread handling - kingtiger01 - 11-06-2015

I noticed when cross-compiling(darkplaces) that the code is still highly based around the Q1 source. everything from input handling to Physics is handled on a single thread. Which would of been fine in the Pentium/8086 era, but is quite pointless(and not scalable at all now).

Why is no one trying to move to a more win/posix style independent thread handling? it would significantly help with physic simulation costs. as multi-core cpu's are almost absolute commonplace in the wild now. at the very least even older hyperthread extensible platforms could see a performance boost.

While debugging my servers on several occasions, ive noticed heavy load on xonotic's thread for physics handling, worse is scalable. more users, more load. its extremely noticeable on older hardware, alternative platforms and low core frequency's. as q1 physic operations are quite taxing, much less the model handling as they are no longer the fixed-point movable objects they were in q1(lol).

forking the network, physics, and sdl/glx/al to there own threads would take a significant step to allieving this and make the engine much more robust. its not a big step from there to let win/posix handle the thread execution and balancing.

----

Anyways, my suggestions and concerns for your eyes.