Simulation speed under Linux / Docker

Hi all,
I set up a Docker file for running Simulations on a more powerful machine than my laptop. The model itself uses Simscape Electrical, several Stateflow charts (triggering function call subsystems), many MATLAB function blocks and a good amount of custom C-code. I was able to get everything running in the Docker container on my workstation using SSH / X11 (with MATLAB GUI) and did a benchmark run of my model on the two machines.
  • Laptop: DELL XPS13 9310, i7-1165G7 @ 2.8 GHz, 16 GB RAM, 500 GB SSD, Windows 11
  • Workstation: Custom built, Ryzen 5900X @ 3.7 GHz, 64 GB RAM, 1 TB SSD, Ubuntu (Docker)
However, the simulation turns out to be three times faster on my laptop (24 minutes vs. 7 minutes) for whatever reason. I also tried to run it on the native Ubuntu system (without Docker) and it is even slower than in the Docker container.
In another test I tried one of the Mathworks Example Models ('ac6_IPMSM') and this one was a bit faster on the Linux workstation compared to my laptop, not significantly, though.
What could the reason be? A bad hardware configuration? Memory issues? Or something related to the model, e.g. custom C-code?
I am thankful for any hint that will speed up the simulation.
Best regards
Julian

1 commentaire

JulianSTABL
JulianSTABL le 19 Août 2022
I checked with the Simulink Profiler: The main cause are indeed the custom C functions. When I uncheck the option "Simulate custom code in a separate process", the simulation is faster on the workstation compared to the laptop. Still no idea why this happens, though.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Manual Performance Optimization dans Centre d'aide et File Exchange

Produits

Version

R2022a

Question posée :

le 18 Août 2022

Commenté :

le 19 Août 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by