Reduce CPU usage for multiple SITL instances

I am looking to simulate multiple SITL instances on blender, I am able to run about 50 of SITL instances in a single thread and got their object instances on blender, but on increasing more number of instances, my CPU load getting maxed out, I am getting better results on 8 cores processors compared to 4 cores processor.

If I disable most of the features from AP_config.h, then will it help in reducing the CPU load for multiple instances ? What else I can do which can help in reducing the CPU load significantly ?


You should compile on non debug mode, don’t load mavproxy on each instance and if you don’t need it disable the terrain database. It should free a lot of resources !

I would be interested to see how you load SITL into Blender !

not sure how can i do that, i just normally build with ./waf configure and ./waf copter, also i am not using to start SITL instances, i am just using multiple SITL build files directly, so mavproxy is not running for any SITL instance

i am using python scripting on blender with a simple socket server and connecting TCP ports of multiple SITL instances with socket server running on blender and linked each SITL instance to a blender object

ok so you are already close to the max performance you can get.
Disabling some features and reducing the communication to the needed only should help too. but you will reach a limit.
On my previous laptop (i5 quadcore) I didn’t pass 30 instances with QGC as GUI and the computer wasn’t usable.

i see, i will try disabling some features and removing pieces of code

just disabling with the AP_config.h should be enough. Specially, terrain support that use quite a lot of CPU !

okay, thanks for helping