NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
73 stars 19 forks source link

Stream Simulation Resources #1507

Closed Mythicaeda closed 4 months ago

Mythicaeda commented 4 months ago

Description

Should not be breaking.

Extracts resource management out of the engine and into a new class called the SimulationResourceManager the InMemorySimulationResourceManager operates nearly the same way as on develop, except that the serialized form of the profile segment is kept around, rather than the pre-serialized form. The Simulate action uses the StreamingSimulationResourceManager, which streams profile segments to the DB in batches.

Additionally, the engine has been slightly refactored:

Additionally, since all but the SynchronousSimulationAgent are unused, the interface SimulationAgent has been flattened.

Verification

Manually verified that streaming is working.

Did some profiling on streaming vs develop. I used Clipper’s gnc-all-activities plan and ran profiling twice, once with high-overhead memory instrumentation and once with async sampling. Findings:

I also ran a JDBC profiler alongside the memory profiler and of note:

Raw Snapshots for those curious: Streaming.zip

Documentation

No docs need to be updated.

Future work

Investigate simulation_extent

Mythicaeda commented 4 months ago

Just pushed changes addressing the set of comments left during the walkthrough.