akhenry / openmct-yamcs

Open MCT YAMCS plugin
14 stars 9 forks source link

Telemetry batching and throttling #412

Closed akhenry closed 9 months ago

akhenry commented 9 months ago

Closes https://github.com/akhenry/openmct-yamcs/issues/213

Describe your changes:

All Submissions:

Author Checklist

Reviewer Checklist

akhenry commented 9 months ago

CPU usages seems surprisingly higher after moving to a WebWorker. Here's before without the Web Worker (with data ~10Hz) with CPU ranging 30-60%: before

and here's after on the same data, with CPU ranging 55-85%: after

The heap size keeps more flat with the Web Worker implementation, probably due to the batching/throttling.

Interesting. This was not my experience with Quickstart or VIPER. Can you share the display you used here? Maybe there's something I missed.

Also, CPU usage may be higher if batching is not happening because the worker just adds overhead in that case. I wonder if there's something peculiar going on with your setup...

Oh, interestingly, I note that you are measuring CPU usage differently to me. I have been using task manager. Let me do some testing with the performance monitor...

scottbell commented 9 months ago

Oh, interestingly, I note that you are measuring CPU usage differently to me. I have been using task manager. Let me do some testing with the performance monitor...

@akhenry I'll test again with activity monitor too and see if anything changes. I can test on a standalone box too.

scottbell commented 9 months ago

Here's before:

https://github.com/akhenry/openmct-yamcs/assets/9853862/797e2d20-5976-4a83-ba23-118a8089f8ce

Here's after:

https://github.com/akhenry/openmct-yamcs/assets/9853862/104a8fe0-bdda-4c79-a30f-2de018fd756d

looks to be a much better speedup sans table. Good work!

akhenry commented 9 months ago

Here's before: before.mov

Here's after: after.mov

looks to be a much better speedup sans table. Good work!

Awesome! Yeah so it seems that the tables were the actual bottleneck rather than the telemetry processing. A PR exists to address this - https://github.com/nasa/openmct/pull/7392

akhenry commented 9 months ago

@scottbell Good to go again

scottbell commented 9 months ago

Retested and looks good!

https://github.com/nasa/openmct/assets/9853862/9959219a-b627-4f6c-9488-06e88ceed365

@akhenry can wait until next sprint, but probably want to follow a fileup for the websocket reconnection and plot data:

Screenshot 2024-01-26 at 8 54 59 PM