Stream simulation results into the database
Excalidraw link from design thread.
Our goal with this was to improve peak memory usage for large mission models. Simulation run time is not expected to change much, but a follow-up ticket to improve it has been opened. Scheduling runtime is not anticipated to change at all.
You can check the PR for an in-depth comparison of memory usage made using the Europa Clipper Model.
For a better sense of impact, however, I performed a memory comparison between develop and streaming using a variant of Endurance's mission model that did not include power modelling. Of note:
- Heap Size: Streaming peaked at a heap size of 5GB while writing Simulation Results but generally was at 3-4GB, while Develop peaked at 6.5 GB but was generally at about 5 GB during that time.
- Non-Heap Memory: Streaming had a very level non-heap memory usage while Develop had an increase in non-heap memory usage around when Simulation Results were being processed. Streaming peaked at 42MB but generally used 39MB, while Develop peaked at 45MB, but generally used 35MB (pre-minute 7) to 42MB (post-minute 7).
- The peak number of objects allocated in Streaming was 12 million, while the peak number of objects allocated on develop was 14 million.
- Streaming took 14 minutes to complete while Develop took 12 minutes.
Below are three screenshot’s showing the comparison for 1) heap 2) non heap and 3) recorded objects. Develop is shown on the left and Streaming is shown on the right. Please be aware in (2) that the vertical scale differs for the two graphs.