Significant performance degradation with Multi-Instance FMU export
Show older comments
Hello,
I am experiencing a significant performance degradation when exporting a Simulink model as an FMU with the Multi-Instance option enabled.
The main issue is that I need to enable Multi-Instance because I want to create multiple instances of the same FMU in PSCAD and use them to represent different equipment and potentially parallelize their execution. However, enabling this option causes a substantial increase in simulation time.
I have tested the same model in two configurations:
- Multi-Instance = OFF: 314.973159 s
- Multi-Instance = ON: 427.165040 s
These are the simulation times obtained when running the exported FMU directly within the Simulink environment. Therefore, the performance degradation is already present at the FMU level.
Could you please clarify:
- What changes internally in the generated code or FMU runtime when Multi-Instance is enabled that could explain this performance degradation?
- Are there any known performance limitations or overheads associated with Multi-Instance FMUs?
- Is there any recommended configuration or code-generation option that can minimize this overhead while still allowing multiple instances of the FMU within the same process?
- Is this behavior expected, or could it indicate a performance issue/bug in the FMU export implementation?
Best regards,
Víctor Sánchez Suárez
Answers (1)
nws
14 minutes ago
0 votes
There is currently no documented workaround or known limitation describing the performance impact of enabling the Multi-instance option. The documented purpose of this option is to allow multiple instances of the FMU to run within the same process, but the available documentation does not discuss any associated performance overhead. As a result, it is unclear whether the observed slowdown is expected behavior or a performance issue, and further investigation by MathWorks Technical Support would be recommended.
Categories
Find more on FMU Importing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!