-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Performance issues on Windows that didn't exist before #10693
Comments
What do you see in task manager while this is happening? CPU, memory, and network utilization for both PX4 and jmavsim. What do you see in |
@julianoes Will your SITL changes likely help with this issue? |
Not in principle but I'm now debugging issues like this hoping to find out why uorb drops messages. |
@dagar Thanks for the hints. CPU usage in task manager looks fine with PX4 taking 0-0.2% and jmavsim 2-5%. Here's an uorb top output snapshot:
Is there something striking? |
Update: I talked to @Stifael who uses linux jmavsim and there seems to be a problem in simulation in general, it probably just hides better on linux. But it can always happen with a certain CPU load and timing jitter that your sensors are producing errors and especially that you loose global position and do not regain it until you restart simulation... |
I have seen that too. Let's hope that it will be fixed with #10648. |
I think I have the same issue. Environment: Branch: Command:
Output:
Performance: Behavior: edit: the issue is gone in the same environment with latest master. |
Just as an update. Since the lockstep was introduced the result of this problem is the whole simulation stops. At least you can assume now that before it stops nothing unexpected like a simulated drone crash happens. I'm not sure why it should stop but a first guess would be that a packet and hence the "lockstep token" gets lost e.g. in the simulator and there's a deadlock. |
Fun 😭, so when does it stop? Straight away or after a while of flying? And does it always happen consistently? |
It always happens but not consistently after the same amount of time. I just compared to linux, there I can easily let jmavsim fly for an hour without problem but on windows it happens quite often that the simulation completely locks before I did my tests which usually take about a minute or two. It also happens when I don't fly at all: I just start sitl jmavsim and do something else when I come back I see the symptom "global position loss" all the time. |
In my tests after #11177 this issue is gone. Thanks to @bkueng! |
Describe the bug
Inconsistent and unexpected simulation performance issues when running SITL jMAVsim on Windows that end up in messages like this and very small to huge visible twitches in the simulation result. It can even lead to loss of global position and a crash of the simulated vehicle.
To Reproduce
Steps to reproduce the behavior:
make posix jmavsim
on latest masterExpected behavior
Simulation should work just fine on a modern computer that isn't overloaded. It also worked fine before, I'm not sure but I think on 1.8 I didn't have any obvious problem not even on a slower laptop.
Log Files and Screenshots
I can provide a simulation log if that helps.
Add screenshots to help explain your problem.
Additional context
If I look closely at the description of this issue it looks very similar: #10098
Machine is fast enough and not overloaded and it doesn't always happen but regularly/consistently.
I'd suspect threading priority problems with Windows if none of this happens on any other platform but there might be a general problem that just shows off on Windows. While I ported SITL to Cygwin I had to adjust some priority numbers. https://github.com/PX4/Firmware/pull/8407/files#diff-b3ac3b41912e12a40f44757b561a0e4dR216 could be related.
Another general question is why should the simulation not work fine just slower if the physics simulation cannot run in real time. I think this was discussed before.
The text was updated successfully, but these errors were encountered: