Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more than 500 multi-agents simulation at one time #4942

Open
ZhangShaungnj opened this issue Mar 14, 2024 · 2 comments
Open

more than 500 multi-agents simulation at one time #4942

ZhangShaungnj opened this issue Mar 14, 2024 · 2 comments

Comments

@ZhangShaungnj
Copy link

ZhangShaungnj commented Mar 14, 2024

How can I simulate more than 500 multi-rotors at one time.
Here is my computer hardware list:
cpu:AMD EPYC 9654 96-Core Processor
ram:128g
gpu:4090
I find the simulation will not display smoothly in UE everytime the number over 70~80
I have tried join(),multi-process,threading.They don't work

Tasks

No tasks being tracked yet.
@ZhangShaungnj
Copy link
Author

Snipaste_2024-03-14_22-50-23
Snipaste_2024-03-14_22-50-53
Snipaste_2024-03-14_22-51-22

@Midas75
Copy link

Midas75 commented May 31, 2024

AirSim adopts a spin wait similar to sleep (0) in some low-level sleep implementations, which causes threads to be repeatedly scheduled on the CPU core when multiple drones are simulated simultaneously, resulting in high kernel state consumption. When the number of simulated drones approaches the number of CPU cores/CPU threads, performance will plummet, so it can be seen that in your configuration, 80 drones correspond to your CPU96 core. The solution is to replace its internal spin implementation (approximately four times) with a plain sleep implementation and recompile AirLib for use in the Unreal project. Using this method, I can achieve 400+drone simulation based on i7-12700 in Unity scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants